Skip to content

Commit

Permalink
chore: remove deprecated annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap committed Jan 23, 2023
1 parent 6a54890 commit 97d9fb6
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion object-store/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "object-store-python"
version = "0.1.2"
version = "0.1.3"
edition = "2021"
authors = ["Robert Pack <[email protected]>"]
description = "A generic object store interface for uniformly interacting with AWS S3, Google Cloud Storage, Azure Storage and local files."
Expand Down
2 changes: 1 addition & 1 deletion object-store/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
12 changes: 5 additions & 7 deletions object-store/src/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<HashMap<String, String>>) -> PyResult<Self> {
let inner = ObjectStoreBuilder::new(root.clone())
.with_path_as_prefix(true)
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -230,7 +230,7 @@ impl ArrowFileSystemHandler {
Ok(file)
}

#[args(metadata = "None")]
#[pyo3(signature = (path, metadata = None))]
fn open_output_stream(
&self,
path: String,
Expand Down Expand Up @@ -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<i64> {
self.check_closed()?;
self.check_position(offset, "seek")?;
Expand All @@ -378,7 +378,7 @@ impl ObjectInputFile {
Ok(self.pos)
}

#[args(nbytes = "None")]
#[pyo3(signature = (nbytes = None))]
fn read(&mut self, nbytes: Option<i64>) -> PyResult<Py<PyBytes>> {
self.check_closed()?;
let range = match nbytes {
Expand Down Expand Up @@ -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<i64> {
self.check_closed()?;
Err(PyNotImplementedError::new_err("'seek' not implemented"))
}

#[args(nbytes = "None")]
fn read(&mut self, _nbytes: Option<i64>) -> PyResult<()> {
self.check_closed()?;
Err(PyNotImplementedError::new_err("'read' not implemented"))
Expand Down
2 changes: 1 addition & 1 deletion object-store/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<HashMap<String, String>>) -> PyResult<Self> {
let inner = ObjectStoreBuilder::new(root.clone())
Expand Down

0 comments on commit 97d9fb6

Please sign in to comment.