code confuses identity and equality (upstream issue)

Bug #1898768 reported by Eric Seppanen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-jmespath (Ubuntu)
New
Undecided
Unassigned

Bug Description

During apt install of the python3-jmespath package the following is displayed:

Setting up python3-jmespath (0.9.4-2) ...
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if x is 0 or x is 1:
/usr/lib/python3/dist-packages/jmespath/visitor.py:32: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if x is 0 or x is 1:
/usr/lib/python3/dist-packages/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif y is 0 or y is 1:
/usr/lib/python3/dist-packages/jmespath/visitor.py:34: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif y is 0 or y is 1:
/usr/lib/python3/dist-packages/jmespath/visitor.py:260: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if original_result is 0:

It's not clear to me if it's an actual bug, but either it is and should be fixed, or it isn't and the scary warning messages should be suppressed.

Rolf Leggewie (r0lf)
summary: - multiple SyntaxWarning messages displayed during install
+ code confuses identity and equality (upstream issue)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.