`./mach lint` fails to install on Windows 10: ERROR: In --require-hashes mode ... colorama; sys_platform == "win32"... from pylint==2.5.3
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P2)
Tracking
(firefox-esr68 unaffected, firefox-esr78 unaffected, firefox77 unaffected, firefox78 unaffected, firefox79 fixed, firefox80 fixed)
Tracking | Status | |
---|---|---|
firefox-esr68 | --- | unaffected |
firefox-esr78 | --- | unaffected |
firefox77 | --- | unaffected |
firefox78 | --- | unaffected |
firefox79 | --- | fixed |
firefox80 | --- | fixed |
People
(Reporter: nalexander, Assigned: ahal)
References
(Blocks 2 open bugs, Regression)
Details
(Keywords: regression)
Attachments
(1 file)
nalexander@weirdo ~/Mozilla/gecko
$ ./mach lint -w -o
Collecting pylint==2.5.3
Using cached https://files.pythonhosted.org/packages/e8/fb/734960c55474c8f74e6ad4c8588fc44073fb9d69e223269d26a3c2435d16/pylint-2.5.3-py3-none-any.whl
Requirement already up-to-date: toml==0.10.1 in c:\users\nalexander\mozilla\objdirs\objdir-browser-compile\_virtualenvs\init_py3\lib\site-packages (from -r c:\Users\nalexander\Mozilla\gecko\tools\lint\python\pylint_requirements.txt (line 4)) (0.10.1)
Requirement already up-to-date: mccabe==0.6.1 in c:\users\nalexander\mozilla\objdirs\objdir-browser-compile\_virtualenvs\init_py3\lib\site-packages (from -r c:\Users\nalexander\Mozilla\gecko\tools\lint\python\pylint_requirements.txt (line 7)) (0.6.1)
Collecting six==1.15.0
Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting wrapt==1.12.1
Using cached https://files.pythonhosted.org/packages/82/f7/e43cefbe88c5fd371f4cf0cf5eb3feccd07515af9fd6cf7dbf1d1793a797/wrapt-1.12.1.tar.gz
Collecting lazy-object-proxy==1.5.0
Using cached https://files.pythonhosted.org/packages/4d/1c/5d85076eaf6d105f2ce7c1b8440372f51146f40dd35977d135d5c155b95c/lazy_object_proxy-1.5.0-cp37-cp37m-win_amd64.whl
Collecting astroid==2.4.2
Using cached https://files.pythonhosted.org/packages/24/a8/5133f51967fb21e46ee50831c3f5dda49e976b7f915408d670b1603d41d6/astroid-2.4.2-py3-none-any.whl
Collecting isort==4.3.21
Using cached https://files.pythonhosted.org/packages/e5/b0/c121fd1fa3419ea9bfd55c7f9c4fedfec5143208d8c7ad3ce3db6c623c21/isort-4.3.21-py2.py3-none-any.whl
Collecting typed-ast==1.4.1
Using cached https://files.pythonhosted.org/packages/6d/6f/c67eed763bcc095d9187c7a04fdc3ba640d1e990368acfcb1d294ff71549/typed_ast-1.4.1-cp37-cp37m-win_amd64.whl
Collecting colorama; sys_platform == "win32"
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
colorama; sys_platform == "win32" from https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl#sha256=7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff (from pylint==2.5.3->-r c:\Users\nalexander\Mozilla\gecko\tools\lint\python\pylint_requirements.txt (line 1))
WARNING: You are using pip version 19.3.1; however, version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Unable to install correct version of pylint
Try to install it manually with:
$ pip install -U --require-hashes -r c:\Users\nalexander\Mozilla\gecko\tools\lint\python\pylint_requirements.txt
error: problem with lint setup, skipping android-api-lint, android-checkstyle, android-javadoc, android-lint, android-test, pylint
abort: repository default does not exist!
error running: c:\mozilla-build\python\Scripts\hg.EXE outgoing -r . --quiet --template {file_adds % '{file}\n'}{file_mods % '{file}\n'} default
warning: no files linted
✖ 0 problems (0 errors, 0 warnings)
Fine, I'll install without --require-hashes
. That fails because the path isn't appropriate for Windows:
nalexander@weirdo ~/Mozilla/gecko
$ pip install -U -r c:\Users\nalexander\Mozilla\gecko\tools\lint\python\pylint_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. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'c:UsersnalexanderMozillageckotoolslintpythonpylint_requirements.txt'
WARNING: You are using pip version 19.3; however, version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Fine, I'll manually modify the path. That fails because the requested package maybe just doesn't exist on Windows?
nalexander@weirdo ~/Mozilla/gecko
$ pip install -U -r c:/Users/nalexander/Mozilla/gecko/tools/lint/python/pylint_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. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
ERROR: Could not find a version that satisfies the requirement pylint==2.5.3 (from -r c:/Users/nalexander/Mozilla/gecko/tools/lint/python/pylint_requirements.txt (line 1)) (from versions: 0.15.2, 0.16.0, 0.18.0, 0.18.1, 0.19.0, 0.20.0, 0.21.0, 0.21.1, 0.21.2, 0.21.3, 0.22.0, 0.23.0, 0.24.0, 0.25.0, 0.25.1, 0.25.2, 0.26.0, 0.27.0, 0.28.0, 1.0.0, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.3.1, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.4.5, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.6.0, 1.6.1, 1.6.2, 1.6.3, 1.6.4, 1.6.5, 1.7.0, 1.7.1, 1.7.2, 1.7.3, 1.7.4, 1.7.5, 1.7.6, 1.8.0, 1.8.1, 1.8.2, 1.8.3, 1.8.4, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5)
ERROR: No matching distribution found for pylint==2.5.3 (from -r c:/Users/nalexander/Mozilla/gecko/tools/lint/python/pylint_requirements.txt (line 1))
WARNING: You are using pip version 19.3; however, version 20.1.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
Comment 1•4 years ago
|
||
I'm experiencing this same issue. I wanted to add that I am using the same command that I have previously used successfully. This problem must have been caused somewhat recently.
Reporter | ||
Comment 2•4 years ago
|
||
The immediate work-around is rm tools/lint/pylint.yml
.
Reporter | ||
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
I can reproduce as well, I wonder if there's a bug in hashin
(the tool used to generate that requirements.txt) because even running hashin 'pylint; sys_platform == "win32"'
doesn't seem to pick up that colorama dependency. If I use hashin
to add colorama manually it seems to work though.
Nick, fyi mach lint
uses Python 3, so installing pylint manually into your Python 2 site-packages wouldn't work anyway. That might also be why it wasn't able to find a matching version of pylint
(they may have dropped Python 2 support).
Assignee | ||
Comment 4•4 years ago
|
||
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Updated•4 years ago
|
Pushed by sledru@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/fcdd73fc3355 [lint] Add missing 'colorama' to pylint_requirements.txt when on Windows, r=sylvestre
Comment 6•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Comment 7•4 years ago
|
||
bugherder uplift |
Updated•2 years ago
|
Description
•