Skip to content

Commit 5dbc1bf

Browse files
authored
v7.0.0 (#124)
* Bump version: 6.0.1 → 6.0.2 * Start modernizing tooling * Version bump a bunch of actions. * Run utils with uv run. * Bump cibuildwheel * Fix requires-python being too aggresive. * Adjust dev dependencies to support py3.9. * Drop pypy 3.8, add pypy 3.10. * Drop pypy 3.7. * Try moving cibuildwheel settings into pyproject.toml * For now CIBW_BUILD needs to remain in the matrix. * Install cibw test dependencies * (Possibly temporarily) get rid of pypy builds. * Temporary workaround setuptools #4810. * Remove the broken define. * Adjust type alias and add JSONEncoder. * Catch num_to_large when testing the minefield. * Update upstream to 3.12.3.
1 parent f68fc03 commit 5dbc1bf

File tree

13 files changed

+99433
-91101
lines changed

13 files changed

+99433
-91101
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 6.0.1
2+
current_version = 6.0.2
33
commit = True
44
tag = True
55

.github/workflows/release.yml

Lines changed: 40 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,93 +1,89 @@
11
on:
22
workflow_dispatch:
3+
release:
4+
types:
5+
- published
36
push:
4-
tags:
5-
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
6-
7-
name: Creating release
8-
9-
env:
10-
CIBW_TEST_EXTRAS: test
11-
CIBW_TEST_COMMAND: "pytest {project}/tests"
12-
CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"
13-
CIBW_ARCHS_MACOS: "x86_64 universal2"
7+
branches:
8+
- main
9+
pull_request:
1410

11+
name: Tests/Release
1512
jobs:
1613
# Build & test simple source release before wasting hours building and
1714
# testing the binary build matrix.
1815
sdist:
1916
name: Creating source release
2017
runs-on: ubuntu-latest
2118
steps:
22-
- uses: actions/checkout@v2
19+
- uses: actions/checkout@v4.1.7
2320

2421
- name: Setting up Python
25-
uses: actions/setup-python@v2
22+
uses: actions/setup-python@v5
2623
with:
27-
python-version: 3.8
24+
python-version: 3.13
2825

2926
- name: Installing python build dependencies
3027
run: |
31-
python -m pip install --upgrade pip
32-
python -m pip install --upgrade setuptools
28+
pip install uv
3329
3430
- name: Building source distribution
3531
run: |
36-
pip install -e ".[release]"
37-
python setup.py sdist
32+
uv build --sdist
3833
3934
- name: Ensuring documentation builds
4035
run: |
41-
cd docs && make clean && make html
42-
43-
- uses: actions/upload-artifact@v2
36+
cd docs && uv run make clean html
37+
38+
- uses: actions/upload-artifact@v4.6.0
4439
with:
40+
name: dist-sdist
4541
path: dist/*.tar.gz
46-
42+
4743
build_wheels:
4844
needs: [sdist]
4945
name: "[${{ strategy.job-index }}/${{ strategy.job-total }}] py${{ matrix.py }} on ${{ matrix.os }}"
5046
runs-on: ${{ matrix.os }}
5147
strategy:
5248
fail-fast: true
5349
matrix:
54-
os: [ubuntu-20.04, windows-2019, macos-11]
55-
# cp - CPython
56-
# pp - PyPy
57-
py: ["cp39", "cp310", "cp311", "cp312", "pp37", "pp38", "pp39"]
50+
os: [ubuntu-latest, windows-latest, macos-14]
51+
py: ["cp39", "cp310", "cp311", "cp312", "cp313"]
5852

5953
steps:
60-
- uses: actions/checkout@v2
54+
- uses: actions/checkout@v4.1.7
6155

62-
- uses: actions/setup-python@v2
63-
name: Setting up Python
56+
- name: Setting up Python
57+
uses: actions/setup-python@v5
6458
with:
65-
python-version: '3.8'
59+
python-version: "3.13"
6660

6761
- name: Set up QEMU
6862
if: runner.os == 'Linux'
69-
uses: docker/setup-qemu-action@v1
63+
uses: docker/setup-qemu-action@v3
7064
with:
7165
platforms: all
7266

7367
- name: Build & test wheels
74-
uses: pypa/cibuildwheel@v2.16.5
68+
uses: pypa/cibuildwheel@v2.22.0
7569
env:
76-
CIBW_ARCHS_LINUX: auto aarch64 ppc64le
7770
CIBW_BUILD: "${{ matrix.py }}-*"
7871

79-
- uses: actions/upload-artifact@v2
72+
- uses: actions/upload-artifact@v4.6.0
8073
with:
74+
name: dist-${{ matrix.os }}-${{ matrix.py }}
8175
path: ./wheelhouse/*.whl
8276

8377
upload_all:
84-
needs: [build_wheels, sdist]
8578
name: Uploading built packages to pypi for release.
79+
needs: [build_wheels, sdist]
80+
if: github.event_name == 'release'
8681
runs-on: ubuntu-latest
8782
steps:
88-
- uses: actions/download-artifact@v2
83+
- uses: actions/download-artifact@v4.1.8
8984
with:
90-
name: artifact
85+
pattern: dist-*
86+
merge-multiple: true
9187
path: dist
9288

9389
- uses: pypa/gh-action-pypi-publish@v1.4.2
@@ -98,28 +94,28 @@ jobs:
9894
build_documentation:
9995
name: Building & uploading documentation.
10096
needs: [upload_all]
97+
if: github.event_name == 'release'
10198
runs-on: ubuntu-latest
10299
steps:
103-
- uses: actions/checkout@v2
100+
- uses: actions/checkout@v4.1.7
104101

105102
- name: Setting up Python
106-
uses: actions/setup-python@v2
103+
uses: actions/setup-python@v5
107104
with:
108-
python-version: 3.8
105+
python-version: 3.13
109106

110107
- name: Installing python build dependencies
111108
run: |
112-
python -m pip install --upgrade pip
113-
python -m pip install --upgrade setuptools
109+
pip install uv
114110
115111
- name: Installing release dependencies.
116112
run: |
117-
pip install -e ".[release]"
113+
uv sync
118114
119115
- name: Building documentation
120116
run: |
121-
cd docs && make clean && make html
117+
cd docs && uv run make clean html
122118
123119
- name: Publishing documentation
124120
run: |
125-
ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html
121+
uv run ghp-import -f -n -c pysimdjson.tkte.ch -p docs/_build/html

.github/workflows/test.yml

Lines changed: 0 additions & 83 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ _build/
1414

1515
# coverage.py default output file
1616
.coverage
17+
.idea

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Changelog
22

3+
## 7.0.0
4+
5+
- Drop python 3.8, pypy builds, add python 3.13 (#117, #123)
6+
- Add proper .load/.loads type signatures (#116)
7+
- Updating and modernize github actions, simplify packaging and CI.
8+
- Update upstream simdjson to 3.12.3.
9+
- Add alias to json.JSONEncoder to drop-in API. (#118)
10+
- Deterministic build / static build metadata
11+
312
## 6.0.0
413

514
- Dropped support for CPython 3.6 - 3.8 which are long past their support window,

pyproject.toml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
[build-system]
2+
requires = ["setuptools>=74.1", "Cython"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "pysimdjson"
7+
version = "7.0.0"
8+
description = "Add your description here"
9+
readme = "README.md"
10+
requires-python = ">=3.9"
11+
dependencies = [
12+
"pysimdjson",
13+
]
14+
15+
[tool.uv.sources]
16+
pysimdjson = { workspace = true }
17+
18+
[tool.setuptools]
19+
ext-modules = [
20+
{ name = "csimdjson", sources = ["simdjson/simdjson.cpp", "simdjson/util.cpp", "simdjson/csimdjson.pyx"], py-limited-api = true },
21+
]
22+
23+
[tool.setuptools.packages.find]
24+
include = ["simdjson"]
25+
26+
[dependency-groups]
27+
dev = [
28+
"build>=1.2.2.post1",
29+
"bumpversion>=0.6.0",
30+
"coverage>=7.6.12",
31+
"furo>=2024.8.6",
32+
"ghp-import>=2.1.0",
33+
"numpy>=2.0.2",
34+
"pytest>=8.3.4",
35+
"pytest-benchmark>=5.1.0",
36+
"sphinx>=7.4.7",
37+
]
38+
39+
40+
[tool.cibuildwheel]
41+
before-test = "pip install pytest pytest-benchmark"
42+
test-command = "pytest {project}/tests"
43+
test-skip = "*_arm64 *_universal2:arm64"
44+
# This should be part of ext-modules but is blocked by setuptools issue #4810.
45+
environment = { CPPFLAGS="-DSIMDJSON_IMPLEMENTATION_FALLBACK=1" }
46+
47+
[tool.cibuildwheel.linux]
48+
archs = ["auto", "aarch64", "ppc64le"]
49+
50+
[tool.cibuildwheel.macos]
51+
environment = { CXXFLAGS="-std=c++11" }
52+
archs = ["x86_64", "universal2"]

0 commit comments

Comments
 (0)