diff -Nru python-jmespath-0.9.3/debian/changelog python-jmespath-0.9.3/debian/changelog --- python-jmespath-0.9.3/debian/changelog 2018-02-14 15:22:36.000000000 -0500 +++ python-jmespath-0.9.3/debian/changelog 2021-10-08 08:50:18.000000000 -0400 @@ -1,3 +1,12 @@ +python-jmespath (0.9.3-1ubuntu1.1) bionic; 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:50:18 -0400 + python-jmespath (0.9.3-1ubuntu1) bionic; urgency=medium * d/gbp.conf: Update gbp configuration file. diff -Nru python-jmespath-0.9.3/debian/patches/0001-satisfy-python38-syntaxwarning.patch python-jmespath-0.9.3/debian/patches/0001-satisfy-python38-syntaxwarning.patch --- python-jmespath-0.9.3/debian/patches/0001-satisfy-python38-syntaxwarning.patch 1969-12-31 20:00:00.000000000 -0400 +++ python-jmespath-0.9.3/debian/patches/0001-satisfy-python38-syntaxwarning.patch 2021-10-08 08:50:18.000000000 -0400 @@ -0,0 +1,35 @@ +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 +diff --git a/jmespath/visitor.py b/jmespath/visitor.py +index 2c783e5..b3e846b 100644 +--- a/jmespath/visitor.py ++++ b/jmespath/visitor.py +@@ -29,9 +29,9 @@ def _is_special_integer_case(x, y): + # 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_and_expression(self, node, value): + + 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.3/debian/patches/series python-jmespath-0.9.3/debian/patches/series --- python-jmespath-0.9.3/debian/patches/series 1969-12-31 20:00:00.000000000 -0400 +++ python-jmespath-0.9.3/debian/patches/series 2021-10-08 08:49:39.000000000 -0400 @@ -0,0 +1 @@ +0001-satisfy-python38-syntaxwarning.patch