-
Notifications
You must be signed in to change notification settings - Fork 778
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
Module documentation doesn't show up #1894
Comments
I reproduced this, looks like it stopped working with pyo3 0.14.0. @teenjuna can you verify that it works with pyo3 version 0.13.2? |
Ah, I think I know what is happening... This for example, will print all those doc strings: import pyo3_doc_bug
print(pyo3_doc_bug.__doc__) # None
print(pyo3_doc_bug.pyo3_doc_bug.__doc__) # This comment should appear in module docs but it doesn't!
print(pyo3_doc_bug.sum_as_string.__doc__) # Formats the sum of two numbers as string. I think that change happened in 355bd0c#diff-7a9651b82a479b31816fe42ad26b5d5c78b92e0745efc9ac9882c1518c4ba794 which removed I guess that you can't define package docstrings with cc @davidhewitt |
Something is wrong with maturin (or
|
I expect that Looks like this is related to #1509 ? I think #1509 is probably correct, so we just need to consider whether there are tools and examples that need to update if we want to have package-level docs automatically pulled out of the shared library... |
Why is |
Not sure. @messense might know? |
|
I've opened PyO3/maturin#639 to address this, please take a look. |
Thanks very much. I guess we should also update our example projects... I'll open a PR now. |
For adding .pyi files and because it's more consistent, i.e. a package is always |
The fix is now released in maturin 0.11.5. |
🌍 Environment
11.5.2
3.9.7
brew
rustc --version
):rustc 1.54.0 (a178d0322 2021-07-26)
0.14.5
version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
: yes💥 Reproducing
Repo containing minimal working example: https://github.com/teenjuna/pyo3-doc-bug
The text was updated successfully, but these errors were encountered: