-
-
Notifications
You must be signed in to change notification settings - Fork 280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Re-export __all__
in __init__.py
for pure Rust project
#886
Conversation
This is useful for Python documentation generators which inspect `__all__`. For example, pdoc then correctly displays `module_name` instead of `module_name.module_name`
✅ Deploy Preview for maturin-guide ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
5173a30
to
72d8fad
Compare
Co-authored-by: messense <messense@icloud.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, could you please add a changelog entry, thanks!
Done, thank you for the super quick review! 🍰 |
Released in v0.12.15, should be out soon: https://github.com/PyO3/maturin/actions/runs/2285132178 |
Awesome, thanks! 🍰 😃 |
maturin already re-exports
__doc__
, but__all__
is also useful to be reexported. There are a bunch of Python documentation generators which make use of this. In our case (I work on pdoc), re-exporting__all__
means we correctly detect that it'smy_project
and notmy_project.my_project
. 😃On that note, thank you folks for the fantastic work you are doing with PyO3/maturin! 🍰
We're working on some Rust extensions for @mitmproxy and PyO3 has just been super wonderful. ❤️