Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
125 commits
Select commit Hold shift + click to select a range
f2f1c23
Update to setup-python v4
mwilliamson Sep 19, 2022
00e953c
Print build identifiers when not building wheels
mwilliamson Sep 19, 2022
62d0cad
Move CIBW env vars to job to remove duplication
mwilliamson Sep 19, 2022
2af8e69
Update cibuildwheel to 2.10.1
mwilliamson Sep 19, 2022
39f7717
Use --only to simplify use of cibuildwheel
mwilliamson Sep 19, 2022
a6b7cd6
Use cibuildwheel --print-build-identifiers to generate matrix
mwilliamson Sep 19, 2022
3436957
Only upload artifacts when building wheels
mwilliamson Sep 19, 2022
a5499d7
Use cibuildwheel arch of auto instead of auto64
mwilliamson Sep 19, 2022
8fd96fd
Use macos-11 instead of macos-10.15
mwilliamson Sep 19, 2022
a35d31c
Configure cibuildwheel in pyproject.toml
mwilliamson Sep 19, 2022
469d3a7
Always print build identifiers
mwilliamson Sep 19, 2022
8408083
Build sample wheel when not releasing
mwilliamson Sep 19, 2022
b405a2e
Store dependency tarballs in the repo instead of downloading
mwilliamson Sep 19, 2022
c4f2225
Update changelog for deps being stored in the source distribution
mwilliamson Sep 19, 2022
1a51255
Bump version to 1.3.0
mwilliamson Sep 19, 2022
cccaea7
Update GitHub workflow command for setting output
mwilliamson Oct 14, 2022
073ea85
Update handling of non-finite numbers to match jq 1.6
mwilliamson Jan 6, 2023
0bf9a05
Update cibuildwheel to v2.11.4
mwilliamson Jan 6, 2023
228d02c
Bump version to 1.4.0
mwilliamson Jan 6, 2023
125196c
Handle decoding of strings containing null bytes
mwilliamson Mar 16, 2023
7a2648d
Handle null bytes in object keys
mwilliamson Mar 16, 2023
7a09606
Handle null bytes in text input
mwilliamson Mar 16, 2023
bece8d1
Use more specific type for param
mwilliamson Mar 16, 2023
97e68fb
Use more specific type for field
mwilliamson Mar 16, 2023
df42a12
Use jv_string_to_py_string to decode error messages
mwilliamson Mar 16, 2023
75ca365
Update changelog
mwilliamson Mar 16, 2023
76d19bd
Tag 1.4.1
mwilliamson Mar 16, 2023
f63955a
Update checkout action
mwilliamson May 1, 2023
f99805e
Update to Python 3.11
mwilliamson May 1, 2023
ebe793e
Update cibuildwheel to 2.12.3
mwilliamson May 1, 2023
a67793c
Update upload-artifact action to v3
mwilliamson May 1, 2023
294bcf6
Update setup-qemu-action to v2
mwilliamson May 1, 2023
86cebe2
Add input_value() and input_text()
mwilliamson May 1, 2023
1bf642c
Update docs
mwilliamson May 1, 2023
69804ec
Support multiple input values
mwilliamson May 1, 2023
888d373
Remove unused variable
mwilliamson May 1, 2023
bebc365
Add slurp support
mwilliamson May 1, 2023
b05b927
Test slurping of empty input text
mwilliamson May 1, 2023
9f088d1
Fix grammar in README
mwilliamson May 1, 2023
9039553
Document input_values()
mwilliamson May 2, 2023
77e2c21
Bump version to 1.5.0a1
mwilliamson May 2, 2023
8c71f78
Fix heading
mwilliamson May 5, 2023
58652a2
Upgrade Cython Version to Support Python 3.12
zprobst Jun 12, 2023
7463bb8
Run tests on Python 3.12 on GitHub Actions
mwilliamson Jun 12, 2023
22529ee
Update cibuildwheel to 2.15.0
mwilliamson Aug 29, 2023
fd61405
Build macOS arm64 wheels on Cirrus CI
mwilliamson Aug 30, 2023
3b23bc8
Update changelog
mwilliamson Aug 30, 2023
0642884
Bump version to 1.5.0
mwilliamson Aug 30, 2023
c2c7ed1
Add explicit noexcept to _store_error for Cython 3 compatibility
mwilliamson Aug 31, 2023
53b4c25
Add environment variable for using system libjq and libonig
mwilliamson Sep 1, 2023
e3ca074
Use HTTPS URL
mwilliamson Sep 10, 2023
805705d
Update to jq 1.7
mwilliamson Sep 10, 2023
bb95e41
Include tests in sdist
mwilliamson Sep 10, 2023
3ba1f44
Bump version to 1.6.0
mwilliamson Sep 12, 2023
9def21d
Include tox.ini in sdist
mwilliamson Nov 10, 2023
b345d2c
Use the version of oniguruma distributed with jq
mwilliamson Nov 10, 2023
6ea34a4
Update to jq 1.7.1
mwilliamson Mar 10, 2024
1422a63
Update link to jq
mwilliamson Mar 16, 2024
a868e8d
Invoke Python commands through python3 on Cirrus CI
mwilliamson Mar 16, 2024
730b4ad
Skip building wheels for cp38-macosx_arm64
mwilliamson Mar 16, 2024
b8ac467
Update cibuildwheel to 2.17.0
mwilliamson Mar 16, 2024
71810ea
Use Python 3.12 instead of 3.12-dev
mwilliamson Mar 16, 2024
f998268
Update GitHub Action versions
mwilliamson Mar 16, 2024
dec5085
Update to macos-13 in GitHub Actions
mwilliamson Mar 16, 2024
d402f44
Build macOS arm64 wheels on GitHub Actions instead of Cirrus CI
mwilliamson Mar 16, 2024
b98fcab
Bump version to 1.7.0
mwilliamson Mar 16, 2024
4d21020
Bump version to 1.7.0.post1
spbnick Nov 29, 2021
c9d2060
Propagate slurp through all program input methods
spbnick May 16, 2024
4fed62a
Use PyBytes_AsStringAndSize()
spbnick Sep 9, 2020
d4a2145
Support parsing application/json-seq
spbnick May 30, 2024
d8e192c
Add parse_json() and parse_json_file()
spbnick May 30, 2024
c79ea60
Switch _ResultIterator to using _Parser
spbnick May 30, 2024
6cd42e3
Document a couple constructors
spbnick May 30, 2024
f653b75
Add generated jq.c
spbnick Sep 22, 2020
40afa8c
Actions: Disable Python 3.5 to avoid pypi SSL errors
spbnick May 31, 2024
b2e4d2a
add support for building wheel on windows (mingw)
du33169 May 20, 2024
45033e0
Fixed build failure on win32 & removed failed windows cibw-only
du33169 May 20, 2024
375925c
Move steps for windows wheels to a new job
du33169 May 23, 2024
6ec4fb2
Reset if: build all wheels only on tags
du33169 May 23, 2024
ffff967
Drop support for Python 3.5
mwilliamson Jun 8, 2024
b55076b
Add Python 3.12 to tox and classifiers
mwilliamson Jun 8, 2024
ba738d2
Simplify building of Windows wheels
mwilliamson Jun 13, 2024
a546190
Extract action to set up msys2
mwilliamson Jun 14, 2024
e9f741a
Combine Windows wheel job into main wheel job
mwilliamson Jun 14, 2024
6bbcf5a
Disable all steps in job when not building wheel
mwilliamson Jun 14, 2024
8c3f685
Don't print build identifiers when building specific wheel
mwilliamson Jun 14, 2024
1095c71
Reference msys2 without full path
mwilliamson Jun 14, 2024
8d1ebc8
Update changelog for Windows wheels
mwilliamson Jun 14, 2024
6e20eb2
Bump version to 1.8.0a1
mwilliamson Jun 14, 2024
62fd502
Disable Windows wheels for CPython 3.6 and PyPy
mwilliamson Jun 14, 2024
58094ab
Bump version to 1.8.0a2
mwilliamson Jun 14, 2024
21363fd
Update setup-qemu-action to v3
mwilliamson Jun 15, 2024
ed0fda4
Update upload-artifact action to v4
mwilliamson Jun 15, 2024
ad65d02
Add noexcept to _is_integer()
mwilliamson Aug 14, 2024
c378eeb
Handle exception in _store_error()
mwilliamson Aug 14, 2024
2202e11
chore: build for 3.13
GabDug Aug 3, 2024
3dc02c5
ci: test all built pypy versions
GabDug Aug 3, 2024
cfc6b8f
chore: update cibuildwheel
GabDug Aug 4, 2024
c596bc9
Update changelog with Python 3.13 support
mwilliamson Aug 15, 2024
0d172bb
Bump version to 1.8.0
mwilliamson Aug 15, 2024
3f226f2
Handle non-string errors with constant
mwilliamson Mar 2, 2025
2d4da7b
Convert non-string errors into JSON text
mwilliamson Mar 2, 2025
f4cd799
Drop support for Python 3.6
mwilliamson Mar 2, 2025
a5c3957
Update GitHub Ubuntu runners to 22.04
mwilliamson Mar 2, 2025
59a3f0c
Include jq.pyx instead of jq.c
mwilliamson Mar 9, 2025
985cce3
Add explanatory comment for MS_WIN64
mwilliamson Mar 9, 2025
024ff85
Fix Windows build on GitHub Actions
mwilliamson Jun 14, 2025
63de8b5
Update to jq 1.8.0
mwilliamson Jun 14, 2025
e5d037d
Bump version to 1.9.0
mwilliamson Jun 14, 2025
71527bf
Update docs to refer to jq 1.8.0
mwilliamson Jun 14, 2025
2ad4943
Add note that 1.9.0 is unreleased
mwilliamson Jun 14, 2025
e213e3d
Fix build for musl
mwilliamson Jun 14, 2025
173ae14
Always build a wheel for musl
mwilliamson Jun 14, 2025
9146109
Bump version to 1.9.1
mwilliamson Jun 14, 2025
367da11
Always build wheels for cp310-macosx_x86_64
mwilliamson Jun 14, 2025
db6cf3f
Update cibuildwheel to 2.23.3
mwilliamson Jun 14, 2025
0c62566
Update cython to 3.1.2
mwilliamson Jun 14, 2025
a558ccd
Drop support for Python 3.7
mwilliamson Jun 14, 2025
81a3dea
Use Python 3.13 instead of 3.13-dev in GitHub Actions workflow
mwilliamson Jun 14, 2025
90d422f
Remove support for PyPy 3.7
mwilliamson Jun 14, 2025
208ccc1
Drop support for PyPy 3.8
mwilliamson Jun 15, 2025
9cd5c3f
Add dropping of PyPy 3.8 support in changelog
mwilliamson Jun 15, 2025
bb60951
Remove PyPy 3.8 from tests in GitHub Actions workflow
mwilliamson Jun 15, 2025
fd58266
Bump version to 1.9.1.post1
tollsimy Jul 11, 2025
8b3c6dc
Add generated jq.c
tollsimy Jul 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/actions/setup-msys2/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: 'Setup msys2'
inputs:
arch:
required: true
runs:
using: "composite"
steps:
- name: Set up MSYS2
id: set-up-msys2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ inputs.arch == 'x86' && 'mingw32' || 'ucrt64' }}
install: make mingw-w64-${{ inputs.arch == 'x86' && 'i686' || 'ucrt-x86_64' }}-gcc patch

- name: Set PATH for x86
if: ${{ inputs.arch == 'x86' }}
shell: msys2 {0}
run: echo "${{ steps.set-up-msys2.outputs.msys2-location }}/mingw32/bin" >> "$GITHUB_PATH"
160 changes: 124 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,47 @@ jobs:

strategy:
matrix:
os: [ubuntu-20.04, macos-10.15]
python-version: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10", "3.11-dev", pypy3]
os: [ubuntu-22.04, macos-13]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "3.13", "pypy-3.9", "pypy-3.10"]
use-system-libs: [false]
include:
- os: ubuntu-22.04
python-version: "3.11"
use-system-libs: true

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- run: pip install tox virtualenv

- run: "make jq.c"

- run: tox -e py
if: ${{ !matrix.use-system-libs }}

- run: |
# Remove deps to make sure they're not being used
rm -r deps

sudo apt-get install -y libjq-dev libonig-dev

JQPY_USE_SYSTEM_LIBS=1 tox -e py
if: ${{ matrix.use-system-libs }}

build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-python@v2
name: Use Python 3.7
- uses: actions/setup-python@v5
name: Use Python 3.11
with:
python-version: '3.7'

- run: make jq.c
python-version: '3.11'

- run: pip install build twine

Expand All @@ -47,8 +58,9 @@ jobs:
- name: Check metadata
run: python -m twine check dist/*

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: dist-sdist
path: dist/*.tar.gz

build_wheels_matrix:
Expand All @@ -60,53 +72,129 @@ jobs:

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Use Python 3.10
uses: actions/setup-python@v2
- name: Use Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: '3.11'

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.9.0
run: python -m pip install cibuildwheel==2.23.3

- id: set-matrix
run: python build-wheels-matrix.py
env:
CIBW_ARCHS_LINUX: "auto aarch64"
CIBW_ARCHS_MACOS: "auto"
CIBW_SKIP: "cp36-win_amd64 cp36-win32 pp*-win_amd64 pp*-win32 pp38-*"
run: |
MATRIX=$(
{
cibuildwheel --print-build-identifiers --platform linux \
| sed 's/.*/{"cibw-only": "&", "os": "ubuntu-22.04"}/' \
&& cibuildwheel --print-build-identifiers --platform macos \
| sed 's/.*/{"cibw-only": "&", "os": "macos-13" }/' \
&& CIBW_ARCHS_WINDOWS=AMD64 cibuildwheel --print-build-identifiers --platform windows \
| sed 's/.*/{"cibw-only": "&", "os": "windows-2022", "arch": "AMD64" }/' \
&& CIBW_ARCHS_WINDOWS=x86 cibuildwheel --print-build-identifiers --platform windows \
| sed 's/.*/{"cibw-only": "&", "os": "windows-2022", "arch": "x86" }/'
} | jq --slurp --compact-output '{"include": .}'
)
echo matrix="$MATRIX" >> $GITHUB_OUTPUT

build_wheels:
name: Build ${{ matrix.CIBW_BUILD }} wheel
name: Build ${{ matrix.cibw-only }} wheel

needs: build_wheels_matrix
runs-on: ${{ matrix.os }}
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')

strategy:
matrix: ${{ fromJson(needs.build_wheels_matrix.outputs.matrix) }}

steps:
runs-on: ${{ matrix.os }}

- uses: actions/checkout@v2
steps:

- name: Use Python 3.10
uses: actions/setup-python@v2
- name: Check whether to build wheel
id: should-build-wheel
if: |
(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) ||
matrix.cibw-only == 'cp310-manylinux_x86_64' ||
matrix.cibw-only == 'cp310-musllinux_x86_64' ||
matrix.cibw-only == 'cp310-macosx_x86_64' ||
matrix.cibw-only == 'cp310-win_amd64' ||
matrix.cibw-only == 'cp310-win32'
shell: bash
run: echo true=1 >> $GITHUB_OUTPUT

- uses: actions/checkout@v4
if: steps.should-build-wheel.outputs.true

- name: Set up MSYS2
if: steps.should-build-wheel.outputs.true && runner.os == 'Windows'
uses: ./.github/actions/setup-msys2
with:
python-version: '3.10'
arch: ${{ matrix.arch }}

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
if: steps.should-build-wheel.outputs.true && runner.os == 'Linux'
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build wheels
uses: pypa/[email protected]
if: steps.should-build-wheel.outputs.true
uses: pypa/[email protected]
with:
only: ${{ matrix.cibw-only }}
env:
CIBW_ENVIRONMENT: ${{ runner.os == 'Windows' && matrix.arch == 'x86' && 'CC=i686-w64-mingw32-gcc.exe' || '' }}

- uses: actions/upload-artifact@v4
if: steps.should-build-wheel.outputs.true
with:
name: dist-wheel-${{ matrix.cibw-only }}
path: ./wheelhouse/*.whl

build_wheels_macosx_arm64:
name: Build macOS arm64 wheels
runs-on: macos-14

steps:

- uses: actions/checkout@v4

- name: Use Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Print build identifiers
run: |
python -m pip install cibuildwheel==2.23.3
CIBW_SKIP=cp38-macosx_arm64 python -m cibuildwheel --print-build-identifiers

- name: Build wheels
if: ${{ (github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }}
uses: pypa/[email protected]
env:
CIBW_ARCHS: ${{ matrix.CIBW_ARCHS }}
CIBW_BUILD: ${{ matrix.CIBW_BUILD }}
CIBW_BEFORE_BUILD: "pip install cython==0.29.32 && cython {project}/jq.pyx"
CIBW_TEST_REQUIRES: "-r test-requirements.txt"
CIBW_TEST_COMMAND: "py.test {project}/tests"
CIBW_SKIP: cp38-macosx_arm64

- uses: actions/upload-artifact@v2
- name: Build wheels
if: ${{ !(github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')) }}
uses: pypa/[email protected]
with:
only: cp310-macosx_arm64

- uses: actions/upload-artifact@v4
with:
name: dist-wheels-macos-arm64
path: ./wheelhouse/*.whl

merge_dist_artifacts:
runs-on: ubuntu-latest
needs: [build_sdist, build_wheels, build_wheels_macosx_arm64]
steps:
- uses: actions/upload-artifact/merge@v4
with:
name: dist
pattern: dist-*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
/.tox
/*.egg-info
/_deps
/deps/_build
78 changes: 78 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,84 @@
Changelog
=========

1.9.1
-----

* Apply a patch to jq to fix musl builds.

* Drop support for Python 3.7 and PyPy 3.8.

1.9.0
-----

Note: this version was never released due a bug in jq breaking builds with musl.

* Update to jq 1.8.0.

* Drop support for Python 3.6.

* Distribute Cython sources instead of C sources to improve compatibility.

1.8.0
-----

* Drop support for Python 3.5.

* Add support for Python 3.13.

* Build Windows wheels.

1.7.0
-----

* Update to jq 1.7.1.

* Include tox.ini in sdist.

* Use the version of oniguruma distributed with jq.

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
using the bundled source.

* Include tests in sdist.

1.5.0
-----

* Add input_value, input_values and input_text methods as replacements for the
input method. The input method is still supported.

* Add support for slurp when calling input_text.

* Add support for Python 3.12.

* Build macOS arm64 wheels.

1.4.1
-----

* Improve handling of null bytes in program inputs and outputs.

1.4.0
-----

* Update handling of non-finite numbers to match the behaviour jq 1.6.
Specifically, NaN is outputted as None, Inf is outputted as DBL_MAX,
and -Inf is outputted as DBL_MIN.

1.3.0
-----

* The jq and oniguruma libraries that these Python bindings rely on are now
included in the source distribution, instead of being downloaded.

1.2.3
-----

Expand Down
6 changes: 6 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
include README.rst
include LICENSE
include deps/*.tar.gz
include deps/jq-1.8.0-Makefile.patch
recursive-include tests *.py
include tox.ini
include jq.pyx
exclude *.c
Loading