diff options
| author | Michael Williamson <mike@zwobble.org> | 2023-09-10 10:57:30 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2023-09-10 10:57:30 +0100 |
| commit | 805705dde4beb9db9a1743663d415198fb02eb1a (patch) | |
| tree | e75f0d81c79bb0ee05e87d0aadbd548673106bbe | |
| parent | e3ca07410215abdbf457dbd1b430d5111e98d85a (diff) | |
Update to jq 1.7
| -rw-r--r-- | CHANGELOG.rst | 2 | ||||
| -rw-r--r-- | README.rst | 4 | ||||
| -rw-r--r-- | deps/jq-1.6.tar.gz | bin | 1750584 -> 0 bytes | |||
| -rw-r--r-- | deps/jq-1.7.tar.gz | bin | 0 -> 1905863 bytes | |||
| -rw-r--r-- | deps/onig-6.9.4.tar.gz | bin | 908702 -> 0 bytes | |||
| -rw-r--r-- | deps/onig-6.9.8.tar.gz | bin | 0 -> 944148 bytes | |||
| -rw-r--r-- | setup.py | 6 | ||||
| -rw-r--r-- | tests/jq_old_tests.py | 9 | ||||
| -rw-r--r-- | tests/jq_tests.py | 11 |
9 files changed, 22 insertions, 10 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 13877aa..03c401c 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -4,6 +4,8 @@ Changelog 1.6.0 ----- +* Update to jq 1.7. + * Add support for building with Cython 3. * Add support for building with the system libjq and libonig instead of building @@ -2,7 +2,7 @@ jq.py: a lightweight and flexible JSON processor ================================================ This project contains Python bindings for -`jq <http://stedolan.github.io/jq/>`_. +`jq <http://stedolan.github.io/jq/>`_ 1.7. 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.6 is built. +the source for jq 1.7 is built. This requires: * Autoreconf diff --git a/deps/jq-1.6.tar.gz b/deps/jq-1.6.tar.gz Binary files differdeleted file mode 100644 index b2ee039..0000000 --- a/deps/jq-1.6.tar.gz +++ /dev/null diff --git a/deps/jq-1.7.tar.gz b/deps/jq-1.7.tar.gz Binary files differnew file mode 100644 index 0000000..07e6d39 --- /dev/null +++ b/deps/jq-1.7.tar.gz diff --git a/deps/onig-6.9.4.tar.gz b/deps/onig-6.9.4.tar.gz Binary files differdeleted file mode 100644 index e6ec060..0000000 --- a/deps/onig-6.9.4.tar.gz +++ /dev/null diff --git a/deps/onig-6.9.8.tar.gz b/deps/onig-6.9.8.tar.gz Binary files differnew file mode 100644 index 0000000..fea0f0e --- /dev/null +++ b/deps/onig-6.9.8.tar.gz @@ -24,10 +24,10 @@ def _read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() -jq_lib_tarball_path = _dep_source_path("jq-1.6.tar.gz") -jq_lib_dir = _dep_build_path("jq-1.6") +jq_lib_tarball_path = _dep_source_path("jq-1.7.tar.gz") +jq_lib_dir = _dep_build_path("jq-1.7") -oniguruma_version = "6.9.4" +oniguruma_version = "6.9.8" oniguruma_lib_tarball_path = _dep_source_path("onig-{}.tar.gz".format(oniguruma_version)) oniguruma_lib_build_dir = _dep_build_path("onig-{}".format(oniguruma_version)) oniguruma_lib_install_dir = _dep_build_path("onig-install-{}".format(oniguruma_version)) diff --git a/tests/jq_old_tests.py b/tests/jq_old_tests.py index f7e1f0d..9393cce 100644 --- a/tests/jq_old_tests.py +++ b/tests/jq_old_tests.py @@ -74,8 +74,13 @@ def test_value_error_is_raised_if_program_is_invalid(): jq("!") assert False, "Expected error" except ValueError as error: - expected_error_str = "jq: error: syntax error, unexpected INVALID_CHARACTER, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:\n!\njq: 1 compile error" - assert_equal(str(error), expected_error_str) + expected_error_strs = [ + # jq 1.6 + "jq: error: syntax error, unexpected INVALID_CHARACTER, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:\n!\njq: 1 compile error", + # jq 1.7 + "jq: error: syntax error, unexpected INVALID_CHARACTER, expecting end of file (Unix shell quoting issues?) at <top-level>, line 1:\n!\njq: 1 compile error", + ] + assert str(error) in expected_error_strs def test_value_error_is_raised_if_input_cannot_be_processed_by_program(): diff --git a/tests/jq_tests.py b/tests/jq_tests.py index bf40679..c911ef5 100644 --- a/tests/jq_tests.py +++ b/tests/jq_tests.py @@ -23,7 +23,7 @@ def test_can_add_one_to_each_element_of_an_array(): def test_nan_is_outputted_as_null(): assert_equal( None, - jq.compile("0/0").input(0).first(), + jq.compile("nan").input(0).first(), ) @@ -194,8 +194,13 @@ def test_value_error_is_raised_if_program_is_invalid(): jq.compile("!") assert False, "Expected error" except ValueError as error: - expected_error_str = "jq: error: syntax error, unexpected INVALID_CHARACTER, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:\n!\njq: 1 compile error" - assert_equal(str(error), expected_error_str) + expected_error_strs = [ + # jq 1.6 + "jq: error: syntax error, unexpected INVALID_CHARACTER, expecting $end (Unix shell quoting issues?) at <top-level>, line 1:\n!\njq: 1 compile error", + # jq 1.7 + "jq: error: syntax error, unexpected INVALID_CHARACTER, expecting end of file (Unix shell quoting issues?) at <top-level>, line 1:\n!\njq: 1 compile error", + ] + assert str(error) in expected_error_strs def test_value_error_is_raised_if_input_cannot_be_processed_by_program(): |
