Closed
Bug 1660288
Opened 4 years ago
Closed 4 years ago
Lint hook broken after python updates
Categories
(Developer Infrastructure :: Lint and Formatting, defect, P2)
Developer Infrastructure
Lint and Formatting
Tracking
(firefox81 fixed)
RESOLVED
FIXED
81 Branch
Tracking | Status | |
---|---|---|
firefox81 | --- | fixed |
People
(Reporter: Gijs, Assigned: Gijs)
Details
Attachments
(1 file)
Commit produces:
File "path/to/tools/lint/hooks.py", line 50, in hg
return run_mozlint(hooktype, kwargs.get("pats", []))
File "path/to/tools/lint/hooks.py", line 37, in run_mozlint
if "commit" in hooktype:
TypeError: a bytes-like object is required, not 'str'
Mark or :ahal, do you know what this is about? I've had to disable the lint hook so I can commit...
Flags: needinfo?(standard8)
Flags: needinfo?(ahal)
Comment 1•4 years ago
|
||
Ah, likely you upgraded Mercurial to a version that uses Python 3 by default.
For context, Mercurial uses byte strings internally, which is the default string type with Python 2, but is incompatible with the default type in Python 3. I'm surprised it took this long for a bug be filed..
I'll add this to my queue (though I'm a bit swamped with the layoffs atm).
Severity: -- → S2
Flags: needinfo?(standard8)
Flags: needinfo?(ahal)
Priority: -- → P2
Updated•4 years ago
|
Assignee: nobody → ahal
Status: NEW → ASSIGNED
Assignee | ||
Comment 2•4 years ago
|
||
comment #1 is enough context that I think I can just fix this - thanks! I'll steal this and you can steal it back if my patch is rubbish. :-)
Assignee | ||
Updated•4 years ago
|
Assignee: ahal → gijskruitbosch+bugs
Assignee | ||
Comment 3•4 years ago
|
||
Pushed by gijskruitbosch@gmail.com: https://hg.mozilla.org/integration/autoland/rev/5f006849e5c5 fix python3 errors in the linter's hooks.py tripped when using python3-based mercurial, r=ahal
Pushed by rmaries@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/662ab7cde7da Fixing the lint failure. CLOSED TREE
Comment 6•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/5f006849e5c5
https://hg.mozilla.org/mozilla-central/rev/662ab7cde7da
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
status-firefox81:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
Updated•2 years ago
|
Product: Firefox Build System → Developer Infrastructure
You need to log in
before you can comment on or make changes to this bug.
Description
•