You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by "asukaminato0721 (via GitHub)" <gi...@apache.org> on 2025/08/07 17:59:15 UTC

[PR] try fix [opendal]

asukaminato0721 opened a new pull request, #6490:
URL: https://github.com/apache/opendal/pull/6490

   # Which issue does this PR close?
   
   <!--
   We generally require a GitHub issue to be filed for all bug fixes and enhancements. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123.
   -->
   
   Closes #6479.
   
   # Rationale for this change
   
   <!--
   Why are you proposing this change? If this is already explained clearly in the issue then this section is not needed.
   Explaining clearly why changes are proposed helps reviewers understand your changes and offer better suggestions for fixes.
   -->
   
   # What changes are included in this PR?
   
   <!--
   There is no need to duplicate the description in the issue here but it is sometimes worth providing a summary of the individual changes in this PR.
   -->
   
   # Are there any user-facing changes?
   
   user can use Path in root.
   
   <!--
   If there are user-facing changes then we may require documentation to be updated before approving the PR.
   -->
   
   <!---
   If there are any breaking changes to public APIs, please add the `breaking-changes` label.
   -->
   


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): allow Path in root [opendal]

Posted by "asukaminato0721 (via GitHub)" <gi...@apache.org>.
asukaminato0721 commented on PR #6490:
URL: https://github.com/apache/opendal/pull/6490#issuecomment-3165252371

   > tests/test_operator_construction.py::test_operator_new_with_path PASS
   


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): allow Path in root [opendal]

Posted by "kingsword09 (via GitHub)" <gi...@apache.org>.
kingsword09 commented on PR #6490:
URL: https://github.com/apache/opendal/pull/6490#issuecomment-3167001475

   > ohh, the new clippy warning, I don't want to fix them in this pr.
   
   This has already been resolved and merged into main.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): accept PathLike constructor options [opendal]

Posted by "Xuanwo (via GitHub) via commits" <co...@opendal.apache.org>.
Xuanwo merged PR #6490:
URL: https://github.com/apache/opendal/pull/6490


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): allow Path in root [opendal]

Posted by "chitralverma (via GitHub)" <gi...@apache.org>.
chitralverma commented on code in PR #6490:
URL: https://github.com/apache/opendal/pull/6490#discussion_r2499113010


##########
bindings/python/src/operator.rs:
##########
@@ -70,12 +70,13 @@ impl Operator {
                     .set_source(err)
             })
             .map_err(format_pyerr)?;
-        let map = map
-            .map(|v| {
-                v.extract::<HashMap<String, String>>()
-                    .expect("must be valid hashmap")
-            })
-            .unwrap_or_default();
+        let map = if let Some(v) = map {
+            v.iter()
+                .map(|(k, v)| Ok((k.extract::<String>()?, v.str()?.to_string())))

Review Comment:
   this point is kind of resolved via stubs dont you think?



-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): allow Path in root [opendal]

Posted by "asukaminato0721 (via GitHub)" <gi...@apache.org>.
asukaminato0721 commented on PR #6490:
URL: https://github.com/apache/opendal/pull/6490#issuecomment-3165214695

   ohh, the new clippy warning, I don't want to fix them in this pr.


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): allow Path in root [opendal]

Posted by "Xuanwo (via GitHub)" <gi...@apache.org>.
Xuanwo commented on code in PR #6490:
URL: https://github.com/apache/opendal/pull/6490#discussion_r2262392412


##########
bindings/python/src/operator.rs:
##########
@@ -70,12 +70,13 @@ impl Operator {
                     .set_source(err)
             })
             .map_err(format_pyerr)?;
-        let map = map
-            .map(|v| {
-                v.extract::<HashMap<String, String>>()
-                    .expect("must be valid hashmap")
-            })
-            .unwrap_or_default();
+        let map = if let Some(v) = map {
+            v.iter()
+                .map(|(k, v)| Ok((k.extract::<String>()?, v.str()?.to_string())))

Review Comment:
   This makes me think we should expose `S3Config` to Python instead of just using `HashMap`



-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat(bindings/python): allow Path in root [opendal]

Posted by "asukaminato0721 (via GitHub)" <gi...@apache.org>.
asukaminato0721 commented on PR #6490:
URL: https://github.com/apache/opendal/pull/6490#issuecomment-3497497058

   ```rs
   PyErr { type: <class 'TypeError'>, value: TypeError("'PosixPath' object cannot be converted to 'PyString'"), traceback: None }
   ```
   
   Need some fix.
   


-- 
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: commits-unsubscribe@opendal.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org