Skip to content

Commit 537c6bc

Browse files
committed
build maintenance, edition 2024 compatibility, MSRV 1.82
1 parent 504a99b commit 537c6bc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1390
-716
lines changed

.github/workflows/artifact.yaml

+6-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on: push
33
env:
44
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
55
PIP_DISABLE_PIP_VERSION_CHECK: "1"
6-
RUST_TOOLCHAIN: "nightly-2024-11-22"
6+
RUST_TOOLCHAIN: "nightly-2025-01-07"
77
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
88
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
99
UV_LINK_MODE: "copy"
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
env:
18-
RUST_TOOLCHAIN: "1.72" # MSRV
18+
RUST_TOOLCHAIN: "1.82" # MSRV
1919
steps:
2020
- name: rustup stable
2121
run: |
@@ -24,7 +24,7 @@ jobs:
2424
2525
- uses: actions/checkout@v4
2626

27-
- run: python3 -m pip install --user --upgrade pip "maturin==1.7.8" wheel
27+
- run: python3 -m pip install --user --upgrade pip "maturin>=1,<2" wheel
2828

2929
- name: Vendor dependencies
3030
run: |
@@ -287,7 +287,6 @@ jobs:
287287
LDFLAGS: "-Wl,--as-needed"
288288
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z threads=2 -D warnings -C target-feature=-crt-static"
289289
with:
290-
maturin-version: 1.7.8
291290
rust-toolchain: "${{ env.RUST_TOOLCHAIN }}"
292291
rustup-components: rust-src
293292
target: "${{ matrix.platform.target }}"
@@ -392,7 +391,6 @@ jobs:
392391
LDFLAGS: "-Wl,--as-needed"
393392
RUSTFLAGS: "${{ matrix.target.rustflags }}"
394393
with:
395-
maturin-version: 1.7.8
396394
target: "${{ matrix.target.target }}"
397395
rust-toolchain: "${{ env.RUST_TOOLCHAIN }}"
398396
rustup-components: rust-src
@@ -450,7 +448,7 @@ jobs:
450448
451449
curl -LsSf https://astral.sh/uv/install.sh | sh
452450
uv venv --python python${{ matrix.python.version }}
453-
uv pip install --upgrade "maturin==1.7.8" -r test/requirements.txt -r integration/requirements.txt
451+
uv pip install --upgrade "maturin>=1,<2" -r test/requirements.txt -r integration/requirements.txt
454452
455453
mkdir .cargo
456454
cp ci/config.toml .cargo/config.toml
@@ -524,7 +522,7 @@ jobs:
524522
525523
curl -LsSf https://astral.sh/uv/install.sh | sh
526524
uv venv --python python${{ matrix.python.version }}
527-
uv pip install --upgrade "maturin==1.7.8" -r test/requirements.txt -r integration/requirements.txt
525+
uv pip install --upgrade "maturin>=1,<2" -r test/requirements.txt -r integration/requirements.txt
528526
529527
mkdir .cargo
530528
cp ci/config.toml .cargo/config.toml
@@ -599,7 +597,7 @@ jobs:
599597
run: |
600598
cargo fetch --target "${{ matrix.platform.target }}" &
601599
602-
python.exe -m pip install --upgrade pip "maturin==1.7.8" wheel
600+
python.exe -m pip install --upgrade pip "maturin>=1,<2" wheel
603601
python.exe -m pip install -r test\requirements.txt -r integration\requirements.txt
604602
605603
mkdir .cargo

.github/workflows/debug.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ jobs:
88
fail-fast: false
99
matrix:
1010
profile: [
11-
{ rust: "1.72", features: "" },
12-
{ rust: "1.72", features: "--features=yyjson" },
13-
{ rust: "nightly-2024-11-22", features: "--features=avx512,yyjson,unstable-simd" },
11+
{ rust: "1.82", features: "" },
12+
{ rust: "1.82", features: "--features=yyjson" },
13+
{ rust: "nightly-2025-01-07", features: "--features=avx512,yyjson,unstable-simd" },
1414
]
1515
python: [
1616
{ version: '3.13' },
@@ -30,7 +30,7 @@ jobs:
3030
with:
3131
python-version: '${{ matrix.python.version }}'
3232

33-
- run: python -m pip install --user --upgrade pip "maturin==1.7.8" wheel
33+
- run: python -m pip install --user --upgrade pip "maturin>=1,<2" wheel
3434

3535
- uses: actions/checkout@v4
3636

.github/workflows/stale.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ permissions:
88

99
jobs:
1010
stale:
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
steps:
1313
- uses: actions/stale@v9
1414
with:
1515
days-before-stale: 7
1616
days-before-close: 1
17+
exempt-assignees: ijl

Cargo.lock

+50-30
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
@@ -5,7 +5,7 @@ authors = ["ijl <[email protected]>"]
55
description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
66
edition = "2021"
77
resolver = "2"
8-
rust-version = "1.72"
8+
rust-version = "1.82"
99
license = "Apache-2.0 OR MIT"
1010
repository = "https://github.com/ijl/orjson"
1111
homepage = "https://github.com/ijl/orjson"
@@ -14,8 +14,8 @@ keywords = ["fast", "json", "dataclass", "dataclasses", "datetime", "rfc", "8259
1414
include = [
1515
"Cargo.toml",
1616
"CHANGELOG.md",
17-
"data",
18-
"include",
17+
"include/pyo3",
18+
"include/yyjson",
1919
"LICENSE-APACHE",
2020
"LICENSE-MIT",
2121
"pyproject.toml",

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -1066,7 +1066,7 @@ No, it supports RFC 8259.
10661066

10671067
## Packaging
10681068

1069-
To package orjson requires at least [Rust](https://www.rust-lang.org/) 1.72
1069+
To package orjson requires at least [Rust](https://www.rust-lang.org/) 1.82
10701070
and the [maturin](https://github.com/PyO3/maturin) build tool. The recommended
10711071
build command is:
10721072

@@ -1078,7 +1078,7 @@ It benefits from also having a C build environment to compile a faster
10781078
deserialization backend. See this project's `manylinux_2_28` builds for an
10791079
example using clang and LTO.
10801080

1081-
The project's own CI tests against `nightly-2024-11-22` and stable 1.72. It
1081+
The project's own CI tests against `nightly-2025-01-07` and stable 1.72. It
10821082
is prudent to pin the nightly version because that channel can introduce
10831083
breaking changes. There is a significant performance benefit to using
10841084
nightly.
@@ -1101,5 +1101,5 @@ tests should be run as part of the build. It can be run with
11011101

11021102
## License
11031103

1104-
orjson was written by ijl <<[email protected]>>, copyright 2018 - 2024, available
1104+
orjson was written by ijl <<[email protected]>>, copyright 2018 - 2025, available
11051105
to you under either the Apache 2 license or MIT license at your choice.

build.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ fn main() {
5252
}
5353

5454
#[cfg(any(target_arch = "x86_64", target_arch = "aarch64"))]
55-
if let Some(64) = python_config.pointer_width {
55+
if matches!(python_config.pointer_width, Some(64)) {
5656
println!("cargo:rustc-cfg=feature=\"inline_int\"");
5757
}
5858

@@ -75,7 +75,9 @@ fn main() {
7575
}
7676
Err(_) => {
7777
if env::var("CARGO_FEATURE_YYJSON").is_ok() {
78-
panic!("yyjson was enabled but the build failed. To build with a different backend do not specify the feature.")
78+
panic!(
79+
"yyjson was enabled but the build failed. To build with a different backend do not specify the feature."
80+
)
7981
}
8082
}
8183
}

include/pyo3/pyo3-build-config/Cargo.toml

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pyo3-build-config"
3-
version = "0.23.0-dev"
3+
version = "0.23.3"
44
description = "Build configuration for the PyO3 ecosystem"
55
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
66
keywords = ["pyo3", "python", "cpython", "ffi"]
@@ -12,12 +12,12 @@ edition = "2021"
1212

1313
[dependencies]
1414
once_cell = "1"
15-
python3-dll-a = { version = "0.2.6", optional = true }
16-
target-lexicon = "0.12.14"
15+
python3-dll-a = { version = "0.2.12", optional = true }
16+
target-lexicon = "0.13"
1717

1818
[build-dependencies]
19-
python3-dll-a = { version = "0.2.6", optional = true }
20-
target-lexicon = "0.12.14"
19+
python3-dll-a = { version = "0.2.12", optional = true }
20+
target-lexicon = "0.13"
2121

2222
[features]
2323
default = []

0 commit comments

Comments
 (0)