Skip to content

Commit 5397e54

Browse files
committed
cargo update, musllinux_1_2, test and tool misc
1 parent 41018c8 commit 5397e54

35 files changed

+266
-234
lines changed

.github/workflows/debug.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
profile: [
1111
{ rust: "1.65", features: "" },
1212
{ rust: "1.65", features: "--features=yyjson" },
13-
{ rust: "nightly-2024-01-17", features: "--features=yyjson,unstable-simd" },
13+
{ rust: "nightly-2024-02-03", features: "--features=yyjson,unstable-simd" },
1414
]
1515
python: [
1616
{ version: '3.13' },

.github/workflows/linux.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ jobs:
7171
options: --user 0
7272
steps:
7373
- run: yum install -y clang lld
74-
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-01-17 --profile minimal -y
75-
- run: rustup component add rust-src --toolchain nightly-2024-01-17-x86_64-unknown-linux-gnu
74+
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-03 --profile minimal -y
75+
- run: rustup component add rust-src --toolchain nightly-2024-02-03-x86_64-unknown-linux-gnu
7676
- uses: actions/checkout@v4
7777

7878
- name: build-std
@@ -107,7 +107,7 @@ jobs:
107107
path: dist
108108
retention-days: 1
109109

110-
musllinux_1_1:
110+
musllinux_1_2:
111111
runs-on: ubuntu-22.04
112112
strategy:
113113
fail-fast: false
@@ -140,14 +140,14 @@ jobs:
140140
CC: "gcc"
141141
CFLAGS: "-O2"
142142
LDFLAGS: "-O2 -flto -Wl,--as-needed"
143-
RUSTFLAGS: "-C target-feature=-crt-static"
143+
RUSTFLAGS: "-C target-feature=-crt-static -Z mir-opt-level=4"
144144
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
145145
with:
146-
rust-toolchain: nightly-2024-01-17
146+
rust-toolchain: nightly-2024-02-03
147147
rustup-components: rust-src
148148
target: ${{ matrix.platform.target }}
149-
manylinux: musllinux_1_1
150-
args: --release --strip --out=dist --features=no-panic,yyjson -i python${{ matrix.python.version }}
149+
manylinux: musllinux_1_2
150+
args: --release --strip --out=dist --features=encoding_rs/simd-accel,no-panic,unstable-simd,yyjson -i python${{ matrix.python.version }}
151151

152152
- name: Set up QEMU
153153
if: matrix.platform.arch != 'x86_64'
@@ -159,10 +159,11 @@ jobs:
159159
- name: Test
160160
uses: addnab/docker-run-action@v3
161161
with:
162-
image: quay.io/pypa/musllinux_1_1_${{ matrix.platform.arch }}:latest
162+
image: quay.io/pypa/musllinux_1_2_${{ matrix.platform.arch }}:latest
163163
options: -v ${{ github.workspace }}:/io -w /io
164164
run: |
165165
apk add tzdata
166+
sed -i '/^psutil/d' test/requirements.txt # missing 3.11, 3.12 wheels
166167
sed -i '/^numpy/d' test/requirements.txt
167168
168169
python${{ matrix.python.version }} -m venv venv
@@ -238,7 +239,7 @@ jobs:
238239
RUSTFLAGS: "${{ matrix.target.rustflags }}"
239240
with:
240241
target: ${{ matrix.target.target }}
241-
rust-toolchain: nightly-2024-01-17
242+
rust-toolchain: nightly-2024-02-03
242243
rustup-components: rust-src
243244
manylinux: auto
244245
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
@@ -280,7 +281,7 @@ jobs:
280281
contents: write
281282
runs-on: ubuntu-22.04
282283
if: "startsWith(github.ref, 'refs/tags/')"
283-
needs: [ manylinux_2_17_amd64, manylinux_2_17_non_amd64, musllinux_1_1, sdist ]
284+
needs: [ manylinux_2_17_amd64, manylinux_2_17_non_amd64, musllinux_1_2, sdist ]
284285
steps:
285286
- uses: actions/download-artifact@v3
286287
with:

Cargo.lock

Lines changed: 16 additions & 16 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
@@ -14,13 +14,13 @@ keywords = ["fast", "json", "dataclass", "dataclasses", "datetime", "rfc", "8259
1414
include = [
1515
"Cargo.toml",
1616
"CHANGELOG.md",
17-
"data/*",
17+
"data",
1818
"include",
1919
"LICENSE-APACHE",
2020
"LICENSE-MIT",
2121
"pyproject.toml",
2222
"README.md",
23-
"src/*",
23+
"src",
2424
"test/*.py",
2525
"test/requirements.txt",
2626
]

README.md

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

1199-
The project's own CI tests against `nightly-2024-01-17` and stable 1.65. It
1199+
The project's own CI tests against `nightly-2024-02-03` and stable 1.65. It
12001200
is prudent to pin the nightly version because that channel can introduce
12011201
breaking changes.
12021202

ci/azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
variables:
2-
toolchain: nightly-2024-01-17
2+
toolchain: nightly-2024-02-03
33

44
jobs:
55

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ include = [
4343
line-length = 88
4444
target-version = "py38"
4545

46+
[tool.ruff.lint]
4647
select = [
4748
"I",
4849
]
49-
5050
ignore = [
5151
"E501", # line too long
5252
"F601", # Dictionary key literal ... repeated

src/deserialize/cache.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
use associative_cache::replacement::RoundRobinReplacement;
44
use associative_cache::*;
5+
use core::ffi::c_void;
56
use once_cell::unsync::OnceCell;
67
use std::hash::Hasher;
7-
use std::os::raw::c_void;
88

99
#[repr(transparent)]
1010
pub struct CachedKey {
@@ -44,7 +44,7 @@ pub fn cache_hash(key: &[u8]) -> u64 {
4444
debug_assert!(key.len() <= 64);
4545
#[cfg(feature = "intrinsics")]
4646
unsafe {
47-
std::intrinsics::assume(key.len() <= 64);
47+
core::intrinsics::assume(key.len() <= 64);
4848
};
4949
let mut hasher = ahash::AHasher::default();
5050
hasher.write(key);

src/deserialize/deserializer.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
use crate::deserialize::utf8::read_input_to_buf;
44
use crate::deserialize::DeserializeError;
55
use crate::typeref::EMPTY_UNICODE;
6-
use std::ptr::NonNull;
6+
use core::ptr::NonNull;
77

88
pub fn deserialize(
99
ptr: *mut pyo3_ffi::PyObject,

src/deserialize/json.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
use crate::deserialize::pyobject::*;
44
use crate::deserialize::DeserializeError;
55
use crate::str::unicode_from_str;
6+
use core::ptr::NonNull;
67
use serde::de::{self, DeserializeSeed, Deserializer, MapAccess, SeqAccess, Visitor};
78
use smallvec::SmallVec;
89
use std::borrow::Cow;
910
use std::fmt;
10-
use std::ptr::NonNull;
1111

1212
pub fn deserialize_json(
1313
data: &'static str,

0 commit comments

Comments
 (0)