Re: [PR] fix(bindings/python): improve the typing discovering of the python package [opendal]

2026-02-05 Thread via GitHub


PsiACE merged PR #7180:
URL: https://github.com/apache/opendal/pull/7180


-- 
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]



[PR] fix(bindings/python): improve the typing discovering of the python package [opendal]

2026-02-05 Thread via GitHub


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

   # Which issue does this PR close?
   
   
   
   Closes #.
   
   # Rationale for this change
   
   
   
   Currently the `opendal` python packages exposes top level submodules so 
users can use it directly without needing to import them separately:
   
   ```python
   import opendal
   opendal.file.File
   ```
   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__.py` as well.
   
   Also, the `__version__` attribute was never imported actually.
   
   # What changes are included in this PR?
   
   
   
   - improve the typing discovery by importing typing stubs under TYPE_CHECKING 
guard.
   - Expose __version__ attribute correctly.
   
   
   # Are there any user-facing changes?
   
   
   
   
   
   
   # AI Usage Statement
   
   
   


-- 
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]