asanypath-native 2.3.0__tar.gz → 2.3.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/Cargo.lock +1 -1
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/Cargo.toml +1 -1
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/PKG-INFO +1 -1
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/azure.rs +6 -4
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/gcs.rs +11 -5
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/s3.rs +3 -2
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/asanypath_native.pyi +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/pyproject.toml +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/artifactory.rs +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/backend.rs +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/cache.rs +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/http.rs +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/lib.rs +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/ssh.rs +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/src/xml.rs +0 -0
- {asanypath_native-2.3.0 → asanypath_native-2.3.1}/uv.lock +0 -0
|
@@ -16,6 +16,7 @@ use futures::future::join_all;
|
|
|
16
16
|
use hmac::{Hmac, KeyInit, Mac};
|
|
17
17
|
use pyo3::exceptions::{PyRuntimeError, PyValueError};
|
|
18
18
|
use pyo3::prelude::*;
|
|
19
|
+
use pyo3::pybacked::PyBackedBytes;
|
|
19
20
|
use quick_xml::Reader;
|
|
20
21
|
use quick_xml::events::Event;
|
|
21
22
|
use serde::{Deserialize, Serialize};
|
|
@@ -956,7 +957,7 @@ pub fn az_put_block<'py>(
|
|
|
956
957
|
container: String,
|
|
957
958
|
blob: String,
|
|
958
959
|
block_id: String,
|
|
959
|
-
data:
|
|
960
|
+
data: PyBackedBytes,
|
|
960
961
|
account_name: String,
|
|
961
962
|
account_key: Option<String>,
|
|
962
963
|
sas_token: Option<String>,
|
|
@@ -976,9 +977,10 @@ pub fn az_put_block<'py>(
|
|
|
976
977
|
let mut headers = vec![("content-length".to_string(), data.len().to_string())];
|
|
977
978
|
let params = [("blockid", block_id.as_str()), ("comp", "block")];
|
|
978
979
|
creds.sign("PUT", &url, &mut headers, Some(¶ms));
|
|
979
|
-
let (status, body) =
|
|
980
|
-
|
|
981
|
-
|
|
980
|
+
let (status, body) =
|
|
981
|
+
do_request_light("PUT", &url, &headers, Some(Bytes::from_owner(data)), h2)
|
|
982
|
+
.await
|
|
983
|
+
.map_err(PyRuntimeError::new_err)?;
|
|
982
984
|
if !status.is_success() {
|
|
983
985
|
return Err(status_to_pyerr(status, &creds.error_path(&blob), &body));
|
|
984
986
|
}
|
|
@@ -18,6 +18,7 @@ use futures::future::join_all;
|
|
|
18
18
|
use pyo3::exceptions::PyRuntimeError;
|
|
19
19
|
use pyo3::exceptions::PyValueError;
|
|
20
20
|
use pyo3::prelude::*;
|
|
21
|
+
use pyo3::pybacked::PyBackedBytes;
|
|
21
22
|
use serde::{Deserialize, Serialize};
|
|
22
23
|
use sonic_rs::JsonValueTrait;
|
|
23
24
|
use std::collections::{HashMap, HashSet};
|
|
@@ -995,7 +996,7 @@ pub fn gcs_start_resumable<'py>(
|
|
|
995
996
|
pub fn gcs_upload_chunk<'py>(
|
|
996
997
|
py: Python<'py>,
|
|
997
998
|
session_uri: String,
|
|
998
|
-
data:
|
|
999
|
+
data: PyBackedBytes,
|
|
999
1000
|
offset: u64,
|
|
1000
1001
|
total: u64,
|
|
1001
1002
|
use_h2: Option<bool>,
|
|
@@ -1011,10 +1012,15 @@ pub fn gcs_upload_chunk<'py>(
|
|
|
1011
1012
|
format!("bytes {offset}-{end}/{total}"),
|
|
1012
1013
|
),
|
|
1013
1014
|
];
|
|
1014
|
-
let (status, body, _h) =
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1015
|
+
let (status, body, _h) = do_request(
|
|
1016
|
+
"PUT",
|
|
1017
|
+
&session_uri,
|
|
1018
|
+
&headers,
|
|
1019
|
+
Some(Bytes::from_owner(data)),
|
|
1020
|
+
h2,
|
|
1021
|
+
)
|
|
1022
|
+
.await
|
|
1023
|
+
.map_err(PyRuntimeError::new_err)?;
|
|
1018
1024
|
// 308 Resume Incomplete = intermediate chunk accepted; 2xx = final chunk done.
|
|
1019
1025
|
if status.as_u16() == 308 || status.is_success() {
|
|
1020
1026
|
Ok(())
|
|
@@ -25,6 +25,7 @@ use bytes::Bytes;
|
|
|
25
25
|
use pyo3::exceptions::PyRuntimeError;
|
|
26
26
|
use pyo3::exceptions::PyValueError;
|
|
27
27
|
use pyo3::prelude::*;
|
|
28
|
+
use pyo3::pybacked::PyBackedBytes;
|
|
28
29
|
use quick_xml::Reader;
|
|
29
30
|
use quick_xml::{XmlVersion, events::Event};
|
|
30
31
|
use serde::{Deserialize, Serialize};
|
|
@@ -1154,7 +1155,7 @@ pub fn s3_upload_part<'py>(
|
|
|
1154
1155
|
key: String,
|
|
1155
1156
|
upload_id: String,
|
|
1156
1157
|
part_number: u32,
|
|
1157
|
-
data:
|
|
1158
|
+
data: PyBackedBytes,
|
|
1158
1159
|
region: String,
|
|
1159
1160
|
access_key: String,
|
|
1160
1161
|
secret_key: String,
|
|
@@ -1181,7 +1182,7 @@ pub fn s3_upload_part<'py>(
|
|
|
1181
1182
|
"PUT",
|
|
1182
1183
|
&s3_path,
|
|
1183
1184
|
&query,
|
|
1184
|
-
Some(Bytes::
|
|
1185
|
+
Some(Bytes::from_owner(data)),
|
|
1185
1186
|
h2,
|
|
1186
1187
|
&[],
|
|
1187
1188
|
)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|