Skip to content

Commit 95c86e5

Browse files
committed
cargo update, build misc
1 parent 7b081e1 commit 95c86e5

File tree

8 files changed

+91
-78
lines changed

8 files changed

+91
-78
lines changed

.github/workflows/artifact.yaml

+18-9
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: artifact
22
on: push
33
env:
4-
RUST_TOOLCHAIN: "nightly-2024-06-10"
4+
RUST_TOOLCHAIN: "nightly-2024-07-02"
55
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
66
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
77
jobs:
@@ -101,22 +101,24 @@ jobs:
101101
102102
- name: maturin
103103
run: |
104+
source .venv/bin/activate
104105
maturin build --release --strip \
105106
--features=avx512,no-panic,unstable-simd,yyjson \
106107
--compatibility manylinux_2_17 \
107108
--interpreter python${{ matrix.python.version }} \
108109
--target=x86_64-unknown-linux-gnu
109110
uv pip install target/wheels/orjson*.whl
110111
111-
- run: pytest -s -rxX -v -n 2 test
112+
- run: source .venv/bin/activate && pytest -s -rxX -v -n 2 test
112113
env:
113114
PYTHONMALLOC: "debug"
114115

115-
- run: ./integration/run thread
116-
- run: ./integration/run http
117-
- run: ./integration/run init
116+
- run: source .venv/bin/activate && ./integration/run thread
117+
- run: source .venv/bin/activate && ./integration/run http
118+
- run: source .venv/bin/activate && ./integration/run init
118119

119120
- run: |
121+
source .venv/bin/activate
120122
uv pip install -U --pre "numpy>=2.0.0rc1"
121123
pytest -s test/test_numpy.py
122124
if: matrix.python.version != '3.8'
@@ -167,7 +169,7 @@ jobs:
167169
LDFLAGS: "-Wl,--as-needed"
168170
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=2 -D warnings -C target-feature=-crt-static"
169171
with:
170-
rust-toolchain: nightly-2024-06-10
172+
rust-toolchain: nightly-2024-07-02
171173
rustup-components: rust-src
172174
target: ${{ matrix.platform.target }}
173175
manylinux: musllinux_1_2
@@ -225,6 +227,13 @@ jobs:
225227
rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings',
226228
target: 'aarch64-unknown-linux-gnu',
227229
},
230+
{
231+
arch: 'armv7',
232+
cflags: '-Os -flto=full -fstrict-aliasing',
233+
features: 'no-panic,yyjson', # no SIMD
234+
rustflags: '-Z mir-opt-level=4 -C lto=fat -D warnings -C opt-level=s',
235+
target: 'armv7-unknown-linux-gnueabihf',
236+
},
228237
{
229238
arch: 'ppc64le',
230239
cflags: '-Os -flto=full -fstrict-aliasing',
@@ -256,7 +265,7 @@ jobs:
256265
RUSTFLAGS: "${{ matrix.target.rustflags }}"
257266
with:
258267
target: ${{ matrix.target.target }}
259-
rust-toolchain: nightly-2024-06-10
268+
rust-toolchain: nightly-2024-07-02
260269
rustup-components: rust-src
261270
manylinux: auto
262271
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
@@ -319,7 +328,7 @@ jobs:
319328

320329
- uses: dtolnay/rust-toolchain@master
321330
with:
322-
toolchain: "nightly-2024-06-10"
331+
toolchain: "nightly-2024-07-02"
323332
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
324333
components: "rust-src"
325334

@@ -389,7 +398,7 @@ jobs:
389398

390399
- uses: dtolnay/rust-toolchain@master
391400
with:
392-
toolchain: "nightly-2024-06-10"
401+
toolchain: "nightly-2024-07-02"
393402
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
394403
components: "rust-src"
395404

.github/workflows/debug.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
profile: [
1111
{ rust: "1.72", features: "" },
1212
{ rust: "1.72", features: "--features=yyjson" },
13-
{ rust: "nightly-2024-06-10", features: "--features=yyjson,unstable-simd"},
14-
{ rust: "nightly-2024-06-10", features: "--features=avx512,yyjson,unstable-simd"},
13+
{ rust: "nightly-2024-07-02", features: "--features=yyjson,unstable-simd"},
14+
{ rust: "nightly-2024-07-02", features: "--features=avx512,yyjson,unstable-simd"},
1515
]
1616
python: [
1717
{ version: '3.13' },

Cargo.lock

+16-16
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ encoding_rs = { version = "0.8", default-features = false }
6767
half = { version = "2", default-features = false, features = ["std"] }
6868
itoa = { version = "1", default-features = false }
6969
itoap = { version = "1", features = ["std", "simd"] }
70-
once_cell = { version = "1", default-features = false, features = ["race"] }
71-
pyo3-ffi = { version = "^0.21", default-features = false, features = ["extension-module"]}
70+
once_cell = { version = "1", default-features = false, features = ["alloc", "race"] }
71+
pyo3-ffi = { version = "^0.22", default-features = false, features = ["extension-module"]}
7272
ryu = { version = "1", default-features = false }
7373
serde = { version = "1", default-features = false }
7474
serde_json = { version = "1", default-features = false, features = ["std", "float_roundtrip"] }
@@ -78,7 +78,7 @@ unwinding = { version = "0.2", features = ["unwinder"], optional = true }
7878

7979
[build-dependencies]
8080
cc = { version = "1" }
81-
pyo3-build-config = { version = "^0.21" }
81+
pyo3-build-config = { version = "^0.22" }
8282
version_check = { version = "0.9" }
8383

8484
[profile.dev]

README.md

+40-40
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# orjson
22

33
orjson is a fast, correct JSON library for Python. It
4-
[benchmarks](https://github.com/ijl/orjson#performance) as the fastest Python
4+
[benchmarks](https://github.com/ijl/orjson?tab=readme-ov-file#performance) as the fastest Python
55
library for JSON and is more correct than the standard json library or other
66
third-party libraries. It serializes
7-
[dataclass](https://github.com/ijl/orjson#dataclass),
8-
[datetime](https://github.com/ijl/orjson#datetime),
9-
[numpy](https://github.com/ijl/orjson#numpy), and
10-
[UUID](https://github.com/ijl/orjson#uuid) instances natively.
7+
[dataclass](https://github.com/ijl/orjson?tab=readme-ov-file#dataclass),
8+
[datetime](https://github.com/ijl/orjson?tab=readme-ov-file#datetime),
9+
[numpy](https://github.com/ijl/orjson?tab=readme-ov-file#numpy), and
10+
[UUID](https://github.com/ijl/orjson?tab=readme-ov-file#uuid) instances natively.
1111

1212
Its features and drawbacks compared to other Python JSON libraries:
1313

@@ -33,7 +33,7 @@ support for 64-bit
3333
file-like objects
3434

3535
orjson supports CPython 3.8, 3.9, 3.10, 3.11, and 3.12. It distributes
36-
amd64/x86_64, aarch64/armv8, POWER/ppc64le, and s390x wheels for Linux,
36+
amd64/x86_64, aarch64/armv8, arm7, POWER/ppc64le, and s390x wheels for Linux,
3737
amd64 and aarch64 wheels for macOS, and amd64 and i686/x86 wheels for Windows.
3838
orjson does not and will not support PyPy. orjson does not and will not
3939
support PEP 554 subinterpreters. Releases follow semantic versioning and
@@ -47,32 +47,32 @@ submitted there. There is a
4747
[CHANGELOG](https://github.com/ijl/orjson/blob/master/CHANGELOG.md)
4848
available in the repository.
4949

50-
1. [Usage](https://github.com/ijl/orjson#usage)
51-
1. [Install](https://github.com/ijl/orjson#install)
52-
2. [Quickstart](https://github.com/ijl/orjson#quickstart)
53-
3. [Migrating](https://github.com/ijl/orjson#migrating)
54-
4. [Serialize](https://github.com/ijl/orjson#serialize)
55-
1. [default](https://github.com/ijl/orjson#default)
56-
2. [option](https://github.com/ijl/orjson#option)
57-
3. [Fragment](https://github.com/ijl/orjson#fragment)
58-
5. [Deserialize](https://github.com/ijl/orjson#deserialize)
59-
2. [Types](https://github.com/ijl/orjson#types)
60-
1. [dataclass](https://github.com/ijl/orjson#dataclass)
61-
2. [datetime](https://github.com/ijl/orjson#datetime)
62-
3. [enum](https://github.com/ijl/orjson#enum)
63-
4. [float](https://github.com/ijl/orjson#float)
64-
5. [int](https://github.com/ijl/orjson#int)
65-
6. [numpy](https://github.com/ijl/orjson#numpy)
66-
7. [str](https://github.com/ijl/orjson#str)
67-
8. [uuid](https://github.com/ijl/orjson#uuid)
68-
3. [Testing](https://github.com/ijl/orjson#testing)
69-
4. [Performance](https://github.com/ijl/orjson#performance)
70-
1. [Latency](https://github.com/ijl/orjson#latency)
71-
2. [Memory](https://github.com/ijl/orjson#memory)
72-
3. [Reproducing](https://github.com/ijl/orjson#reproducing)
73-
5. [Questions](https://github.com/ijl/orjson#questions)
74-
6. [Packaging](https://github.com/ijl/orjson#packaging)
75-
7. [License](https://github.com/ijl/orjson#license)
50+
1. [Usage](https://github.com/ijl/orjson?tab=readme-ov-file#usage)
51+
1. [Install](https://github.com/ijl/orjson?tab=readme-ov-file#install)
52+
2. [Quickstart](https://github.com/ijl/orjson?tab=readme-ov-file#quickstart)
53+
3. [Migrating](https://github.com/ijl/orjson?tab=readme-ov-file#migrating)
54+
4. [Serialize](https://github.com/ijl/orjson?tab=readme-ov-file#serialize)
55+
1. [default](https://github.com/ijl/orjson?tab=readme-ov-file#default)
56+
2. [option](https://github.com/ijl/orjson?tab=readme-ov-file#option)
57+
3. [Fragment](https://github.com/ijl/orjson?tab=readme-ov-file#fragment)
58+
5. [Deserialize](https://github.com/ijl/orjson?tab=readme-ov-file#deserialize)
59+
2. [Types](https://github.com/ijl/orjson?tab=readme-ov-file#types)
60+
1. [dataclass](https://github.com/ijl/orjson?tab=readme-ov-file#dataclass)
61+
2. [datetime](https://github.com/ijl/orjson?tab=readme-ov-file#datetime)
62+
3. [enum](https://github.com/ijl/orjson?tab=readme-ov-file#enum)
63+
4. [float](https://github.com/ijl/orjson?tab=readme-ov-file#float)
64+
5. [int](https://github.com/ijl/orjson?tab=readme-ov-file#int)
65+
6. [numpy](https://github.com/ijl/orjson?tab=readme-ov-file#numpy)
66+
7. [str](https://github.com/ijl/orjson?tab=readme-ov-file#str)
67+
8. [uuid](https://github.com/ijl/orjson?tab=readme-ov-file#uuid)
68+
3. [Testing](https://github.com/ijl/orjson?tab=readme-ov-file#testing)
69+
4. [Performance](https://github.com/ijl/orjson?tab=readme-ov-file#performance)
70+
1. [Latency](https://github.com/ijl/orjson?tab=readme-ov-file#latency)
71+
2. [Memory](https://github.com/ijl/orjson?tab=readme-ov-file#memory)
72+
3. [Reproducing](https://github.com/ijl/orjson?tab=readme-ov-file#reproducing)
73+
5. [Questions](https://github.com/ijl/orjson?tab=readme-ov-file#questions)
74+
6. [Packaging](https://github.com/ijl/orjson?tab=readme-ov-file#packaging)
75+
7. [License](https://github.com/ijl/orjson?tab=readme-ov-file#license)
7676

7777
## Usage
7878

@@ -85,7 +85,7 @@ pip install --upgrade "pip>=20.3" # manylinux_x_y, universal2 wheel support
8585
pip install --upgrade orjson
8686
```
8787

88-
To build a wheel, see [packaging](https://github.com/ijl/orjson#packaging).
88+
To build a wheel, see [packaging](https://github.com/ijl/orjson?tab=readme-ov-file#packaging).
8989

9090
### Quickstart
9191

@@ -155,7 +155,7 @@ The global interpreter lock (GIL) is held for the duration of the call.
155155
It raises `JSONEncodeError` on an unsupported type. This exception message
156156
describes the invalid object with the error message
157157
`Type is not JSON serializable: ...`. To fix this, specify
158-
[default](https://github.com/ijl/orjson#default).
158+
[default](https://github.com/ijl/orjson?tab=readme-ov-file#default).
159159

160160
It raises `JSONEncodeError` on a `str` that contains invalid UTF-8.
161161

@@ -496,18 +496,18 @@ OPT_NON_STR_KEYS.
496496

497497
This is deprecated and has no effect in version 3. In version 2 this was
498498
required to serialize `dataclasses.dataclass` instances. For more, see
499-
[dataclass](https://github.com/ijl/orjson#dataclass).
499+
[dataclass](https://github.com/ijl/orjson?tab=readme-ov-file#dataclass).
500500

501501
##### OPT_SERIALIZE_NUMPY
502502

503503
Serialize `numpy.ndarray` instances. For more, see
504-
[numpy](https://github.com/ijl/orjson#numpy).
504+
[numpy](https://github.com/ijl/orjson?tab=readme-ov-file#numpy).
505505

506506
##### OPT_SERIALIZE_UUID
507507

508508
This is deprecated and has no effect in version 3. In version 2 this was
509509
required to serialize `uuid.UUID` instances. For more, see
510-
[UUID](https://github.com/ijl/orjson#UUID).
510+
[UUID](https://github.com/ijl/orjson?tab=readme-ov-file#UUID).
511511

512512
##### OPT_SORT_KEYS
513513

@@ -554,7 +554,7 @@ simplejson, and ujson.
554554
##### OPT_STRICT_INTEGER
555555

556556
Enforce 53-bit limit on integers. The limit is otherwise 64 bits, the same as
557-
the Python standard library. For more, see [int](https://github.com/ijl/orjson#int).
557+
the Python standard library. For more, see [int](https://github.com/ijl/orjson?tab=readme-ov-file#int).
558558

559559
##### OPT_UTC_Z
560560

@@ -1205,11 +1205,11 @@ It benefits from also having a C build environment to compile a faster
12051205
deserialization backend. See this project's `manylinux_2_28` builds for an
12061206
example using clang and LTO.
12071207

1208-
The project's own CI tests against `nightly-2024-06-10` and stable 1.72. It
1208+
The project's own CI tests against `nightly-2024-07-02` and stable 1.72. It
12091209
is prudent to pin the nightly version because that channel can introduce
12101210
breaking changes.
12111211

1212-
orjson is tested for amd64, aarch64, ppc64le, and s390x on Linux. It
1212+
orjson is tested for amd64, aarch64, arm7, ppc64le, and s390x on Linux. It
12131213
is tested for either aarch64 or amd64 on macOS and cross-compiles for the other,
12141214
depending on version. For Windows it is tested on amd64 and i686.
12151215

ci/azure-pipelines.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variables:
2-
toolchain: nightly-2024-06-10
2+
toolchain: nightly-2024-07-02
33

44
jobs:
55

0 commit comments

Comments
 (0)