Skip to content

Commit 11d29cb

Browse files
committed
3.14 packaging misc
1 parent 1683918 commit 11d29cb

File tree

5 files changed

+63
-25
lines changed

5 files changed

+63
-25
lines changed

.github/workflows/artifact.yaml

Lines changed: 37 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
matrix:
8181
python: [
8282
{ interpreter: 'python3.14t', compatibility: "manylinux_2_34", publish: false },
83-
{ interpreter: 'python3.14', compatibility: "manylinux_2_34", publish: false },
83+
{ interpreter: 'python3.14', compatibility: "manylinux_2_34", publish: true },
8484
{ interpreter: 'python3.13', compatibility: "manylinux_2_17", publish: true },
8585
{ interpreter: 'python3.12', compatibility: "manylinux_2_17", publish: true },
8686
{ interpreter: 'python3.11', compatibility: "manylinux_2_17", publish: true },
@@ -142,7 +142,7 @@ jobs:
142142
matrix:
143143
python: [
144144
{ interpreter: 'python3.14t', compatibility: "manylinux_2_34", publish: false },
145-
{ interpreter: 'python3.14', compatibility: "manylinux_2_34", publish: false },
145+
{ interpreter: 'python3.14', compatibility: "manylinux_2_34", publish: true },
146146
{ interpreter: 'python3.13', compatibility: "manylinux_2_17", publish: true },
147147
{ interpreter: 'python3.12', compatibility: "manylinux_2_17", publish: true },
148148
{ interpreter: 'python3.11', compatibility: "manylinux_2_17", publish: true },
@@ -201,11 +201,12 @@ jobs:
201201
fail-fast: false
202202
matrix:
203203
python: [
204-
{ interpreter: 'python3.13', abi: 'cp313-cp313' },
205-
{ interpreter: 'python3.12', abi: 'cp312-cp312' },
206-
{ interpreter: 'python3.11', abi: 'cp311-cp311' },
207-
{ interpreter: 'python3.10', abi: 'cp310-cp310' },
208-
{ interpreter: 'python3.9', abi: 'cp39-cp39' },
204+
# { interpreter: 'python3.14', abi: 'cp314-cp314', manylinux: 'manylinux_2_34', publish: true },
205+
{ interpreter: 'python3.13', abi: 'cp313-cp313', manylinux: 'manylinux_2_17', publish: true },
206+
{ interpreter: 'python3.12', abi: 'cp312-cp312', manylinux: 'manylinux_2_17', publish: true },
207+
{ interpreter: 'python3.11', abi: 'cp311-cp311', manylinux: 'manylinux_2_17', publish: true },
208+
{ interpreter: 'python3.10', abi: 'cp310-cp310', manylinux: 'manylinux_2_17', publish: true },
209+
{ interpreter: 'python3.9', abi: 'cp39-cp39', manylinux: 'manylinux_2_17', publish: true },
209210
]
210211
target: [
211212
{
@@ -256,10 +257,11 @@ jobs:
256257
target: "${{ matrix.target.target }}"
257258
rust-toolchain: "${{ env.RUST_TOOLCHAIN }}"
258259
rustup-components: rust-src
259-
manylinux: manylinux_2_17
260+
manylinux: "${{ matrix.python.manylinux }}"
260261
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i ${{ matrix.python.interpreter }}
261262

262263
- name: Store wheels
264+
if: matrix.python.publish == true
263265
uses: actions/upload-artifact@v4
264266
with:
265267
name: "orjson_manylinux_${{ matrix.target.arch }}_${{ matrix.python.interpreter }}"
@@ -305,11 +307,12 @@ jobs:
305307
fail-fast: false
306308
matrix:
307309
python: [
308-
{ version: '3.13', pytest: '1' },
309-
{ version: '3.12', pytest: '1' },
310-
{ version: '3.11', pytest: '0' },
311-
{ version: '3.10', pytest: '0' },
312-
{ version: '3.9', pytest: '0' },
310+
{ version: '3.14', pytest: '1', publish: true },
311+
{ version: '3.13', pytest: '1', publish: true },
312+
{ version: '3.12', pytest: '1', publish: true },
313+
{ version: '3.11', pytest: '0', publish: true },
314+
{ version: '3.10', pytest: '0', publish: true },
315+
{ version: '3.9', pytest: '0', publish: true },
313316
]
314317
platform:
315318
- target: x86_64-unknown-linux-musl
@@ -345,7 +348,7 @@ jobs:
345348
- name: Test
346349
uses: addnab/docker-run-action@v3
347350
with:
348-
image: "quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:2025.07.09-1"
351+
image: "quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:2025.07.25-1"
349352
options: -v ${{ github.workspace }}:/io -w /io
350353
run: |
351354
apk add tzdata
@@ -363,6 +366,7 @@ jobs:
363366
fi
364367
365368
- name: Store wheels
369+
if: matrix.python.publish == true
366370
uses: actions/upload-artifact@v4
367371
with:
368372
name: orjson_musllinux_${{ matrix.platform.arch }}_${{ matrix.python.version }}
@@ -379,11 +383,12 @@ jobs:
379383
fail-fast: false
380384
matrix:
381385
python: [
382-
{ version: '3.13' },
383-
{ version: '3.12' },
384-
{ version: '3.11' },
385-
{ version: '3.10' },
386-
{ version: '3.9' },
386+
{ version: '3.14', publish: true },
387+
{ version: '3.13', publish: true },
388+
{ version: '3.12', publish: true },
389+
{ version: '3.11', publish: true },
390+
{ version: '3.10', publish: true },
391+
{ version: '3.9', publish: true },
387392
]
388393
platform:
389394
- target: aarch64-unknown-linux-musl
@@ -419,7 +424,7 @@ jobs:
419424
- name: Test
420425
uses: addnab/docker-run-action@v3
421426
with:
422-
image: "quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:2025.07.09-1"
427+
image: "quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:2025.07.25-1"
423428
options: -v ${{ github.workspace }}:/io -w /io
424429
run: |
425430
apk add tzdata
@@ -434,6 +439,7 @@ jobs:
434439
venv/bin/python -m pytest -v test
435440
436441
- name: Store wheels
442+
if: matrix.python.publish == true
437443
uses: actions/upload-artifact@v4
438444
with:
439445
name: orjson_musllinux_${{ matrix.platform.arch }}_${{ matrix.python.version }}
@@ -450,6 +456,7 @@ jobs:
450456
fail-fast: false
451457
matrix:
452458
python: [
459+
{ version: '3.14', macosx_target: "15.0", publish: true },
453460
{ version: '3.13', macosx_target: "15.0", publish: true },
454461
{ version: '3.12', macosx_target: "15.0", publish: true },
455462
{ version: '3.11', macosx_target: "15.0", publish: true },
@@ -469,6 +476,7 @@ jobs:
469476

470477
- uses: actions/setup-python@v5
471478
with:
479+
allow-prereleases: true
472480
python-version: "${{ matrix.python.version }}"
473481

474482
- uses: dtolnay/rust-toolchain@master
@@ -530,6 +538,7 @@ jobs:
530538
fail-fast: false
531539
matrix:
532540
python: [
541+
{ version: '3.14', macosx_target: "10.15", publish: true },
533542
{ version: '3.13', macosx_target: "10.15", publish: true },
534543
{ version: '3.12', macosx_target: "10.15", publish: true },
535544
{ version: '3.11', macosx_target: "10.15", publish: true },
@@ -552,6 +561,7 @@ jobs:
552561

553562
- uses: actions/setup-python@v5
554563
with:
564+
allow-prereleases: true
555565
python-version: "${{ matrix.python.version }}"
556566

557567
- uses: dtolnay/rust-toolchain@master
@@ -613,7 +623,7 @@ jobs:
613623
fail-fast: false
614624
matrix:
615625
python: [
616-
{ version: '3.9', macosx_target: "10.15" },
626+
{ version: '3.9', macosx_target: "10.15", publish: true },
617627
]
618628
env:
619629
CC: "clang"
@@ -632,6 +642,7 @@ jobs:
632642

633643
- uses: actions/setup-python@v5
634644
with:
645+
allow-prereleases: true
635646
python-version: "${{ matrix.python.version }}"
636647

637648
- uses: dtolnay/rust-toolchain@master
@@ -676,6 +687,7 @@ jobs:
676687
- run: source .venv/bin/activate && ./integration/run init
677688

678689
- name: Store wheels
690+
if: matrix.python.publish == true
679691
uses: actions/upload-artifact@v4
680692
with:
681693
name: orjson_universal2_amd64_${{ matrix.python.version }}
@@ -692,6 +704,7 @@ jobs:
692704
fail-fast: false
693705
matrix:
694706
python: [
707+
{ version: '3.14', publish: true },
695708
{ version: '3.13', publish: true },
696709
{ version: '3.12', publish: true },
697710
{ version: '3.11', publish: true },
@@ -716,6 +729,7 @@ jobs:
716729

717730
- uses: actions/setup-python@v5
718731
with:
732+
allow-prereleases: true
719733
python-version: "${{ matrix.python.version }}"
720734
architecture: "${{ matrix.platform.arch }}"
721735

@@ -762,6 +776,7 @@ jobs:
762776
fail-fast: false
763777
matrix:
764778
python: [
779+
{ version: '3.14', publish: true },
765780
{ version: '3.13', publish: true },
766781
{ version: '3.12', publish: true },
767782
{ version: '3.11', publish: true },
@@ -781,6 +796,7 @@ jobs:
781796

782797
- uses: actions/setup-python@v5
783798
with:
799+
allow-prereleases: true
784800
python-version: "${{ matrix.python.version }}"
785801
architecture: "arm64"
786802

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ yyjson = []
3838

3939
# Features detected by build.rs. Do not specify.
4040
avx512 = []
41+
c_ulong_32 = []
4142
generic_simd = []
4243
inline_int = []
4344
intrinsics = []

script/check-pypi

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,20 @@ for abi in abis:
4444
for tag in per_abi_tags:
4545
wheels_matrix.add(f"{prefix}-{abi}-{tag}.whl")
4646

47+
wheels_prerelease = {
48+
f"{prefix}-cp314-cp314-macosx_10_15_x86_64.macosx_11_0_arm64.macosx_10_15_universal2.whl",
49+
f"{prefix}-cp314-cp314-macosx_15_0_arm64.whl",
50+
f"{prefix}-cp314-cp314-manylinux_2_34_aarch64.whl",
51+
f"{prefix}-cp314-cp314-manylinux_2_34_x86_64.whl",
52+
f"{prefix}-cp314-cp314-musllinux_1_2_aarch64.whl",
53+
f"{prefix}-cp314-cp314-musllinux_1_2_armv7l.whl",
54+
f"{prefix}-cp314-cp314-musllinux_1_2_i686.whl",
55+
f"{prefix}-cp314-cp314-musllinux_1_2_x86_64.whl",
56+
f"{prefix}-cp314-cp314-win32.whl",
57+
f"{prefix}-cp314-cp314-win_amd64.whl",
58+
f"{prefix}-cp314-cp314-win_arm64.whl",
59+
}
60+
4761
wheels_unique = {
4862
f"{prefix}-cp311-cp311-macosx_15_0_arm64.whl",
4963
f"{prefix}-cp311-cp311-win_arm64.whl",
@@ -53,7 +67,7 @@ wheels_unique = {
5367
f"{prefix}-cp313-cp313-win_arm64.whl",
5468
}
5569

56-
wheels_expected = wheels_matrix | wheels_unique
70+
wheels_expected = wheels_matrix | wheels_unique | wheels_prerelease
5771

5872
wheels_queued = set(
5973
str(each).replace(f"{dist}/", "") for each in Path(dist).glob("*.whl")

src/ffi/compat.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
pub(crate) const _Py_IMMORTAL_REFCNT_LOCAL: u32 = u32::MAX;
66

77
#[cfg(all(Py_3_14, target_pointer_width = "32"))]
8+
#[allow(non_upper_case_globals)]
89
pub(crate) const _Py_IMMORTAL_MINIMUM_REFCNT: pyo3_ffi::Py_ssize_t =
910
((1 as core::ffi::c_long) << (30 as core::ffi::c_long)) as pyo3_ffi::Py_ssize_t;
1011

src/ffi/fragment.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
use core::ffi::c_char;
44

55
#[cfg(Py_GIL_DISABLED)]
6-
use std::sync::atomic::{AtomicIsize, AtomicU32, AtomicU64};
6+
use std::sync::atomic::{AtomicIsize, AtomicU32};
7+
8+
#[cfg(all(Py_GIL_DISABLED, feature = "c_ulong_32"))]
9+
pub(crate) type AtomicCULong = std::sync::atomic::AtomicU32;
10+
11+
#[cfg(all(Py_GIL_DISABLED, not(feature = "c_ulong_32")))]
12+
pub(crate) type AtomicCULong = std::sync::atomic::AtomicU64;
713

814
use core::ptr::null_mut;
915
use pyo3_ffi::{
@@ -106,8 +112,8 @@ pub(crate) unsafe extern "C" fn orjson_fragment_dealloc(object: *mut PyObject) {
106112
}
107113

108114
#[cfg(Py_GIL_DISABLED)]
109-
const FRAGMENT_TP_FLAGS: AtomicU64 =
110-
AtomicU64::new(Py_TPFLAGS_DEFAULT | pyo3_ffi::Py_TPFLAGS_IMMUTABLETYPE);
115+
const FRAGMENT_TP_FLAGS: AtomicCULong =
116+
AtomicCULong::new(Py_TPFLAGS_DEFAULT | pyo3_ffi::Py_TPFLAGS_IMMUTABLETYPE);
111117

112118
#[cfg(all(Py_3_10, not(Py_GIL_DISABLED)))]
113119
const FRAGMENT_TP_FLAGS: core::ffi::c_ulong =

0 commit comments

Comments
 (0)