diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 443ac1d..3197a2a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,8 @@ on: workflow_dispatch: push: - # Sequence of patterns matched against refs/tags - # tags: - # - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 + tags: + - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 name: Creating release @@ -14,37 +13,8 @@ env: CIBW_ARCHS_MACOS: "x86_64 universal2" jobs: - build_wheels: - name: Build wheels on ${{ matrix.os }} - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: [ubuntu-20.04, windows-2019, macos-10.15] - - steps: - - uses: actions/checkout@v2 - - - uses: actions/setup-python@v2 - name: Setting up Python - with: - python-version: '3.8' - - - name: Set up QEMU - if: runner.os == 'Linux' - uses: docker/setup-qemu-action@v1 - with: - platforms: all - - - name: Build & test wheels - uses: pypa/cibuildwheel@v2.2.2 - env: - CIBW_ARCHS_LINUX: auto aarch64 ppc64le - - - uses: actions/upload-artifact@v2 - with: - path: ./wheelhouse/*.whl - + # Build & test simple source release before wasting hours building and + # testing the binary build matrix. sdist: name: Creating source release runs-on: ubuntu-latest @@ -74,6 +44,42 @@ jobs: with: path: dist/*.tar.gz + build_wheels: + needs: [sdist] + name: "[${{ strategy.job-index }}/${{ strategy.job-total }}] py${{ matrix.py }} on ${{ matrix.os }}" + runs-on: ${{ matrix.os }} + strategy: + fail-fast: true + matrix: + os: [ubuntu-20.04, windows-2019, macos-10.15] + # cp - CPython + # pp - PyPy + py: ["cp36", "cp37", "cp38", "cp39", "cp310", "pp37"] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + name: Setting up Python + with: + python-version: '3.8' + + - name: Set up QEMU + if: runner.os == 'Linux' + uses: docker/setup-qemu-action@v1 + with: + platforms: all + + - name: Build & test wheels + uses: pypa/cibuildwheel@v2.2.2 + env: + CIBW_ARCHS_LINUX: auto aarch64 ppc64le + CIBW_BUILD: "${{ matrix.py }}-*" + + - uses: actions/upload-artifact@v2 + with: + path: ./wheelhouse/*.whl + upload_all: needs: [build_wheels, sdist] name: Uploading built packages to pypi for release. @@ -84,10 +90,10 @@ jobs: name: artifact path: dist - # - uses: pypa/gh-action-pypi-publish@v1.4.2 - # with: - # user: ${{ secrets.PYPI_USERNAME }} - # password: ${{ secrets.PYPI_PASSWORD }} + - uses: pypa/gh-action-pypi-publish@v1.4.2 + with: + user: ${{ secrets.PYPI_USERNAME }} + password: ${{ secrets.PYPI_PASSWORD }} build_documentation: name: Building & uploading documentation. @@ -114,6 +120,6 @@ jobs: run: | cd docs && make clean && make html - # - name: Publishing documentation - # run: | - # ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html + - name: Publishing documentation + run: | + ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..7f4a8ad --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 4.0.3 + +- Updated upstream simdjson library to 1.0.2. +- Binary wheels are now tested and available for py3.6-py3.10 on x86[_64], + ppc64le and aarch64. + - Under Linux, wheels are built for both manylinux and musl (Alpine). + - Under Linux, wheels are also available for PyPy3.7. +- Minor documentation fixes. diff --git a/docs/index.rst b/docs/index.rst index 0718aa7..0cb29b3 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -25,7 +25,7 @@ If SIMD instructions are unavailable a fallback parser is used, making pysimdjson safe to use anywhere. Bindings are currently tested on OS X, Linux, and Windows for Python version -3.6 to 3.9. +3.6 to 3.10. Installation ------------ @@ -39,25 +39,28 @@ with no further requirements: Binary wheels are available for the following: -+-------------+-------+-------+-------+-------+ -| | x86_64 | ARM | -+-------------+-------+-------+-------+-------+ -| Interpreter | OS X | Win | Linux | Linux | -+=============+=======+=======+=======+=======+ -| CPython 3.6 | Yes | Yes | Yes | Yes | -+-------------+-------+-------+-------+-------+ -| CPython 3.7 | Yes | Yes | Yes | Yes | -+-------------+-------+-------+-------+-------+ -| CPython 3.8 | Yes | Yes | Yes | Yes | -+-------------+-------+-------+-------+-------+ -| CPython 3.9 | Yes | Yes | Yes | Yes | -+-------------+-------+-------+-------+-------+ ++--------------+-------+-------+-------+---------+---------+ +| | x86_64 | ARM64 | PowerPC | ++--------------+-------+-------+-------+---------+---------+ +| Interpreter | OS X | Win | Linux | Linux | Linux | ++==============+=======+=======+=======+=========+=========+ +| CPython 3.6 | Yes | Yes | Yes | Yes | Yes | ++--------------+-------+-------+-------+---------+---------+ +| CPython 3.7 | Yes | Yes | Yes | Yes | Yes | ++--------------+-------+-------+-------+---------+---------+ +| CPython 3.8 | Yes | Yes | Yes | Yes | Yes | ++--------------+-------+-------+-------+---------+---------+ +| CPython 3.9 | Yes | Yes | Yes | Yes | Yes | ++--------------+-------+-------+-------+---------+---------+ +| CPython 3.10 | Yes | Yes | Yes | Yes | Yes | ++--------------+-------+-------+-------+---------+---------+ When binary wheels are not available, a C++11 (or better) compiler is required -when installing. +when installing in order to build the underlying simdjson library. If you would prefer to always install pysimdjson from source even when -pre-compiled binaries are available, use: +pre-compiled binaries are available (to take advantage of a newer compiler for +example), use: .. code:: diff --git a/docs/performance.rst b/docs/performance.rst index a9fee8d..2d12b9c 100644 --- a/docs/performance.rst +++ b/docs/performance.rst @@ -67,6 +67,7 @@ to re-use the parser. for i in range(0, 100): doc = parser.parse(b'{"a": "b"}') + del doc This will drastically reduce the number of allocations being made, as it will reuse the existing buffer when possible. If it's too small, it'll grow to fit. diff --git a/setup.py b/setup.py index 14bb57e..5d4466a 100644 --- a/setup.py +++ b/setup.py @@ -78,7 +78,7 @@ setup( name='pysimdjson', packages=find_packages(), - version='4.0.2', + version='4.0.3', description='simdjson bindings for python', long_description=long_description, long_description_content_type='text/markdown', @@ -94,7 +94,7 @@ 'Development Status :: 3 - Alpha', 'Intended Audience :: Developers', ], - python_requires='>3.4', + python_requires='>3.5', extras_require={ # Dependencies for package release. 'release': [