Skip to content

Commit 97d9fb6

Browse files
committed
chore: remove deprecated annotations
1 parent 6a54890 commit 97d9fb6

File tree

5 files changed

+9
-11
lines changed

5 files changed

+9
-11
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

object-store/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "object-store-python"
3-
version = "0.1.2"
3+
version = "0.1.3"
44
edition = "2021"
55
authors = ["Robert Pack <[email protected]>"]
66
description = "A generic object store interface for uniformly interacting with AWS S3, Google Cloud Storage, Azure Storage and local files."

object-store/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "maturin"
44

55
[project]
66
name = "object-store-python"
7-
version = "0.1.2"
7+
version = "0.1.3"
88
description = "A generic object store interface for uniformly interacting with AWS S3, Google Cloud Storage, Azure Storage and local files."
99
requires-python = ">=3.8"
1010
readme = "README.md"

object-store/src/file.rs

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct ArrowFileSystemHandler {
2525
#[pymethods]
2626
impl ArrowFileSystemHandler {
2727
#[new]
28-
#[args(options = "None")]
28+
#[pyo3(signature = (root, options = None))]
2929
fn new(root: String, options: Option<HashMap<String, String>>) -> PyResult<Self> {
3030
let inner = ObjectStoreBuilder::new(root.clone())
3131
.with_path_as_prefix(true)
@@ -137,7 +137,7 @@ impl ArrowFileSystemHandler {
137137
Ok(infos)
138138
}
139139

140-
#[args(allow_not_found = "false", recursive = "false")]
140+
#[pyo3(signature = (base_dir, allow_not_found = false, recursive = false))]
141141
fn get_file_info_selector<'py>(
142142
&self,
143143
base_dir: String,
@@ -230,7 +230,7 @@ impl ArrowFileSystemHandler {
230230
Ok(file)
231231
}
232232

233-
#[args(metadata = "None")]
233+
#[pyo3(signature = (path, metadata = None))]
234234
fn open_output_stream(
235235
&self,
236236
path: String,
@@ -352,7 +352,7 @@ impl ObjectInputFile {
352352
Ok(self.content_length)
353353
}
354354

355-
#[args(whence = "0")]
355+
#[pyo3(signature = (offset, whence = 0))]
356356
fn seek(&mut self, offset: i64, whence: i64) -> PyResult<i64> {
357357
self.check_closed()?;
358358
self.check_position(offset, "seek")?;
@@ -378,7 +378,7 @@ impl ObjectInputFile {
378378
Ok(self.pos)
379379
}
380380

381-
#[args(nbytes = "None")]
381+
#[pyo3(signature = (nbytes = None))]
382382
fn read(&mut self, nbytes: Option<i64>) -> PyResult<Py<PyBytes>> {
383383
self.check_closed()?;
384384
let range = match nbytes {
@@ -512,13 +512,11 @@ impl ObjectOutputStream {
512512
Err(PyNotImplementedError::new_err("'size' not implemented"))
513513
}
514514

515-
#[args(whence = "0")]
516515
fn seek(&mut self, _offset: i64, _whence: i64) -> PyResult<i64> {
517516
self.check_closed()?;
518517
Err(PyNotImplementedError::new_err("'seek' not implemented"))
519518
}
520519

521-
#[args(nbytes = "None")]
522520
fn read(&mut self, _nbytes: Option<i64>) -> PyResult<()> {
523521
self.check_closed()?;
524522
Err(PyNotImplementedError::new_err("'read' not implemented"))

object-store/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ struct PyObjectStore {
226226
#[pymethods]
227227
impl PyObjectStore {
228228
#[new]
229-
#[args(options = "None")]
229+
#[pyo3(signature = (root, options = None))]
230230
/// Create a new ObjectStore instance
231231
fn new(root: String, options: Option<HashMap<String, String>>) -> PyResult<Self> {
232232
let inner = ObjectStoreBuilder::new(root.clone())

0 commit comments

Comments
 (0)