From ef5a32e7c9f1a0ea8567b5447cff50a6444e1f8e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 23 Oct 2024 13:52:09 +0000 Subject: [PATCH 1/2] Bump jiter from 0.5.0 to 0.6.1 Bumps [jiter](https://github.com/pydantic/jiter) from 0.5.0 to 0.6.1. - [Release notes](https://github.com/pydantic/jiter/releases) - [Commits](https://github.com/pydantic/jiter/compare/v0.5.0...v0.6.1) --- updated-dependencies: - dependency-name: jiter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8f15bb376..4d6e9a307 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -297,9 +297,9 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jiter" -version = "0.5.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e23549143ef50eddffd46ba8cd0229b0a4500aef7518cf2eb0f41c9a09d22b" +checksum = "a9d54b46955906f90a4ba92a18bb2d3c6dbaf1d95acbbd112da0657e5297b432" dependencies = [ "ahash", "bitvec", diff --git a/Cargo.toml b/Cargo.toml index f0b5364ca..b8a73c0e4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -46,7 +46,7 @@ base64 = "0.22.1" num-bigint = "0.4.6" python3-dll-a = "0.2.10" uuid = "1.11.0" -jiter = { version = "0.5", features = ["python"] } +jiter = { version = "0.6", features = ["python"] } hex = "0.4.3" [lib] From b013c03c58d5a6fb599d5adabe2be731d53131e3 Mon Sep 17 00:00:00 2001 From: David Hewitt Date: Wed, 23 Oct 2024 15:04:50 +0100 Subject: [PATCH 2/2] compile fixes --- src/lib.rs | 4 ++-- src/validators/json.rs | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index d1e042863..0fdb038ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -4,7 +4,7 @@ extern crate core; use std::sync::OnceLock; -use jiter::{map_json_error, PartialMode, PythonParse, StringCacheMode}; +use jiter::{map_json_error, FloatMode, PartialMode, PythonParse, StringCacheMode}; use pyo3::exceptions::PyTypeError; use pyo3::{prelude::*, sync::GILOnceCell}; use serializers::BytesMode; @@ -61,7 +61,7 @@ pub fn from_json<'py>( cache_mode: cache_strings, partial_mode: allow_partial, catch_duplicate_keys: false, - lossless_floats: false, + float_mode: FloatMode::Float, }; parse_builder .python_parse(py, json_bytes) diff --git a/src/validators/json.rs b/src/validators/json.rs index f86cc4624..79a36e058 100644 --- a/src/validators/json.rs +++ b/src/validators/json.rs @@ -1,3 +1,4 @@ +use jiter::FloatMode; use pyo3::intern; use pyo3::prelude::*; use pyo3::types::PyDict; @@ -71,7 +72,7 @@ impl Validator for JsonValidator { cache_mode: state.cache_str(), partial_mode: PartialMode::Off, catch_duplicate_keys: false, - lossless_floats: false, + float_mode: FloatMode::Float, }; let obj = parse_builder .python_parse(py, json_bytes)