fix(bindings/python): improve the typing discovering of the python package#7180
Merged
PsiACE merged 1 commit intoapache:mainfrom Feb 5, 2026
Merged
fix(bindings/python): improve the typing discovering of the python package#7180PsiACE merged 1 commit intoapache:mainfrom
PsiACE merged 1 commit intoapache:mainfrom
Conversation
package. Expose __version__ attribute correctly.
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?
Closes #.
Rationale for this change
Currently the
opendalpython package exposes top level submodules so users can use it directly without needing to import them separately:However, due to the fact they are exported by the binding so, the typing info are missing. Because we generate typing stubs *.pyi under the same directory, we need to import them in
__init__.pyas well.Also, the
__version__attribute was never imported actually, leading to an AttributeError when accessingopendal.__version__.What changes are included in this PR?
Are there any user-facing changes?
Since all changes are typing level and guarded by
if TYPE_CHECKING, it should not have any impact on runtime behavior.AI Usage Statement