Bug 1712819 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

When running commands line `./mach lint --fix`, I see `pip`'s outdated warning multiple times:
```
 (hg)-[default]-~/d/firefox % ./mach lint --fix    
created virtual environment CPython3.9.5.final.0-64 in 126ms
  creator CPython3Posix(dest=/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mitch/.local/share/virtualenv)
    added seed packages: pip==20.3.1, setuptools==51.0.0, wheel==0.36.1
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
warning: linting the entire repo takes a long time, using --outgoing and --workdir instead. If you want to lint the entire repo, run `./mach lint .`
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
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.
jsonschema 3.2.0 requires attrs>=17.4.0, which is not installed.
jsonschema 3.2.0 requires pyrsistent>=0.14.0, which is not installed.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
...
```

This is not ideal for two reasons:
* It would be obnoxious for developers to have to manually update every virtualenv's `pip` every time an env was generated. It's not viable.
* It's better to have `pip` be pinned (due to its embedded nature in `virtualenv`)
When running commands line `./mach lint --fix`, I see `pip`'s outdated warning multiple times:
```
 (hg)-[default]-~/d/firefox % ./mach lint --fix    
created virtual environment CPython3.9.5.final.0-64 in 126ms
  creator CPython3Posix(dest=/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common, clear=False, no_vcs_ignore=False, global=False)
  seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/mitch/.local/share/virtualenv)
    added seed packages: pip==20.3.1, setuptools==51.0.0, wheel==0.36.1
  activators BashActivator,CShellActivator,FishActivator,PowerShellActivator,PythonActivator,XonshActivator
warning: linting the entire repo takes a long time, using --outgoing and --workdir instead. If you want to lint the entire repo, run `./mach lint .`
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
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.
jsonschema 3.2.0 requires attrs>=17.4.0, which is not installed.
jsonschema 3.2.0 requires pyrsistent>=0.14.0, which is not installed.
WARNING: You are using pip version 20.3.1; however, version 21.1.2 is available.
You should consider upgrading via the '/home/mitch/dev/firefox/obj-x86_64-pc-linux-gnu/_virtualenvs/common/bin/python -m pip install --upgrade pip' command.
...
```

This is not ideal for two reasons:
* It would be obnoxious for developers to have to manually update every virtualenv's `pip` every time an env was generated. It's not viable.
* It's better to have `pip` be pinned (due to its embedded nature in `virtualenv`)

Reported a feature request to [`virtualenv`](https://github.com/pypa/virtualenv/issues/2125).

Back to Bug 1712819 Comment 0