chitralverma commented on code in PR #9421:
URL: https://github.com/apache/opendal/pull/9421#discussion_r4736414361


##########
bindings/python/src/operator.rs:
##########
@@ -143,8 +145,15 @@ fn extract_delete_paths(paths: &Bound<'_, PyAny>) -> 
PyResult<Vec<String>> {
     paths
         .try_iter()?
         .map(|entry| {
-            let path = entry?.extract::<PathBuf>()?;
-            Ok(path.to_string_lossy().into_owned())
+            let entry = entry?;
+            let (path, opts) = match entry.cast::<PyTuple>() {

Review Comment:
   e8936f9d1 reads a `(path, options)` pair only from a tuple whose type has no 
`__fspath__`, the lookup `os.fspath` uses. Every other entry converts as a 
path, as on `main`, and its error reaches the caller before any deletion. New 
sync and async tests cover a tuple whose `__fspath__` raises, returns bytes, or 
returns an int. Each asserts that the error propagates and the whole batch 
stays intact. They fail on e31ba5187 and pass both here and on a `main` 
(c5a3e4166) build.
   
   *This comment is AI assisted.*



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to