Skip to content

Commit

Permalink
pyo3 0.17, ahash 0.8, cargo update
Browse files Browse the repository at this point in the history
  • Loading branch information
ijl committed Aug 27, 2022
1 parent b9e8e7f commit 263e912
Show file tree
Hide file tree
Showing 17 changed files with 406 additions and 113 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux-cross.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
with:
maturin-version: v0.13.1
target: ${{ matrix.target }}
rust-toolchain: nightly-2022-07-26
rust-toolchain: nightly-2022-08-26
manylinux: auto
args: -i python3.9 --release --strip --out dist
- uses: uraimo/run-on-arch-action@v2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/manylinux2014.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
image: quay.io/pypa/manylinux2014_x86_64:latest
options: --user 0
steps:
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-07-26 --profile minimal -y
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-08-26 --profile minimal -y
- uses: actions/checkout@v2
- run: python3 -m pip install --user --upgrade pip "maturin>=0.13,<0.14" wheel
- run: maturin build --release --strip --features=unstable-simd,yyjson --compatibility manylinux2014 --interpreter python${{ matrix.python.version }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/manylinux_2_28.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
options: --user 0
steps:
- run: yum install -y clang lld
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-07-26 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2022-07-26-x86_64-unknown-linux-gnu
- run: curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-08-26 --profile minimal -y
- run: rustup component add rust-src --toolchain nightly-2022-08-26-x86_64-unknown-linux-gnu
- uses: actions/checkout@v2
- run: python3 -m pip install --user --upgrade pip "maturin>=0.13,<0.14" wheel
- run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/musllinux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
uses: messense/maturin-action@v1
with:
maturin-version: v0.13.1
rust-toolchain: nightly-2022-07-26
rust-toolchain: nightly-2022-08-26
target: ${{ matrix.platform.target }}
manylinux: musllinux_1_1
args: --release --strip --out dist --features=unstable-simd,yyjson -i python${{ matrix.python.version }}
Expand Down
49 changes: 16 additions & 33 deletions Cargo.lock

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

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,17 @@ unstable-simd = [
yyjson = []

[dependencies]
ahash = { version = "0.7", default_features = false }
ahash = { version = "0.8", default_features = false }
arrayvec = { version = "0.7", default_features = false, features = ["std", "serde"] }
associative-cache = { version = "1" }
associative-cache = { version = "1", default_features = false }
beef = { version = "0.5", default_features = false, features = ["impl_serde"] }
bytecount = { version = "^0.6.2", default_features = false, features = ["runtime-dispatch-simd"] }
chrono = { version = "=0.4.19", default_features = false }
compact_str = { version = "0.5", default_features = false, features = ["serde"] }
compact_str = { version = "0.6", default_features = false, features = ["serde"] }
encoding_rs = { version = "0.8", default_features = false }
itoa = { version = "1", default_features = false }
once_cell = { version = "1", default_features = false }
pyo3-ffi = { version = "^0.16.5", default_features = false, features = ["extension-module"]}
pyo3-ffi = { version = "0.17", default_features = false, features = ["extension-module"]}
ryu = { version = "1", default_features = false }
serde = { version = "1", default_features = false }
serde_json = { path = "include/json", default_features = false, features = ["std", "float_roundtrip"] }
Expand All @@ -63,7 +63,7 @@ smallvec = { version = "^1.9", default_features = false, features = ["union", "w

[build-dependencies]
cc = { version = "1" }
pyo3-build-config = "^0.16.5"
pyo3-build-config = { version = "0.17" }
version_check = { version = "0.9" }

[profile.release]
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,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-2022-07-26` and stable 1.57. It
The project's own CI tests against `nightly-2022-08-26` and stable 1.57. 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-2022-07-26
toolchain: nightly-2022-08-26

jobs:

Expand Down
8 changes: 4 additions & 4 deletions ci/drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ steps:
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
commands:
- yum install -y clang lld
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-07-26 --profile minimal -y
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-08-26 --profile minimal -y
- python3.10 -m pip install --user --upgrade pip "maturin>=0.13,<0.14" wheel
- cargo fetch
- maturin build --release --strip --compatibility manylinux_2_28 --features=unstable-simd,yyjson --interpreter python3.10
Expand Down Expand Up @@ -45,7 +45,7 @@ steps:
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
commands:
- yum install -y clang lld
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-07-26 --profile minimal -y
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-08-26 --profile minimal -y
- python3.9 -m pip install --user --upgrade pip "maturin>=0.13,<0.14" wheel
- maturin build --release --strip --compatibility manylinux_2_28 --features=unstable-simd,yyjson --interpreter python3.9
- python3.9 -m pip install --user target/wheels/orjson*.whl
Expand Down Expand Up @@ -73,7 +73,7 @@ steps:
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
commands:
- yum install -y clang lld
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-07-26 --profile minimal -y
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-08-26 --profile minimal -y
- python3.8 -m pip install --user --upgrade pip "maturin>=0.13,<0.14" wheel
- maturin build --release --strip --compatibility manylinux_2_28 --features=unstable-simd,yyjson --interpreter python3.8
- python3.8 -m pip install --user target/wheels/orjson*.whl
Expand Down Expand Up @@ -101,7 +101,7 @@ steps:
CARGO_UNSTABLE_SPARSE_REGISTRY: "true"
commands:
- yum install -y clang lld
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-07-26 --profile minimal -y
- curl https://sh.rustup.rs -sSf | sh -s -- --default-toolchain nightly-2022-08-26 --profile minimal -y
- python3.7 -m pip install --user --upgrade pip "maturin>=0.13,<0.14" wheel
- maturin build --release --strip --compatibility manylinux_2_28 --features=unstable-simd,yyjson --interpreter python3.7
- python3.7 -m pip install --user target/wheels/orjson*.whl
Expand Down
3 changes: 2 additions & 1 deletion include/json/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "serde_json"
version = "1.0.83" # remember to update html_root_url
version = "1.0.85" # remember to update html_root_url
authors = ["Erick Tryzelaar <[email protected]>", "David Tolnay <[email protected]>"]
categories = ["encoding", "parser-implementations", "no-std"]
description = "A JSON serialization file format"
Expand All @@ -20,6 +20,7 @@ ryu = "1.0"

[dev-dependencies]
automod = "1.0"
indoc = "1.0"
ref-cast = "1.0"
rustversion = "1.0"
serde = { version = "1.0.100", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion include/json/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@
//! [macro]: https://docs.serde.rs/serde_json/macro.json.html
//! [`serde-json-core`]: https://github.com/rust-embedded-community/serde-json-core
#![doc(html_root_url = "https://docs.rs/serde_json/1.0.83")]
#![doc(html_root_url = "https://docs.rs/serde_json/1.0.85")]
// Ignored clippy lints
#![allow(
clippy::collapsible_else_if,
Expand Down
29 changes: 4 additions & 25 deletions include/json/src/number.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ impl Display for Number {
#[cfg(not(feature = "arbitrary_precision"))]
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
match self.n {
N::PosInt(u) => Display::fmt(&u, formatter),
N::NegInt(i) => Display::fmt(&i, formatter),
N::Float(f) => Display::fmt(&f, formatter),
N::PosInt(u) => formatter.write_str(itoa::Buffer::new().format(u)),
N::NegInt(i) => formatter.write_str(itoa::Buffer::new().format(i)),
N::Float(f) => formatter.write_str(ryu::Buffer::new().format_finite(f)),
}
}

Expand All @@ -305,29 +305,8 @@ impl Display for Number {
}

impl Debug for Number {
#[cfg(not(feature = "arbitrary_precision"))]
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
let mut debug = formatter.debug_tuple("Number");
match self.n {
N::PosInt(i) => {
debug.field(&i);
}
N::NegInt(i) => {
debug.field(&i);
}
N::Float(f) => {
debug.field(&f);
}
}
debug.finish()
}

#[cfg(feature = "arbitrary_precision")]
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
formatter
.debug_tuple("Number")
.field(&format_args!("{}", self.n))
.finish()
write!(formatter, "Number({})", self)
}
}

Expand Down
22 changes: 10 additions & 12 deletions include/json/src/value/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -177,19 +177,17 @@ pub enum Value {
impl Debug for Value {
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
match self {
Value::Null => formatter.debug_tuple("Null").finish(),
Value::Bool(v) => formatter.debug_tuple("Bool").field(v).finish(),
Value::Number(v) => Debug::fmt(v, formatter),
Value::String(v) => formatter.debug_tuple("String").field(v).finish(),
Value::Array(v) => {
formatter.write_str("Array(")?;
Debug::fmt(v, formatter)?;
formatter.write_str(")")
Value::Null => formatter.write_str("Null"),
Value::Bool(boolean) => write!(formatter, "Bool({})", boolean),
Value::Number(number) => Debug::fmt(number, formatter),
Value::String(string) => write!(formatter, "String({:?})", string),
Value::Array(vec) => {
formatter.write_str("Array ")?;
Debug::fmt(vec, formatter)
}
Value::Object(v) => {
formatter.write_str("Object(")?;
Debug::fmt(v, formatter)?;
formatter.write_str(")")
Value::Object(map) => {
formatter.write_str("Object ")?;
Debug::fmt(map, formatter)
}
}
}
Expand Down
Loading

0 comments on commit 263e912

Please sign in to comment.