From fcac785e0fa1fd8f9a8f3a23b1cd9787897a8f12 Mon Sep 17 00:00:00 2001 From: Kyle Barron Date: Fri, 31 Jan 2025 16:06:51 -0500 Subject: [PATCH] rename pickle method --- pyo3-object_store/src/aws.rs | 4 ++-- pyo3-object_store/src/azure.rs | 4 ++-- pyo3-object_store/src/gcp.rs | 4 ++-- pyo3-object_store/src/http.rs | 4 ++-- pyo3-object_store/src/local.rs | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pyo3-object_store/src/aws.rs b/pyo3-object_store/src/aws.rs index 7e10e45..9dbf3c9 100644 --- a/pyo3-object_store/src/aws.rs +++ b/pyo3-object_store/src/aws.rs @@ -31,7 +31,7 @@ struct S3Config { } impl S3Config { - fn pickle_get_new_args(&self, py: Python) -> PyResult { + fn __getnewargs_ex__(&self, py: Python) -> PyResult { let args = PyTuple::new(py, vec![self.bucket.clone().into_pyobject(py)?])?.into_py_any(py)?; let kwargs = PyDict::new(py); @@ -241,7 +241,7 @@ impl PyS3Store { } fn __getnewargs_ex__(&self, py: Python) -> PyResult { - self.config.pickle_get_new_args(py) + self.config.__getnewargs_ex__(py) } fn __repr__(&self) -> String { diff --git a/pyo3-object_store/src/azure.rs b/pyo3-object_store/src/azure.rs index 94ee3d5..688018a 100644 --- a/pyo3-object_store/src/azure.rs +++ b/pyo3-object_store/src/azure.rs @@ -29,7 +29,7 @@ struct AzureConfig { } impl AzureConfig { - fn pickle_get_new_args(&self, py: Python) -> PyResult { + fn __getnewargs_ex__(&self, py: Python) -> PyResult { let args = PyTuple::new(py, vec![self.container.clone().into_pyobject(py)?])?.into_py_any(py)?; let kwargs = PyDict::new(py); @@ -166,7 +166,7 @@ impl PyAzureStore { } fn __getnewargs_ex__(&self, py: Python) -> PyResult { - self.config.pickle_get_new_args(py) + self.config.__getnewargs_ex__(py) } fn __repr__(&self) -> String { diff --git a/pyo3-object_store/src/gcp.rs b/pyo3-object_store/src/gcp.rs index 7b5b0bd..37fdb36 100644 --- a/pyo3-object_store/src/gcp.rs +++ b/pyo3-object_store/src/gcp.rs @@ -29,7 +29,7 @@ struct GCSConfig { } impl GCSConfig { - fn pickle_get_new_args(&self, py: Python) -> PyResult { + fn __getnewargs_ex__(&self, py: Python) -> PyResult { let args = PyTuple::new(py, vec![self.bucket.clone().into_pyobject(py)?])?.into_py_any(py)?; let kwargs = PyDict::new(py); @@ -164,7 +164,7 @@ impl PyGCSStore { } fn __getnewargs_ex__(&self, py: Python) -> PyResult { - self.config.pickle_get_new_args(py) + self.config.__getnewargs_ex__(py) } fn __repr__(&self) -> String { diff --git a/pyo3-object_store/src/http.rs b/pyo3-object_store/src/http.rs index dcb2503..1985ba4 100644 --- a/pyo3-object_store/src/http.rs +++ b/pyo3-object_store/src/http.rs @@ -16,7 +16,7 @@ struct HTTPConfig { } impl HTTPConfig { - fn pickle_get_new_args(&self, py: Python) -> PyResult { + fn __getnewargs_ex__(&self, py: Python) -> PyResult { let args = PyTuple::new(py, vec![self.url.clone().into_pyobject(py)?])?.into_py_any(py)?; let kwargs = PyDict::new(py); @@ -92,7 +92,7 @@ impl PyHttpStore { } fn __getnewargs_ex__(&self, py: Python) -> PyResult { - self.config.pickle_get_new_args(py) + self.config.__getnewargs_ex__(py) } fn __repr__(&self) -> String { diff --git a/pyo3-object_store/src/local.rs b/pyo3-object_store/src/local.rs index 7a496fd..308e0fa 100644 --- a/pyo3-object_store/src/local.rs +++ b/pyo3-object_store/src/local.rs @@ -19,7 +19,7 @@ struct LocalConfig { } impl LocalConfig { - fn pickle_get_new_args(&self, py: Python) -> PyResult { + fn __getnewargs_ex__(&self, py: Python) -> PyResult { let args = PyTuple::new(py, vec![self.prefix.clone().into_pyobject(py)?])?.into_py_any(py)?; let kwargs = PyDict::new(py); @@ -101,7 +101,7 @@ impl PyLocalStore { } fn __getnewargs_ex__(&self, py: Python) -> PyResult { - self.config.pickle_get_new_args(py) + self.config.__getnewargs_ex__(py) } fn __repr__(&self) -> String {