Skip to content

Commit 3de9324

Browse files
committed
MSRV 1.85, edition 2024, stdarch_x86_avx512 fix
1 parent d7359c9 commit 3de9324

File tree

7 files changed

+41
-40
lines changed

7 files changed

+41
-40
lines changed

.github/workflows/artifact.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ env:
44
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
55
FORCE_COLOR: "1"
66
PIP_DISABLE_PIP_VERSION_CHECK: "1"
7-
RUST_TOOLCHAIN: "nightly-2025-04-15"
7+
RUST_TOOLCHAIN: "nightly-2025-08-10"
88
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
99
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
1010
UV_LINK_MODE: "copy"
@@ -16,7 +16,7 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
env:
19-
RUST_TOOLCHAIN: "1.82" # MSRV
19+
RUST_TOOLCHAIN: "1.85" # MSRV
2020
steps:
2121

2222
- uses: actions/setup-python@v5

.github/workflows/unusual.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
profile: [
15-
{ rust: "1.82", features: "" }, # MSRV
16-
{ rust: "nightly-2025-04-15", features: "--features=generic_simd" },
15+
{ rust: "1.85", features: "" }, # MSRV
16+
{ rust: "nightly-2025-08-10", features: "--features=generic_simd" },
1717
]
1818
python: [
1919
{ version: '3.13' },

Cargo.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 2 deletions
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.82"
8+
rust-version = "1.85"
99
license = "Apache-2.0 OR MIT"
1010
readme = "README.md"
1111
keywords = ["fast", "json", "dataclass", "dataclasses", "datetime", "rfc", "8259", "3339"]
@@ -60,7 +60,7 @@ serde = { version = "1", default-features = false }
6060
serde_json = { version = "1", default-features = false, features = ["std", "float_roundtrip"] }
6161
simdutf8 = { version = "0.1", default-features = false, features = ["std", "public_imp", "aarch64_neon"] }
6262
smallvec = { version = "^1.11", default-features = false, features = ["union", "write"] }
63-
unwinding = { version = "=0.2.5", default-features = false, features = ["unwinder"], optional = true }
63+
unwinding = { version = "=0.2.8", default-features = false, features = ["unwinder"], optional = true }
6464
uuid = { version = "1", default-features = false }
6565
xxhash-rust = { version = "^0.8", default-features = false, features = ["xxh3"] }
6666

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1083,7 +1083,7 @@ It benefits from also having a C build environment to compile a faster
10831083
deserialization backend. See this project's `manylinux_2_28` builds for an
10841084
example using clang and LTO.
10851085

1086-
The project's own CI tests against `nightly-2025-04-15` and stable 1.82. It
1086+
The project's own CI tests against `nightly-2025-08-10` and stable 1.82. It
10871087
is prudent to pin the nightly version because that channel can introduce
10881088
breaking changes. There is a significant performance benefit to using
10891089
nightly.

src/ffi/compat.rs

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,32 @@ pub(crate) const _Py_IMMORTAL_REFCNT: pyo3_ffi::Py_ssize_t = {
2323
#[inline(always)]
2424
#[allow(non_snake_case)]
2525
pub(crate) unsafe fn _Py_IsImmortal(op: *mut pyo3_ffi::PyObject) -> core::ffi::c_int {
26-
#[cfg(all(target_pointer_width = "64", not(Py_GIL_DISABLED)))]
27-
{
28-
(((*op).ob_refcnt.ob_refcnt as pyo3_ffi::PY_INT32_T) < 0) as core::ffi::c_int
29-
}
30-
31-
#[cfg(all(target_pointer_width = "32", not(Py_GIL_DISABLED)))]
32-
{
33-
#[cfg(not(Py_3_14))]
26+
unsafe {
27+
#[cfg(all(target_pointer_width = "64", not(Py_GIL_DISABLED)))]
3428
{
35-
((*op).ob_refcnt.ob_refcnt == _Py_IMMORTAL_REFCNT) as core::ffi::c_int
29+
(((*op).ob_refcnt.ob_refcnt as pyo3_ffi::PY_INT32_T) < 0) as core::ffi::c_int
3630
}
3731

38-
#[cfg(Py_3_14)]
32+
#[cfg(all(target_pointer_width = "32", not(Py_GIL_DISABLED)))]
3933
{
40-
((*op).ob_refcnt.ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT) as core::ffi::c_int
34+
#[cfg(not(Py_3_14))]
35+
{
36+
((*op).ob_refcnt.ob_refcnt == _Py_IMMORTAL_REFCNT) as core::ffi::c_int
37+
}
38+
39+
#[cfg(Py_3_14)]
40+
{
41+
((*op).ob_refcnt.ob_refcnt >= _Py_IMMORTAL_MINIMUM_REFCNT) as core::ffi::c_int
42+
}
4143
}
42-
}
4344

44-
#[cfg(Py_GIL_DISABLED)]
45-
{
46-
((*op)
47-
.ob_ref_local
48-
.load(std::sync::atomic::Ordering::Relaxed)
49-
== _Py_IMMORTAL_REFCNT_LOCAL) as core::ffi::c_int
45+
#[cfg(Py_GIL_DISABLED)]
46+
{
47+
((*op)
48+
.ob_ref_local
49+
.load(std::sync::atomic::Ordering::Relaxed)
50+
== _Py_IMMORTAL_REFCNT_LOCAL) as core::ffi::c_int
51+
}
5052
}
5153
}
5254

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
// SPDX-License-Identifier: (Apache-2.0 OR MIT)
22

3-
#![cfg_attr(feature = "avx512", feature(stdarch_x86_avx512, avx512_target_feature))] // MSRV 1.89
43
#![cfg_attr(feature = "intrinsics", feature(core_intrinsics))]
54
#![cfg_attr(feature = "optimize", feature(optimize_attribute))]
65
#![cfg_attr(feature = "generic_simd", feature(portable_simd))]

0 commit comments

Comments
 (0)