diff -Nru python-jmespath-0.9.4/debian/changelog python-jmespath-0.9.4/debian/changelog --- python-jmespath-0.9.4/debian/changelog 2019-10-26 20:53:02.000000000 -0400 +++ python-jmespath-0.9.4/debian/changelog 2021-10-08 08:56:43.000000000 -0400 @@ -1,3 +1,12 @@ +python-jmespath (0.9.4-2ubuntu1) focal; urgency=medium + + * d/p/0001-satisfy-python38-syntaxwarning.patch: + - Python 3.8 raises a syntax warning when using + is to compare integers or string literals. + (LP: #1877792) + + -- Eric Desrochers Fri, 08 Oct 2021 08:56:43 -0400 + python-jmespath (0.9.4-2) unstable; urgency=medium [ Ondřej Nový ] diff -Nru python-jmespath-0.9.4/debian/patches/0001-satisfy-python38-syntaxwarning.patch python-jmespath-0.9.4/debian/patches/0001-satisfy-python38-syntaxwarning.patch --- python-jmespath-0.9.4/debian/patches/0001-satisfy-python38-syntaxwarning.patch 1969-12-31 20:00:00.000000000 -0400 +++ python-jmespath-0.9.4/debian/patches/0001-satisfy-python38-syntaxwarning.patch 2021-10-08 08:56:28.000000000 -0400 @@ -0,0 +1,33 @@ +Descriptions: Change is to == to satisfy python 3.8 SyntaxWarning + Python 3.8 raises a syntax warning when using is to compare + integers or string literals. + + Fixes https://github.com/jmespath/jmespath.py/issues/187 + +Author: Michael Neil +Bug: https://github.com/jmespath/jmespath.py/issues/187 +Bug-Ubuntu: https://launchpad.net/bugs/1877792 +Bug-debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953534 +--- a/jmespath/visitor.py ++++ b/jmespath/visitor.py +@@ -29,9 +29,9 @@ + # Also need to consider that: + # >>> 0 in [True, False] + # True +- if x is 0 or x is 1: ++ if type(x) is int and (x == 0 or x == 1): + return y is True or y is False +- elif y is 0 or y is 1: ++ elif type(y) is int and (y == 0 or y == 1): + return x is True or x is False + + +@@ -257,7 +257,7 @@ + + def visit_not_expression(self, node, value): + original_result = self.visit(node['children'][0], value) +- if original_result is 0: ++ if type(original_result) is int and original_result == 0: + # Special case for 0, !0 should be false, not true. + # 0 is not a special cased integer in jmespath. + return False diff -Nru python-jmespath-0.9.4/debian/patches/series python-jmespath-0.9.4/debian/patches/series --- python-jmespath-0.9.4/debian/patches/series 1969-12-31 20:00:00.000000000 -0400 +++ python-jmespath-0.9.4/debian/patches/series 2021-10-08 08:55:50.000000000 -0400 @@ -0,0 +1 @@ +0001-satisfy-python38-syntaxwarning.patch