Closed Bug 1628954 Opened 4 years ago Closed 4 years ago

[py3.8] third_party/python/gyp/pylib/gyp/input.py:1186: SyntaxWarning: "is" with a literal. Did you mean "=="?

Categories

(Firefox Build System :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: glandium, Assigned: rstewart)

Details

Attachments

(2 files)

Running configure with python 3.8 issues the warning in the summary. It doesn't fail, though.

Other similar warnings during the build:

xpcom/ds/StaticAtoms.py:2585: SyntaxWarning: "is" with a literal. Did you mean "=="?
   if atom.atom_type is "PseudoElementAtom":
xpcom/ds/StaticAtoms.py:2589: SyntaxWarning: "is" with a literal. Did you mean "=="?
   elif atom.atom_type is "NonInheritingAnonBoxAtom" or atom.atom_type is "InheritingAnonBoxAtom":
xpcom/ds/StaticAtoms.py:2589: SyntaxWarning: "is" with a literal. Did you mean "=="?
   elif atom.atom_type is "NonInheritingAnonBoxAtom" or atom.atom_type is "InheritingAnonBoxAtom":
dom/bindings/GenerateCSS2PropertiesWebIDL.py:26: SyntaxWarning: "is not" with a literal. Did you mean "!="?
    if p.pref is not "":
Assignee: nobody → rstewart
Status: NEW → ASSIGNED
Pushed by rstewart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d829918b75e1
Don't use 'is' and 'is not' to perform comparison against strings in Python r=nalexander

You left out the gyp one.

Whoops, my fault for not checking thoroughly in the title as well as the body of the post :)

It's third_party code. Do we have qualms with just making drive-by changes in-tree to third party code? I can throw together a PR since the problem still hasn't been fixed at HEAD and then update the vendored library but that'll take (substantially?) longer.

Keywords: leave-open

Considering current master of gyp is what we have in tree, and the rate of change in the gyp upstream repo, it looks like waiting for an upstream PR to be merged would only guarantee a delay, while it's likely that whenever we'd need to update gyp in the future the PR would have been merged and we wouldn't need to care about losing a local change to the vendored library.

That said, if you're going to file an upstream PR, it'd be good to fix MsvsSettings._TargetConfig too (see bug 1627163).

Pushed by rstewart@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/5d4a4de4bcff
Fix bad string comparison in gyp r=dmajor
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: