15
0

- update to 1.0.1:

* Drop support for Python versions less than 3.7 (including Python 2).

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-jmespath?expand=0&rev=43
This commit is contained in:
2023-01-06 13:08:21 +00:00
committed by Git OBS Bridge
parent 44cd312eed
commit 30f0830f62
6 changed files with 38 additions and 47 deletions

23
217.patch Normal file
View File

@@ -0,0 +1,23 @@
From 325d8111a924a951d8778c9fc1dbce30be267435 Mon Sep 17 00:00:00 2001
From: Karthikeyan Singaravelan <tir.karthi@gmail.com>
Date: Wed, 10 Mar 2021 14:15:36 +0000
Subject: [PATCH] Use list for random.sample since using a set has been
deprecated since Python 3.9
---
jmespath/parser.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/jmespath/parser.py b/jmespath/parser.py
index eeac38fa..47066880 100644
--- a/jmespath/parser.py
+++ b/jmespath/parser.py
@@ -489,7 +489,7 @@ def _raise_parse_error_maybe_eof(self, expected_type, token):
lex_position, actual_value, actual_type, message)
def _free_cache_entries(self):
- for key in random.sample(self._CACHE.keys(), int(self._MAX_SIZE / 2)):
+ for key in random.sample(list(self._CACHE.keys()), int(self._MAX_SIZE / 2)):
self._CACHE.pop(key, None)
@classmethod