-
Notifications
You must be signed in to change notification settings - Fork 861
Closed
PyO3/maturin
#639Description
🌍 Environment
- Your operating system and version: MacOS
11.5.2
- Your python version:
3.9.7
- How did you install python (e.g. apt or pyenv)? Did you use a virtualenv?: using
brew
- Your Rust version (
rustc --version
):rustc 1.54.0 (a178d0322 2021-07-26)
- Your PyO3 version:
0.14.5
- Have you tried using latest PyO3 main (replace
version = "0.x.y"
withgit = "https://github.com/PyO3/pyo3")?
: yes
💥 Reproducing
Repo containing minimal working example: https://github.com/teenjuna/pyo3-doc-bug
❯ cat src/lib.rs
use pyo3::prelude::*;
/// Formats the sum of two numbers as string.
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
/// This comment should appear in module docs but it doesn't!
#[pymodule]
fn pyo3_doc_bug(_py: Python, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
Ok(())
}
❯ maturin develop
🔗 Found pyo3 bindings
🐍 Found CPython 3.9 at python
Finished dev [unoptimized + debuginfo] target(s) in 0.01s
❯ python
Python 3.9.7 (default, Sep 3 2021, 04:31:11)
[Clang 12.0.5 (clang-1205.0.22.9)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyo3_doc_bug
>>> print(pyo3_doc_bug.__doc__)
None
Metadata
Metadata
Assignees
Labels
No labels