Skip to content

Commit

Permalink
cargo update
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Feb 14, 2024
1 parent 4eb4f00 commit c825472
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 34 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
fail-fast: false
matrix:
profile: [
{ rust: "1.65", features: "" },
{ rust: "1.65", features: "--features=yyjson" },
{ rust: "nightly-2024-02-03", features: "--features=yyjson,unstable-simd" },
{ rust: "1.72", features: "" },
{ rust: "1.72", features: "--features=yyjson" },
{ rust: "nightly-2024-02-13", features: "--features=yyjson,unstable-simd" },
]
python: [
{ version: '3.13' },
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
env:
RUST_TOOLCHAIN: "1.65" # MSRV
RUST_TOOLCHAIN: "1.72" # MSRV
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_TOOLCHAIN -y
- run: rustup default $RUST_TOOLCHAIN
Expand Down Expand Up @@ -71,8 +71,8 @@ jobs:
options: --user 0
steps:
- run: yum install -y clang lld
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-03 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2024-02-03-x86_64-unknown-linux-gnu
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2024-02-13 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2024-02-13-x86_64-unknown-linux-gnu
- uses: actions/checkout@v4

- name: build-std
Expand All @@ -84,7 +84,7 @@ jobs:
- run: |
maturin build --release --strip \
--out=dist \
--features=encoding_rs/simd-accel,no-panic,unstable-simd,yyjson \
--features=no-panic,unstable-simd,yyjson \
--compatibility manylinux_2_17 \
--interpreter python${{ matrix.python.version }} \
--target=x86_64-unknown-linux-gnu
Expand Down Expand Up @@ -143,11 +143,11 @@ jobs:
RUSTFLAGS: "-C target-feature=-crt-static -Z mir-opt-level=4"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
with:
rust-toolchain: nightly-2024-02-03
rust-toolchain: nightly-2024-02-13
rustup-components: rust-src
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_2
args: --release --strip --out=dist --features=encoding_rs/simd-accel,no-panic,unstable-simd,yyjson -i python${{ matrix.python.version }}
args: --release --strip --out=dist --features=no-panic,unstable-simd,yyjson -i python${{ matrix.python.version }}

- name: Set up QEMU
if: matrix.platform.arch != 'x86_64'
Expand Down Expand Up @@ -196,7 +196,7 @@ jobs:
{
arch: 'aarch64',
cflags: '-O2 -flto',
features: 'encoding_rs/simd-accel,no-panic,unstable-simd,yyjson',
features: 'no-panic,unstable-simd,yyjson',
rustflags: '-Z mir-opt-level=4 -D warnings',
target: 'aarch64-unknown-linux-gnu',
},
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
RUSTFLAGS: "${{ matrix.target.rustflags }}"
with:
target: ${{ matrix.target.target }}
rust-toolchain: nightly-2024-02-03
rust-toolchain: nightly-2024-02-13
rustup-components: rust-src
manylinux: auto
args: --release --strip --out=dist --features=${{ matrix.target.features }} -i python${{ matrix.python.version }}
Expand Down
12 changes: 6 additions & 6 deletions Cargo.lock

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

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["ijl <ijl@mailbox.org>"]
description = "Fast, correct Python JSON library supporting dataclasses, datetimes, and numpy"
edition = "2021"
resolver = "2"
rust-version = "1.65"
rust-version = "1.72"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/ijl/orjson"
homepage = "https://github.com/ijl/orjson"
Expand Down Expand Up @@ -45,7 +45,7 @@ no-panic = [
yyjson = []

[dependencies]
ahash = { version = "=0.8.6", default_features = false, features = ["compile-time-rng"] }
ahash = { version = "^0.8.8", default_features = false, features = ["compile-time-rng"] }
arrayvec = { version = "0.7", default_features = false, features = ["std", "serde"] }
associative-cache = { version = "2", default_features = false }
beef = { version = "0.5", default_features = false, features = ["impl_serde"] }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ No. `bytes` is the correct type for a serialized blob.

## Packaging

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

Expand All @@ -1196,7 +1196,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-02-03` and stable 1.65. It
The project's own CI tests against `nightly-2024-02-13` and stable 1.65. 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-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ steps:
PATH=$HOME/.cargo/bin:$PATH \
MACOSX_DEPLOYMENT_TARGET=$(macosx_deployment_target) \
PYO3_CROSS_LIB_DIR=$(python -c "import sysconfig;print(sysconfig.get_config_var('LIBDIR'))") \
maturin build --release --strip --features=encoding_rs/simd-accel,no-panic,unstable-simd,yyjson --interpreter $(interpreter) --target=universal2-apple-darwin
maturin build --release --strip --features=no-panic,unstable-simd,yyjson --interpreter $(interpreter) --target=universal2-apple-darwin
env:
CC: "clang"
CFLAGS: "-O2 -fstrict-aliasing -flto=full"
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-02-03
toolchain: nightly-2024-02-13

jobs:

Expand Down
4 changes: 3 additions & 1 deletion ci/azure-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,10 @@ steps:
displayName: build dependencies
- script: python.exe -m pip install -r test\requirements.txt -r integration\requirements.txt
displayName: test dependencies
- script: maturin.exe build --release --features=encoding_rs/simd-accel,no-panic,yyjson --strip --interpreter $(interpreter) --target $(target)
- script: maturin.exe build --release --features=no-panic,unstable-simd,yyjson --strip --interpreter $(interpreter) --target $(target)
displayName: build
env:
RUSTFLAGS: "-Z mir-opt-level=4"
- script: python.exe -m pip install orjson --no-index --find-links=D:\a\1\s\target\wheels
displayName: install
- script: python.exe -m pytest -s -rxX -v test
Expand Down
4 changes: 0 additions & 4 deletions src/serialize/per_type/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,6 @@ impl DateTimeLike for DateTime {
pydatetime_get!(second, PyDateTime_DATE_GET_SECOND, u8);
pydatetime_get!(microsecond, PyDateTime_DATE_GET_MICROSECOND, u32);

fn millisecond(&self) -> u32 {
self.microsecond() / 1_000
}

fn nanosecond(&self) -> u32 {
self.microsecond() * 1_000
}
Expand Down
2 changes: 0 additions & 2 deletions src/serialize/per_type/datetimelike.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ pub trait DateTimeLike {
fn minute(&self) -> u8;
/// Returns the second component of the datetime.
fn second(&self) -> u8;
/// Returns the number of milliseconds since the whole non-leap second.
fn millisecond(&self) -> u32;
/// Returns the number of microseconds since the whole non-leap second.
fn microsecond(&self) -> u32;
/// Returns the number of nanoseconds since the whole non-leap second.
Expand Down
4 changes: 0 additions & 4 deletions src/serialize/per_type/numpy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1279,10 +1279,6 @@ impl DateTimeLike for NumpyDatetime64Repr {
forward_inner!(second, u8);
forward_inner!(nanosecond, u32);

fn millisecond(&self) -> u32 {
self.nanosecond() / 1_000_000
}

fn microsecond(&self) -> u32 {
self.nanosecond() / 1_000
}
Expand Down

0 comments on commit c825472

Please sign in to comment.