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-27 02:53:02.000000000 +0200 +++ python-jmespath-0.9.4/debian/changelog 2021-03-28 00:16:24.000000000 +0100 @@ -1,3 +1,9 @@ +python-jmespath (0.9.4-2ubuntu1) focal; urgency=medium + + * backport upstream patch 6263b84cdb0feb. LP: #1917318 + + -- Rolf Leggewie Sun, 28 Mar 2021 00:16:24 +0100 + python-jmespath (0.9.4-2) unstable; urgency=medium [ Ondřej Nový ] diff -Nru python-jmespath-0.9.4/debian/patches/56263b84cdb0feb7c8d54e426ec472f4dd0de44f.patch python-jmespath-0.9.4/debian/patches/56263b84cdb0feb7c8d54e426ec472f4dd0de44f.patch --- python-jmespath-0.9.4/debian/patches/56263b84cdb0feb7c8d54e426ec472f4dd0de44f.patch 1970-01-01 01:00:00.000000000 +0100 +++ python-jmespath-0.9.4/debian/patches/56263b84cdb0feb7c8d54e426ec472f4dd0de44f.patch 2021-03-28 00:16:07.000000000 +0100 @@ -0,0 +1,38 @@ +From 56263b84cdb0feb7c8d54e426ec472f4dd0de44f Mon Sep 17 00:00:00 2001 +From: Michael Neil +Date: Fri, 25 Oct 2019 10:48:39 -0700 +Subject: [PATCH] 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 +--- + jmespath/visitor.py | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +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.4/debian/patches/series python-jmespath-0.9.4/debian/patches/series --- python-jmespath-0.9.4/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ python-jmespath-0.9.4/debian/patches/series 2021-03-28 00:16:07.000000000 +0100 @@ -0,0 +1 @@ +56263b84cdb0feb7c8d54e426ec472f4dd0de44f.patch