Skip to content

Commit

Permalink
cargo update, MSRV 1.65
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Oct 10, 2023
1 parent 53e2f02 commit ce9bae8
Show file tree
Hide file tree
Showing 11 changed files with 87 additions and 69 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/debug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ jobs:
fail-fast: false
matrix:
rust: [
{ version: "1.60" }, # MSRV
{ version: "nightly-2023-08-30" },
{ version: "1.65" }, # MSRV
{ version: "nightly-2023-10-10" },
]
python: [
{ version: '3.11', abi: 'cp311-cp311' },
Expand All @@ -28,7 +28,7 @@ jobs:
python-version: '${{ matrix.python.version }}'
- run: python -m pip install --user --upgrade pip "maturin>=1,<2" wheel

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: build
run: |
Expand Down
Empty file added .github/workflows/lin
Empty file.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain=stable --profile=default -y
- run: pip install -U autoflake isort black ruff mypy types-python-dateutil types-pytz types-simplejson types-ujson

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: cargo fmt
- run: ./script/lint
Expand Down
23 changes: 10 additions & 13 deletions .github/workflows/linux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ jobs:
strategy:
fail-fast: false
env:
RUST_TOOLCHAIN: "1.60" # MSRV
RUST_TOOLCHAIN: "1.65" # MSRV
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain $RUST_TOOLCHAIN -y
- run: rustup default $RUST_TOOLCHAIN

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- run: python3 -m pip install --user --upgrade pip "maturin>=1,<2" wheel

Expand Down Expand Up @@ -71,12 +71,11 @@ jobs:
options: --user 0
steps:
- run: yum install -y clang lld
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2023-08-30 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2023-08-30-x86_64-unknown-linux-gnu
- uses: actions/checkout@v3
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2023-10-10 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2023-10-10-x86_64-unknown-linux-gnu
- uses: actions/checkout@v4

- name: build-std
if: matrix.target.arch != 'aarch64'
run: |
mkdir .cargo
cp ci/config.toml .cargo/config.toml
Expand Down Expand Up @@ -128,10 +127,9 @@ jobs:
arch: x86_64
platform: linux/amd64
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: build-std
if: matrix.target.arch != 'aarch64'
run: |
mkdir .cargo
cp ci/config.toml .cargo/config.toml
Expand All @@ -145,15 +143,15 @@ jobs:
RUSTFLAGS: "-C target-feature=-crt-static"
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
with:
rust-toolchain: nightly-2023-08-30
rust-toolchain: nightly-2023-10-10
rustup-components: rust-src
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_1
args: --release --strip --out=dist --features=no-panic,yyjson -i python${{ matrix.python.version }}

- name: Set up QEMU
if: matrix.platform.arch != 'x86_64'
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:qemu-v7.0.0
platforms: ${{ matrix.platform.platform }}
Expand Down Expand Up @@ -216,10 +214,9 @@ jobs:
},
]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: build-std
if: matrix.target.arch != 'aarch64'
run: |
mkdir .cargo
cp ci/config.toml .cargo/config.toml
Expand All @@ -233,7 +230,7 @@ jobs:
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
with:
target: ${{ matrix.target.target }}
rust-toolchain: nightly-2023-08-30
rust-toolchain: nightly-2023-10-10
rustup-components: rust-src
manylinux: auto
args: --release --strip --out=dist --features=no-panic,yyjson -i python${{ matrix.python.version }}
Expand Down
64 changes: 24 additions & 40 deletions Cargo.lock

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

6 changes: 3 additions & 3 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.60"
rust-version = "1.65"
license = "Apache-2.0 OR MIT"
repository = "https://github.com/ijl/orjson"
homepage = "https://github.com/ijl/orjson"
Expand Down Expand Up @@ -50,9 +50,9 @@ yyjson = []
[dependencies]
ahash = { version = "0.8", default_features = false }
arrayvec = { version = "0.7", default_features = false, features = ["std", "serde"] }
associative-cache = { version = "1", default_features = false }
associative-cache = { version = "2", default_features = false }
beef = { version = "0.5", default_features = false, features = ["impl_serde"] }
bytecount = { version = "^0.6.3", default_features = false, features = ["runtime-dispatch-simd"] }
bytecount = { version = "^0.6.4", default_features = false, features = ["runtime-dispatch-simd"] }
chrono = { version = "^0.4.24", default_features = false }
compact_str = { version = "0.7", default_features = false, features = ["serde"] }
encoding_rs = { version = "0.8", default_features = false }
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ Probably not.

## Packaging

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

Expand All @@ -1195,7 +1195,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-2023-08-30` and stable 1.60. It
The project's own CI tests against `nightly-2023-10-10` and stable 1.65. It
is prudent to pin the nightly version because that channel can introduce
breaking changes.

Expand Down
12 changes: 6 additions & 6 deletions ci/azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
variables:
toolchain: nightly-2023-08-30
toolchain: nightly-2023-10-10

jobs:

Expand All @@ -12,7 +12,7 @@ jobs:
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12.0-rc.1'
versionSpec: '3.12.0'
addToPath: true
allowUnstable: true
- checkout: self
Expand Down Expand Up @@ -79,13 +79,13 @@ jobs:
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.12.0-rc.1\x64\python.exe
interpreter: C:\hostedtoolcache\windows\Python\3.12.0\x64\python.exe
rustup: https://win.rustup.rs/x86_64
target: x86_64-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12.0-rc.1'
versionSpec: '3.12.0'
addToPath: true
allowUnstable: true
architecture: 'x64'
Expand Down Expand Up @@ -160,13 +160,13 @@ jobs:
pool:
vmImage: windows-2022
variables:
interpreter: C:\hostedtoolcache\windows\Python\3.12.0-rc.1\x86\python.exe
interpreter: C:\hostedtoolcache\windows\Python\3.12.0\x86\python.exe
rustup: https://win.rustup.rs/x86
target: i686-pc-windows-msvc
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.12.0-rc.1'
versionSpec: '3.12.0'
addToPath: true
allowUnstable: true
architecture: 'x86'
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python",
"Programming Language :: Rust",
Expand Down
2 changes: 1 addition & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ macro_rules! str_hash {
#[cfg(Py_3_13)]
macro_rules! pydict_contains {
($obj1:expr, $obj2:expr) => {
unsafe { pyo3_ffi::PyDict_Contains((*$obj1).tp_dict, $obj2) == 1 }
unsafe { pyo3_ffi::PyDict_Contains(pyo3_ffi::PyType_GetDict($obj1), $obj2) == 1 }
};
}

Expand Down
Loading

0 comments on commit ce9bae8

Please sign in to comment.