Skip to content

Commit

Permalink
rename pickle method
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebarron committed Jan 31, 2025
1 parent 58c3c47 commit fcac785
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions pyo3-object_store/src/aws.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ struct S3Config {
}

impl S3Config {
fn pickle_get_new_args(&self, py: Python) -> PyResult<PyObject> {
fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
let args =
PyTuple::new(py, vec![self.bucket.clone().into_pyobject(py)?])?.into_py_any(py)?;
let kwargs = PyDict::new(py);
Expand Down Expand Up @@ -241,7 +241,7 @@ impl PyS3Store {
}

fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
self.config.pickle_get_new_args(py)
self.config.__getnewargs_ex__(py)
}

fn __repr__(&self) -> String {
Expand Down
4 changes: 2 additions & 2 deletions pyo3-object_store/src/azure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct AzureConfig {
}

impl AzureConfig {
fn pickle_get_new_args(&self, py: Python) -> PyResult<PyObject> {
fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
let args =
PyTuple::new(py, vec![self.container.clone().into_pyobject(py)?])?.into_py_any(py)?;
let kwargs = PyDict::new(py);
Expand Down Expand Up @@ -166,7 +166,7 @@ impl PyAzureStore {
}

fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
self.config.pickle_get_new_args(py)
self.config.__getnewargs_ex__(py)
}

fn __repr__(&self) -> String {
Expand Down
4 changes: 2 additions & 2 deletions pyo3-object_store/src/gcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ struct GCSConfig {
}

impl GCSConfig {
fn pickle_get_new_args(&self, py: Python) -> PyResult<PyObject> {
fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
let args =
PyTuple::new(py, vec![self.bucket.clone().into_pyobject(py)?])?.into_py_any(py)?;
let kwargs = PyDict::new(py);
Expand Down Expand Up @@ -164,7 +164,7 @@ impl PyGCSStore {
}

fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
self.config.pickle_get_new_args(py)
self.config.__getnewargs_ex__(py)
}

fn __repr__(&self) -> String {
Expand Down
4 changes: 2 additions & 2 deletions pyo3-object_store/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ struct HTTPConfig {
}

impl HTTPConfig {
fn pickle_get_new_args(&self, py: Python) -> PyResult<PyObject> {
fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
let args = PyTuple::new(py, vec![self.url.clone().into_pyobject(py)?])?.into_py_any(py)?;
let kwargs = PyDict::new(py);

Expand Down Expand Up @@ -92,7 +92,7 @@ impl PyHttpStore {
}

fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
self.config.pickle_get_new_args(py)
self.config.__getnewargs_ex__(py)
}

fn __repr__(&self) -> String {
Expand Down
4 changes: 2 additions & 2 deletions pyo3-object_store/src/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ struct LocalConfig {
}

impl LocalConfig {
fn pickle_get_new_args(&self, py: Python) -> PyResult<PyObject> {
fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
let args =
PyTuple::new(py, vec![self.prefix.clone().into_pyobject(py)?])?.into_py_any(py)?;
let kwargs = PyDict::new(py);
Expand Down Expand Up @@ -101,7 +101,7 @@ impl PyLocalStore {
}

fn __getnewargs_ex__(&self, py: Python) -> PyResult<PyObject> {
self.config.pickle_get_new_args(py)
self.config.__getnewargs_ex__(py)
}

fn __repr__(&self) -> String {
Expand Down

0 comments on commit fcac785

Please sign in to comment.