Closed Bug 1454551 Opened 6 years ago Closed 3 years ago

|mach doc| fails with error regarding --require-hashes and colorama>=0.3.5; sys_platform == "win32"

Categories

(Developer Infrastructure :: Source Documentation, defect)

Unspecified
Windows
defect
Not set
normal

Tracking

(firefox87 fixed)

RESOLVED FIXED
87 Branch
Tracking Status
firefox87 --- fixed

People

(Reporter: markh, Assigned: molly)

References

Details

Attachments

(2 files)

Attached file Output from |mach doc|
With the latest mozilla-build, attempting to run |mach doc| fails with:

> In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
>    colorama>=0.3.5; sys_platform == "win32" from https://files.pythonhosted.org/packages/db/c8/7dcf9dbcb22429512708fe3a547f8b6101c0d02137acbd892505aee57adf/colorama-0.3.9-py2.py3-none-any.whl#sha256=463f8483208e921368c9f306094eb6f725c6ca42b0f97e313cb5d5512459feda (from Sphinx==1.6.7->-r o:\src\moz\gecko\tools\docs\requirements.txt (line 56))

Attached is the full log for the command.
Version: Version 3 → 3 Branch

This has come up again recently, possibly due to the mach doc requirements changing in bug 1667830. It seems like bug 1648586 was a similar issue and required manually adding the colorama requirement on Windows.

Regressed by: 1667830
See Also: → 1648586

The current error message:

Collecting colorama>=0.3.5; sys_platform == "win32"
ERROR: In --require-hashes mode, all requirements must have their versions pinned with ==. These do not:
    colorama>=0.3.5; sys_platform == "win32" from https://files.pythonhosted.org/packages/c9/dc/45cdef1b4d119eb96316b3117e6d5708a08029992b2fee2c143c7a0a5cc5/colorama-0.4.3-py2.py3-none-any.whl#sha256=7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff (from sphinx==3.2.1->-r c:\mozilla-source\mozilla-central\tools\moztreedocs\requirements.txt (line 241))

The regression doesn't seem to be recent after all, ab875fa23be4 (the previous commit on m-c) has the same issue, sorry for the noise.

No longer regressed by: 1667830

I have no idea if this is the correct patch, but I was able to silence the error message by applying this diff:

diff --git a/tools/moztreedocs/requirements.txt b/tools/moztreedocs/requirements.txt
--- a/tools/moztreedocs/requirements.txt
+++ b/tools/moztreedocs/requirements.txt
@@ -31,16 +31,19 @@ botocore==1.18.6 \
 certifi==2020.6.20 \
     --hash=sha256:5930595817496dd21bb8dc35dad090f1c2cd0adfaf21204bf6732ca5d8ee34d3 \
     --hash=sha256:8fc0819f1f30ba15bdb34cceffb9ef04d99f420f68eb75d901e9560b8749fc41 \
     # via -r requirements.in, requests, sentry-sdk
 chardet==3.0.4 \
     --hash=sha256:84ab92ed1c4d4f16916e05906b6b75a6c0fb5db821cc65e70cbd64a3e2a5eaae \
     --hash=sha256:fc323ffcaeaed0e0a02bf4d117757b98aed530d9ed4531e3e15460124c106691 \
     # via -r requirements.in, requests
+colorama==0.4.4 \
+    --hash=sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2 \
+    # via -r requirements.in, sphinx
 commonmark==0.9.1 \
     --hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \
     --hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9 \
     # via -r requirements.in, recommonmark
 docutils==0.16 \
     --hash=sha256:0c5b78adfbf7762415433f5515cd5c9e762339e23369dbe8000d84a4bf4ab3af \
     --hash=sha256:c2de3a60e9e7d07be26b7f2b00ca0309c207e06c100f9cc2a94931fc75a478fc \
     # via -r requirements.in, recommonmark, sphinx, sphinx-js

yeah, it looks good, many thanks

Would you be ok to submit a patch or should i?

Version: 3 Branch → unspecified
Component: General → Generated Documentation

I'll submit it, I just wasn't sure enough that the thing I was doing was anything like the right thing.

Assignee: nobody → mhowell
Status: NEW → ASSIGNED

This diff looks busy, but the only actual change is the addition of colorama to
the list; everything else is just formatting changes that the pip-compile tool
generated for me.

Pushed by mhowell@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/80fe6cfe5e6a
Regenerate requirements.txt so it includes colorama. r=firefox-source-docs-reviewers,sylvestre
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 87 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: