Skip to content

Commit

Permalink
fix: one more deprecated call
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap committed Aug 5, 2024
1 parent 4ddfdcf commit f09a4cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions object-store-internal/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ impl ObjectInputFile {
}

#[pyo3(signature = (nbytes = None))]
fn read(&mut self, nbytes: Option<i64>) -> PyResult<Py<PyBytes>> {
fn read(&mut self, nbytes: Option<i64>) -> PyResult<Py<PyAny>> {
self.check_closed()?;
let range = match nbytes {
Some(len) => {
Expand All @@ -428,7 +428,7 @@ impl ObjectInputFile {
} else {
"".into()
};
Python::with_gil(|py| Ok(PyBytes::new(py, data.as_ref()).into_py(py)))
Python::with_gil(|py| Ok(PyBytes::new_bound(py, data.as_ref()).into_py(py)))
}

fn fileno(&self) -> PyResult<()> {
Expand Down

0 comments on commit f09a4cb

Please sign in to comment.