summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2024-03-10 12:09:13 +0000
committerMichael Williamson <mike@zwobble.org>2024-03-16 17:54:24 +0000
commit6ea34a4435fa549ea14c37b937d17af607afd6d4 (patch)
treea3d6d0c42772d8101ca456a38f5068bb349df3a0
parentb345d2c75c0768ba8e58d75e69721d3b97564463 (diff)
Update to jq 1.7.1
-rw-r--r--CHANGELOG.rst2
-rw-r--r--README.rst4
-rw-r--r--deps/jq-1.7.1.tar.gzbin0 -> 1950645 bytes
-rw-r--r--deps/jq-1.7.tar.gzbin1905863 -> 0 bytes
-rw-r--r--setup.py4
-rw-r--r--tests/jq_tests.py16
6 files changed, 19 insertions, 7 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index 8a30a3f..1e14bde 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -4,6 +4,8 @@ Changelog
1.7.0
-----
+* Update to jq 1.7.1.
+
* Include tox.ini in sdist.
* Use the version of oniguruma distributed with jq.
diff --git a/README.rst b/README.rst
index 9e90d73..d1a4210 100644
--- a/README.rst
+++ b/README.rst
@@ -2,7 +2,7 @@ jq.py: a lightweight and flexible JSON processor
================================================
This project contains Python bindings for
-`jq <http://stedolan.github.io/jq/>`_ 1.7.
+`jq <http://stedolan.github.io/jq/>`_ 1.7.1.
Installation
------------
@@ -15,7 +15,7 @@ On these platforms, you should be able to install jq with a normal pip install:
pip install jq
If a wheel is not available,
-the source for jq 1.7 is built.
+the source for jq 1.7.1 is built.
This requires:
* Autoreconf
diff --git a/deps/jq-1.7.1.tar.gz b/deps/jq-1.7.1.tar.gz
new file mode 100644
index 0000000..40718ba
--- /dev/null
+++ b/deps/jq-1.7.1.tar.gz
Binary files differ
diff --git a/deps/jq-1.7.tar.gz b/deps/jq-1.7.tar.gz
deleted file mode 100644
index 07e6d39..0000000
--- a/deps/jq-1.7.tar.gz
+++ /dev/null
Binary files differ
diff --git a/setup.py b/setup.py
index 73f8b94..de0b635 100644
--- a/setup.py
+++ b/setup.py
@@ -24,8 +24,8 @@ def _read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
-jq_lib_tarball_path = _dep_source_path("jq-1.7.tar.gz")
-jq_lib_dir = _dep_build_path("jq-1.7")
+jq_lib_tarball_path = _dep_source_path("jq-1.7.1.tar.gz")
+jq_lib_dir = _dep_build_path("jq-1.7.1")
class jq_with_deps_build_ext(build_ext):
def run(self):
diff --git a/tests/jq_tests.py b/tests/jq_tests.py
index c911ef5..62b3ae0 100644
--- a/tests/jq_tests.py
+++ b/tests/jq_tests.py
@@ -319,9 +319,19 @@ class TestJvToPython(object):
def test_given_json_text_then_strings_containing_null_characters_are_preserved(self):
program = jq.compile(".")
- result = program.input(text='"a\x00b"').first()
-
- assert_equal("a\x00b", result)
+ # Before jq 1.7.1, we expect jq to accept the literal null character.
+ # From jq 1.7.1, we expect jq to reject the literal null character.
+
+ try:
+ result = program.input(text='"a\x00b"').first()
+
+ assert_equal("a\x00b", result)
+ except ValueError as error:
+ assert_equal(
+ "parse error: Invalid string: control characters from U+0000 " +
+ "through U+001F must be escaped at line 1, column 5",
+ str(error),
+ )
def test_program_preserves_arrays(self):
program = jq.compile(".")