Skip to content

Commit

Permalink
cargo update, misc
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Aug 3, 2024
1 parent 4c05bfa commit 21e40ae
Show file tree
Hide file tree
Showing 17 changed files with 89 additions and 79 deletions.
44 changes: 25 additions & 19 deletions .github/workflows/artifact.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: artifact
on: push
env:
RUST_TOOLCHAIN: "nightly-2024-07-02"
RUST_TOOLCHAIN: "nightly-2024-08-02"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
UNSAFE_PYO3_BUILD_FREE_THREADED: "1"
UNSAFE_PYO3_SKIP_VERSION_CHECK: "1"
jobs:

Expand Down Expand Up @@ -57,16 +58,17 @@ jobs:
retention-days: 1

manylinux_2_17_amd64:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.12' },
{ version: '3.11' },
{ version: '3.10' },
{ version: '3.9' },
{ version: '3.8' },
{ interpreter: 'python3.13', package: 'python3.13' },
{ interpreter: 'python3.12', package: 'python3.12' },
{ interpreter: 'python3.11', package: 'python3.11' },
{ interpreter: 'python3.10', package: 'python3.10' },
{ interpreter: 'python3.9', package: 'python3.9' },
{ interpreter: 'python3.8', package: 'python3.8' },
]
env:
CC: "clang"
Expand All @@ -83,7 +85,8 @@ jobs:

- name: Build environment pre-clone
run: |
dnf install -y rustup clang lld python${{ matrix.python.version }} git
dnf copr enable -y @fedora-llvm-team/llvm19
dnf install -y rustup clang lld ${{ matrix.python.package }} git
rustup-init --default-toolchain "${RUST_TOOLCHAIN}-x86_64-unknown-linux-gnu" --profile minimal --component rust-src -y
- uses: actions/checkout@v4
Expand All @@ -96,7 +99,7 @@ jobs:
cp ci/config.toml .cargo/config.toml
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv --python python${{ matrix.python.version }}
uv venv --python ${{ matrix.python.interpreter }}
uv pip install --upgrade "maturin>=1,<2" -r test/requirements.txt -r integration/requirements.txt
- name: maturin
Expand All @@ -105,7 +108,7 @@ jobs:
maturin build --release --strip \
--features=avx512,no-panic,unstable-simd,yyjson \
--compatibility manylinux_2_17 \
--interpreter python${{ matrix.python.version }} \
--interpreter ${{ matrix.python.interpreter }} \
--target=x86_64-unknown-linux-gnu
uv pip install target/wheels/orjson*.whl
Expand All @@ -121,7 +124,7 @@ jobs:
source .venv/bin/activate
uv pip install -U --pre "numpy>=2.0.0rc1"
pytest -s test/test_numpy.py
if: matrix.python.version != '3.8'
if: matrix.python.version != '3.8' || matrix.python.version != '3.13'
- name: Store wheels
if: "startsWith(github.ref, 'refs/tags/')"
Expand All @@ -133,11 +136,12 @@ jobs:
retention-days: 1

musllinux_1_2:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.13' },
{ version: '3.12' },
{ version: '3.11' },
{ version: '3.10' },
Expand Down Expand Up @@ -169,7 +173,7 @@ jobs:
LDFLAGS: "-Wl,--as-needed"
RUSTFLAGS: "-C lto=fat -Z mir-opt-level=4 -Z virtual-function-elimination -Z threads=2 -D warnings -C target-feature=-crt-static"
with:
rust-toolchain: nightly-2024-07-02
rust-toolchain: nightly-2024-08-02
rustup-components: rust-src
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
Expand Down Expand Up @@ -208,11 +212,12 @@ jobs:
retention-days: 1

manylinux_2_17_non_amd64:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.13', abi: 'cp313-cp313' },
{ version: '3.12', abi: 'cp312-cp312' },
{ version: '3.11', abi: 'cp311-cp311' },
{ version: '3.10', abi: 'cp310-cp310' },
Expand Down Expand Up @@ -265,7 +270,7 @@ jobs:
RUSTFLAGS: "${{ matrix.target.rustflags }}"
with:
target: ${{ matrix.target.target }}
rust-toolchain: nightly-2024-07-02
rust-toolchain: nightly-2024-08-02
rustup-components: rust-src
manylinux: auto
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
Expand Down Expand Up @@ -301,11 +306,12 @@ jobs:
retention-days: 1

macos_universal2_aarch64:
runs-on: macos-14
runs-on: macos-15
strategy:
fail-fast: false
matrix:
python: [
{ version: '3.13', macosx_target: "10.15" },
{ version: '3.12', macosx_target: "10.15" },
{ version: '3.11', macosx_target: "10.15" },
{ version: '3.10', macosx_target: "10.15" },
Expand All @@ -328,7 +334,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-07-02"
toolchain: "nightly-2024-08-02"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"

Expand Down Expand Up @@ -398,7 +404,7 @@ jobs:

- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly-2024-07-02"
toolchain: "nightly-2024-08-02"
targets: "aarch64-apple-darwin, x86_64-apple-darwin"
components: "rust-src"

Expand Down Expand Up @@ -443,7 +449,7 @@ jobs:

pypi:
name: PyPI
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
if: "startsWith(github.ref, 'refs/tags/')"
needs: [
sdist,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ jobs:
profile: [
{ rust: "1.72", features: "" },
{ rust: "1.72", features: "--features=yyjson" },
{ rust: "nightly-2024-07-02", features: "--features=yyjson,unstable-simd"},
{ rust: "nightly-2024-07-02", features: "--features=avx512,yyjson,unstable-simd"},
{ rust: "nightly-2024-08-02", features: "--features=yyjson,unstable-simd"},
{ rust: "nightly-2024-08-02", features: "--features=avx512,yyjson,unstable-simd"},
]
python: [
{ version: '3.13' },
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: lint
on: push
jobs:
lint:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- uses: actions/setup-python@v5
with:
Expand Down
56 changes: 32 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ associative-cache = { version = "2", default-features = false }
beef = { version = "0.5", default-features = false, features = ["impl_serde"] }
bytecount = { version = "^0.6.7", default-features = false, features = ["runtime-dispatch-simd"] }
chrono = { version = "=0.4.34", default-features = false }
compact_str = { version = "0.7", default-features = false, features = ["serde"] }
compact_str = { version = "0.8", default-features = false, features = ["serde"] }
encoding_rs = { version = "0.8", default-features = false }
half = { version = "2", default-features = false, features = ["std"] }
itoa = { version = "1", default-features = false }
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,7 @@ It benefits from also having a C build environment to compile a faster
deserialization backend. See this project's `manylinux_2_28` builds for an
example using clang and LTO.

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

Expand Down
2 changes: 1 addition & 1 deletion ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
toolchain: nightly-2024-07-02
toolchain: nightly-2024-08-02

jobs:

Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
-r test/requirements.txt
maturin
mypy==1.10.0
ruff==0.4.8
ruff==0.5.5
types-python-dateutil
types-pytz
types-simplejson
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use smallvec::SmallVec;
use std::borrow::Cow;
use std::fmt;

pub fn deserialize_json(
pub(crate) fn deserialize(
data: &'static str,
) -> Result<NonNull<pyo3_ffi::PyObject>, DeserializeError<'static>> {
let mut deserializer = serde_json::Deserializer::from_str(data);
Expand Down
13 changes: 13 additions & 0 deletions src/deserialize/backend/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// SPDX-License-Identifier: (Apache-2.0 OR MIT)

#[cfg(not(feature = "yyjson"))]
mod json;

#[cfg(feature = "yyjson")]
mod yyjson;

#[cfg(feature = "yyjson")]
pub(crate) use yyjson::deserialize;

#[cfg(not(feature = "yyjson"))]
pub(crate) use json::deserialize;
Loading

0 comments on commit 21e40ae

Please sign in to comment.