Skip to content

Commit 761ae20

Browse files
authored
Bump dependencies (#71)
1 parent 11a8aff commit 761ae20

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

Cargo.lock

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ name = "neo4j_rust_ext"
1010
crate-type = ["cdylib"]
1111

1212
[dependencies]
13-
pyo3 = "0.26.0"
13+
pyo3 = "0.27.1"

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pandas = ["neo4j[pandas]"]
5858
pyarrow = ["neo4j[pyarrow]"]
5959

6060
[build-system]
61-
requires = ["maturin ~= 1.9.1"]
61+
requires = ["maturin ~= 1.9.6"]
6262
build-backend = "maturin"
6363

6464
[dependency-groups]
@@ -86,7 +86,7 @@ test = [
8686
]
8787
packaging = [
8888
"build",
89-
"maturin ~= 1.9.1",
89+
"maturin ~= 1.9.6",
9090
"towncrier >= 24.8.0",
9191
]
9292

src/codec/packstream/v1/pack.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ impl TypeMappings {
6060
let Ok(typ) = typ else {
6161
return true;
6262
};
63-
let Ok(typ) = typ.downcast::<PyType>() else {
63+
let Ok(typ) = typ.cast::<PyType>() else {
6464
return true;
6565
};
6666
is_of_known_bytes_types(typ).map(|b| !b).unwrap_or(true)
@@ -203,9 +203,9 @@ impl<'a> PackStreamEncoder<'a> {
203203
return self.write_string(value.extract::<&str>()?);
204204
}
205205

206-
if let Ok(value) = value.downcast::<PyBytes>() {
206+
if let Ok(value) = value.cast::<PyBytes>() {
207207
return self.write_bytes(value.as_bytes());
208-
} else if let Ok(value) = value.downcast::<PyByteArray>() {
208+
} else if let Ok(value) = value.cast::<PyByteArray>() {
209209
return with_critical_section(value, || {
210210
// SAFETY:
211211
// * we're holding the GIL/are attached to the Python interpreter

src/vector/native_conversion.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ fn vec_value_as_f64(value: Bound<PyAny>) -> PyResult<f64> {
4343
}
4444

4545
value
46-
.downcast::<PyFloat>()
46+
.cast::<PyFloat>()
4747
.or_else(|_| make_error(&value))?
4848
.extract()
4949
.or_else(|_| make_error(&value))
@@ -92,7 +92,7 @@ fn vec_value_as_f32(value: Bound<PyAny>) -> PyResult<f32> {
9292
}
9393

9494
value
95-
.downcast::<PyFloat>()
95+
.cast::<PyFloat>()
9696
.or_else(|_| make_error(&value))?
9797
.extract()
9898
.or_else(|_| make_error(&value))
@@ -142,7 +142,7 @@ fn vec_value_as_i64(value: Bound<PyAny>) -> PyResult<i64> {
142142

143143
let py = value.py();
144144

145-
let value = value.downcast::<PyInt>().or_else(|_| make_error(&value))?;
145+
let value = value.cast::<PyInt>().or_else(|_| make_error(&value))?;
146146
if value.lt(PyInt::new(py, i64::MIN))? || value.gt(PyInt::new(py, i64::MAX))? {
147147
return Err(PyErr::new::<PyOverflowError, _>(format!(
148148
"Value {} is out of range for i64: [-9223372036854775808, 9223372036854775807]",
@@ -196,7 +196,7 @@ fn vec_value_as_i32(value: Bound<PyAny>) -> PyResult<i32> {
196196

197197
let py = value.py();
198198

199-
let value = value.downcast::<PyInt>().or_else(|_| make_error(&value))?;
199+
let value = value.cast::<PyInt>().or_else(|_| make_error(&value))?;
200200
if value.lt(PyInt::new(py, i32::MIN))? || value.gt(PyInt::new(py, i32::MAX))? {
201201
return Err(PyErr::new::<PyOverflowError, _>(format!(
202202
"Value {} is out of range for i32: [-2147483648, 2147483647]",
@@ -250,7 +250,7 @@ fn vec_value_as_i16(value: Bound<PyAny>) -> PyResult<i16> {
250250

251251
let py = value.py();
252252

253-
let value = value.downcast::<PyInt>().or_else(|_| make_error(&value))?;
253+
let value = value.cast::<PyInt>().or_else(|_| make_error(&value))?;
254254
if value.lt(PyInt::new(py, i16::MIN))? || value.gt(PyInt::new(py, i16::MAX))? {
255255
return Err(PyErr::new::<PyOverflowError, _>(format!(
256256
"Value {} is out of range for i16: [-32768, 32767]",
@@ -304,7 +304,7 @@ fn vec_value_as_i8(value: Bound<PyAny>) -> PyResult<i8> {
304304

305305
let py = value.py();
306306

307-
let value = value.downcast::<PyInt>().or_else(|_| make_error(&value))?;
307+
let value = value.cast::<PyInt>().or_else(|_| make_error(&value))?;
308308
if value.lt(PyInt::new(py, i8::MIN))? || value.gt(PyInt::new(py, i8::MAX))? {
309309
return Err(PyErr::new::<PyOverflowError, _>(format!(
310310
"Value {} is out of range for i8: [-128, 127]",

0 commit comments

Comments
 (0)