feat(bindings/python): Add stubs for Exception and Capability#6690
Merged
Xuanwo merged 4 commits intoapache:mainfrom Oct 18, 2025
Merged
feat(bindings/python): Add stubs for Exception and Capability#6690Xuanwo merged 4 commits intoapache:mainfrom
Xuanwo merged 4 commits intoapache:mainfrom
Conversation
chitralverma
commented
Oct 17, 2025
| pub read: bool, | ||
| /// Indicates if conditional read operations using If-Match are supported. | ||
| /// If conditional read operations using If-Match are supported. | ||
| pub read_with_if_match: bool, |
Contributor
Author
There was a problem hiding this comment.
these changes are primarily a fix for for line length lints reported by ruff.
chitralverma
commented
Oct 17, 2025
Comment on lines
+84
to
+89
| macro_rules! add_pymodule { | ||
| ($py:expr, $parent:expr, $name:expr, [$($cls:ty),* $(,)?]) => {{ | ||
| let sub_module = pyo3::types::PyModule::new($py, $name)?; | ||
| $( | ||
| sub_module.add_class::<$cls>()?; | ||
| )* |
Contributor
Author
There was a problem hiding this comment.
will be useful for other stubs later.
- Adds class to pyo3 module
- defined python package(see Can't pickle <class 'builtins.RustClass'>: attribute lookup RustClass on builtins failed PyO3/pyo3#1517 (comment))
chitralverma
commented
Oct 17, 2025
| setup: | ||
| @echo "{{ BOLD }}--- Installing/ validating dependencies ---{{ NORMAL }}" | ||
| @uv sync --managed-python --all-groups --all-extras --compile-bytecode --upgrade | ||
| @uv sync --managed-python --all-groups --all-extras --compile-bytecode |
Contributor
Author
There was a problem hiding this comment.
probably best to keep upgrades manual
Contributor
Author
Xuanwo
reviewed
Oct 18, 2025
| fn main() -> Result<()> { | ||
| // `stub_info` is a function defined by `define_stub_info_gatherer!` macro. | ||
| let stub = _opendal::stub_info()?; | ||
| stub.generate()?; |
Contributor
Author
There was a problem hiding this comment.
tried that but doesn't work. _opendal crate is needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Parts from #6622
Rationale for this change
Partially Closes #6253
What changes are included in this PR?
Are there any user-facing changes?
No.