Avoid pip's "outdated" warning in virtualenvs
Categories
(Firefox Build System :: Mach Core, enhancement)
Tracking
(firefox90 fixed)
Tracking | Status | |
---|---|---|
firefox90 | --- | fixed |
People
(Reporter: mhentges, Assigned: mhentges)
Details
Attachments
(3 files)
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 invirtualenv
)
Reported a feature request to virtualenv
.
Assignee | ||
Comment 1•3 years ago
|
||
At least in PyCharm, expanding a VirtualenvManager
instance means
resolving all the properties and fields of the instance.
However, if that property is calling a subprocess, the debugger
wouldn't run that subprocess while we're stopped at a breakpoint.
So, the instance would sit there with the "Collecting data..." text.
Assignee | ||
Comment 2•3 years ago
|
||
Now, when running mach commands that invoke pip
, it will no longer
inform the user that it needs an update.
We reach into distutils
to determine the "site-packages" directory
pattern, then apply it to our virtualenv.
Depends on D115935
Updated•3 years ago
|
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/40c109bb5f9a Fix VirtualenvManager not being expandable in debugger r=ahal https://hg.mozilla.org/integration/autoland/rev/f51d72e5f0b8 Avoid pip's "outdated" warning in virtualenvs r=ahal
Comment 4•3 years ago
|
||
Backed out 2 changesets (bug 1712819) for Python failures. CLOSED TREE
Log:
https://treeherder.mozilla.org/logviewer?job_id=340969366&repo=autoland&lineNumber=667
https://treeherder.mozilla.org/logviewer?job_id=340972607&repo=autoland&lineNumber=339
https://treeherder.mozilla.org/logviewer?job_id=340969341&repo=autoland&lineNumber=708
https://treeherder.mozilla.org/logviewer?job_id=340969413&repo=autoland&lineNumber=598
Push with failures:
https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&revision=f51d72e5f0b89c4b4e32db9ed047ff291553a43f
Backout:
https://hg.mozilla.org/integration/autoland/rev/034912384c8dfba9622a2ee586912e2b6afbe767
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 5•3 years ago
|
||
Was an issue with self.virtualenv_root
having both /
and \\
separators. Fantastic.
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9c25bbd07129 Fix VirtualenvManager not being expandable in debugger r=ahal https://hg.mozilla.org/integration/autoland/rev/3a5b335bdc8c Avoid pip's "outdated" warning in virtualenvs r=ahal
Comment 7•3 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/9c25bbd07129
https://hg.mozilla.org/mozilla-central/rev/3a5b335bdc8c
Assignee | ||
Comment 8•3 years ago
|
||
Now that we've deployed a virtualenv configuration to turn off
pip's "outdated" warning, we no longer need to apply the suppression
as a CLI argument.
Pushed by mhentges@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/4335f275d7b4 Remove redundant pip warning suppression r=ahal
Comment 10•3 years ago
|
||
bugherder |
Description
•