Skip to content

Commit f9f3217

Browse files
authored
chore: pyo3-v0.27.x (#228)
1 parent 114b6e6 commit f9f3217

File tree

4 files changed

+13
-9
lines changed

4 files changed

+13
-9
lines changed

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ resolver = "2"
44

55
[workspace.package]
66
authors = ["Samuel Colvin <samuel@pydantic.dev>"]
7-
version = "0.11.1"
7+
version = "0.12.0"
88
edition = "2021"
99
license = "MIT"
1010
keywords = ["JSON", "parsing", "deserialization", "iter"]
@@ -25,5 +25,5 @@ inherits = "release"
2525
debug = true
2626

2727
[workspace.dependencies]
28-
pyo3 = { version = "0.26" }
29-
pyo3-build-config = { version = "0.26" }
28+
pyo3 = { version = "0.27" }
29+
pyo3-build-config = { version = "0.27" }

crates/jiter/src/py_lossless_float.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ impl Default for FloatMode {
2020

2121
const FLOAT_ERROR: &str = "Invalid float mode, should be `'float'`, `'decimal'` or `'lossless-float'`";
2222

23-
impl<'py> FromPyObject<'py> for FloatMode {
24-
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
23+
impl<'py> FromPyObject<'_, 'py> for FloatMode {
24+
type Error = PyErr;
25+
fn extract(ob: Borrowed<'_, 'py, PyAny>) -> PyResult<Self> {
2526
if let Ok(str_mode) = ob.extract::<&str>() {
2627
match str_mode {
2728
"float" => Ok(Self::Float),

crates/jiter/src/py_string_cache.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@ impl Default for StringCacheMode {
2020
}
2121
}
2222

23-
impl<'py> FromPyObject<'py> for StringCacheMode {
24-
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<StringCacheMode> {
23+
impl<'py> FromPyObject<'_, 'py> for StringCacheMode {
24+
type Error = PyErr;
25+
26+
fn extract(ob: Borrowed<'_, 'py, PyAny>) -> PyResult<StringCacheMode> {
2527
if let Ok(bool_mode) = ob.cast::<PyBool>() {
2628
Ok(bool_mode.is_true().into())
2729
} else if let Ok(str_mode) = ob.extract::<&str>() {

crates/jiter/src/python.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,8 +237,9 @@ impl<StringCache: StringMaybeCache, KeyCheck: MaybeKeyCheck, ParseNumber: MaybeP
237237

238238
const PARTIAL_ERROR: &str = "Invalid partial mode, should be `'off'`, `'on'`, `'trailing-strings'` or a `bool`";
239239

240-
impl<'py> FromPyObject<'py> for PartialMode {
241-
fn extract_bound(ob: &Bound<'py, PyAny>) -> PyResult<Self> {
240+
impl<'py> FromPyObject<'_, 'py> for PartialMode {
241+
type Error = PyErr;
242+
fn extract(ob: Borrowed<'_, 'py, PyAny>) -> PyResult<Self> {
242243
if let Ok(bool_mode) = ob.cast::<PyBool>() {
243244
Ok(bool_mode.is_true().into())
244245
} else if let Ok(str_mode) = ob.extract::<&str>() {

0 commit comments

Comments
 (0)