diff --git a/Cargo.lock b/Cargo.lock index 02c786c..e992852 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1008,7 +1008,7 @@ dependencies = [ [[package]] name = "object-store-python" -version = "0.1.2" +version = "0.1.3" dependencies = [ "async-trait", "bytes", diff --git a/object-store/Cargo.toml b/object-store/Cargo.toml index 67a61f1..ba10d31 100644 --- a/object-store/Cargo.toml +++ b/object-store/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "object-store-python" -version = "0.1.2" +version = "0.1.3" edition = "2021" authors = ["Robert Pack "] description = "A generic object store interface for uniformly interacting with AWS S3, Google Cloud Storage, Azure Storage and local files." diff --git a/object-store/pyproject.toml b/object-store/pyproject.toml index 02108bb..c0b2738 100644 --- a/object-store/pyproject.toml +++ b/object-store/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "maturin" [project] name = "object-store-python" -version = "0.1.2" +version = "0.1.3" description = "A generic object store interface for uniformly interacting with AWS S3, Google Cloud Storage, Azure Storage and local files." requires-python = ">=3.8" readme = "README.md" diff --git a/object-store/src/file.rs b/object-store/src/file.rs index ef90694..ba09bdf 100644 --- a/object-store/src/file.rs +++ b/object-store/src/file.rs @@ -25,7 +25,7 @@ pub struct ArrowFileSystemHandler { #[pymethods] impl ArrowFileSystemHandler { #[new] - #[args(options = "None")] + #[pyo3(signature = (root, options = None))] fn new(root: String, options: Option>) -> PyResult { let inner = ObjectStoreBuilder::new(root.clone()) .with_path_as_prefix(true) @@ -137,7 +137,7 @@ impl ArrowFileSystemHandler { Ok(infos) } - #[args(allow_not_found = "false", recursive = "false")] + #[pyo3(signature = (base_dir, allow_not_found = false, recursive = false))] fn get_file_info_selector<'py>( &self, base_dir: String, @@ -230,7 +230,7 @@ impl ArrowFileSystemHandler { Ok(file) } - #[args(metadata = "None")] + #[pyo3(signature = (path, metadata = None))] fn open_output_stream( &self, path: String, @@ -352,7 +352,7 @@ impl ObjectInputFile { Ok(self.content_length) } - #[args(whence = "0")] + #[pyo3(signature = (offset, whence = 0))] fn seek(&mut self, offset: i64, whence: i64) -> PyResult { self.check_closed()?; self.check_position(offset, "seek")?; @@ -378,7 +378,7 @@ impl ObjectInputFile { Ok(self.pos) } - #[args(nbytes = "None")] + #[pyo3(signature = (nbytes = None))] fn read(&mut self, nbytes: Option) -> PyResult> { self.check_closed()?; let range = match nbytes { @@ -512,13 +512,11 @@ impl ObjectOutputStream { Err(PyNotImplementedError::new_err("'size' not implemented")) } - #[args(whence = "0")] fn seek(&mut self, _offset: i64, _whence: i64) -> PyResult { self.check_closed()?; Err(PyNotImplementedError::new_err("'seek' not implemented")) } - #[args(nbytes = "None")] fn read(&mut self, _nbytes: Option) -> PyResult<()> { self.check_closed()?; Err(PyNotImplementedError::new_err("'read' not implemented")) diff --git a/object-store/src/lib.rs b/object-store/src/lib.rs index dd5ea6a..5a14fc8 100644 --- a/object-store/src/lib.rs +++ b/object-store/src/lib.rs @@ -226,7 +226,7 @@ struct PyObjectStore { #[pymethods] impl PyObjectStore { #[new] - #[args(options = "None")] + #[pyo3(signature = (root, options = None))] /// Create a new ObjectStore instance fn new(root: String, options: Option>) -> PyResult { let inner = ObjectStoreBuilder::new(root.clone())