Skip to content

v7.0.0 #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
May 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 6.0.1
current_version = 6.0.2
commit = True
tag = True

Expand Down
84 changes: 40 additions & 44 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,89 @@
on:
workflow_dispatch:
release:
types:
- published
push:
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

name: Creating release

env:
CIBW_TEST_EXTRAS: test
CIBW_TEST_COMMAND: "pytest {project}/tests"
CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"
CIBW_ARCHS_MACOS: "x86_64 universal2"
branches:
- main
pull_request:

name: Tests/Release
jobs:
# Build & test simple source release before wasting hours building and
# testing the binary build matrix.
sdist:
name: Creating source release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.7

- name: Setting up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.13

- name: Installing python build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install uv

- name: Building source distribution
run: |
pip install -e ".[release]"
python setup.py sdist
uv build --sdist

- name: Ensuring documentation builds
run: |
cd docs && make clean && make html

- uses: actions/upload-artifact@v2
cd docs && uv run make clean html
- uses: actions/upload-artifact@v4.6.0
with:
name: dist-sdist
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-11]
# cp - CPython
# pp - PyPy
py: ["cp39", "cp310", "cp311", "cp312", "pp37", "pp38", "pp39"]
os: [ubuntu-latest, windows-latest, macos-14]
py: ["cp39", "cp310", "cp311", "cp312", "cp313"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.7

- uses: actions/setup-python@v2
name: Setting up Python
- name: Setting up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: "3.13"

- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3
with:
platforms: all

- name: Build & test wheels
uses: pypa/cibuildwheel@v2.16.5
uses: pypa/cibuildwheel@v2.22.0
env:
CIBW_ARCHS_LINUX: auto aarch64 ppc64le
CIBW_BUILD: "${{ matrix.py }}-*"

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4.6.0
with:
name: dist-${{ matrix.os }}-${{ matrix.py }}
path: ./wheelhouse/*.whl

upload_all:
needs: [build_wheels, sdist]
name: Uploading built packages to pypi for release.
needs: [build_wheels, sdist]
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4.1.8
with:
name: artifact
pattern: dist-*
merge-multiple: true
path: dist

- uses: pypa/[email protected]
Expand All @@ -98,28 +94,28 @@ jobs:
build_documentation:
name: Building & uploading documentation.
needs: [upload_all]
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4.1.7

- name: Setting up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: 3.8
python-version: 3.13

- name: Installing python build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools
pip install uv

- name: Installing release dependencies.
run: |
pip install -e ".[release]"
uv sync

- name: Building documentation
run: |
cd docs && make clean && make html
cd docs && uv run make clean html

- name: Publishing documentation
run: |
ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html
uv run ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html
83 changes: 0 additions & 83 deletions .github/workflows/test.yml

This file was deleted.

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ _build/

# coverage.py default output file
.coverage
.idea
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 7.0.0

- Drop python 3.8, pypy builds, add python 3.13 (#117, #123)
- Add proper .load/.loads type signatures (#116)
- Updating and modernize github actions, simplify packaging and CI.
- Update upstream simdjson to 3.12.3.
- Add alias to json.JSONEncoder to drop-in API. (#118)
- Deterministic build / static build metadata

## 6.0.0

- Dropped support for CPython 3.6 - 3.8 which are long past their support window,
Expand Down
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
[build-system]
requires = ["setuptools>=74.1", "Cython"]
build-backend = "setuptools.build_meta"

[project]
name = "pysimdjson"
version = "7.0.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.9"
dependencies = [
"pysimdjson",
]

[tool.uv.sources]
pysimdjson = { workspace = true }

[tool.setuptools]
ext-modules = [
{ name = "csimdjson", sources = ["simdjson/simdjson.cpp", "simdjson/util.cpp", "simdjson/csimdjson.pyx"], py-limited-api = true },
]

[tool.setuptools.packages.find]
include = ["simdjson"]

[dependency-groups]
dev = [
"build>=1.2.2.post1",
"bumpversion>=0.6.0",
"coverage>=7.6.12",
"furo>=2024.8.6",
"ghp-import>=2.1.0",
"numpy>=2.0.2",
"pytest>=8.3.4",
"pytest-benchmark>=5.1.0",
"sphinx>=7.4.7",
]


[tool.cibuildwheel]
before-test = "pip install pytest pytest-benchmark"
test-command = "pytest {project}/tests"
test-skip = "*_arm64 *_universal2:arm64"
# This should be part of ext-modules but is blocked by setuptools issue #4810.
environment = { CPPFLAGS="-DSIMDJSON_IMPLEMENTATION_FALLBACK=1" }

[tool.cibuildwheel.linux]
archs = ["auto", "aarch64", "ppc64le"]

[tool.cibuildwheel.macos]
environment = { CXXFLAGS="-std=c++11" }
archs = ["x86_64", "universal2"]
Loading