python-jmespath: bump to 1.1.0
authorAlexandru Ardelean <redacted>
Sun, 29 Mar 2026 12:43:53 +0000 (12:43 +0000)
committerAlexandru Ardelean <redacted>
Wed, 1 Apr 2026 07:29:27 +0000 (10:29 +0300)
Changes since 1.0.1:
- Support for multi-select list/hash expressions with enhanced
  function argument validation
- Minor performance improvements in expression parsing

Also add test.sh to verify field access, wildcards, and filters.

Link: https://github.com/jmespath/jmespath.py/blob/develop/CHANGELOG.rst
Signed-off-by: Alexandru Ardelean <redacted>
lang/python/python-jmespath/Makefile
lang/python/python-jmespath/test.sh [new file with mode: 0755]

index bc1181ef1d881286018935363b14abefc92a62b1..c3cda14d1189a3180922a9bc3a2677b48d7788d4 100644 (file)
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=python-jmespath
-PKG_VERSION:=1.0.1
+PKG_VERSION:=1.1.0
 PKG_RELEASE:=1
 
 PYPI_NAME:=jmespath
-PKG_HASH:=90261b206d6defd58fdd5e85f478bf633a2901798906be2ad389150c5c60edbe
+PKG_HASH:=472c87d80f36026ae83c6ddd0f1d05d4e510134ed462851fd5f754c8c3cbb88d
 
 PKG_MAINTAINER:=Daniel Danzberger <daniel@dd-wrt.com>
 PKG_LICENSE:=MIT
diff --git a/lang/python/python-jmespath/test.sh b/lang/python/python-jmespath/test.sh
new file mode 100755 (executable)
index 0000000..128cd0b
--- /dev/null
@@ -0,0 +1,39 @@
+#!/bin/sh
+
+[ "$1" = "python3-jmespath" ] || exit 0
+
+python3 - << EOF
+import sys
+import jmespath
+
+if jmespath.__version__ != "$2":
+    print("Wrong version: " + jmespath.__version__)
+    sys.exit(1)
+
+# Basic field access
+data = {"name": "Alice", "age": 30}
+assert jmespath.search("name", data) == "Alice"
+assert jmespath.search("age", data) == 30
+assert jmespath.search("missing", data) is None
+
+# Nested access
+data = {"a": {"b": {"c": 42}}}
+assert jmespath.search("a.b.c", data) == 42
+
+# Array indexing and slicing
+data = {"items": [1, 2, 3, 4, 5]}
+assert jmespath.search("items[0]", data) == 1
+assert jmespath.search("items[-1]", data) == 5
+assert jmespath.search("items[1:3]", data) == [2, 3]
+
+# Wildcard and filter
+data = {"people": [{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}]}
+assert jmespath.search("people[].name", data) == ["Alice", "Bob"]
+assert jmespath.search("people[?age > \`28\`].name", data) == ["Alice"]
+
+# Pre-compiled expression
+expr = jmespath.compile("a.b")
+assert expr.search({"a": {"b": 99}}) == 99
+
+sys.exit(0)
+EOF
git clone https://git.99rst.org/PROJECT