-
Notifications
You must be signed in to change notification settings - Fork 905
Description
Bug Description
From #3977
the only introspection data created is the list of function
If I understand this correctly it would mean functions are expected to be added to generated stubs but upon running it myself I don't see any function data being included.
When I try generating stubs for @rules_pyo3//pyo3/private/tests/string_sum/string_sum.rs:
use pyo3::prelude::*;
#[pyfunction]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
#[pymodule]
fn string_sum(m: &Bound<'_, PyModule>) -> PyResult<()> {
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
Ok(())
}the only stubs available are __init__.py (which I expect) but they're empty.
{
"__init__.pyi": "",
}Steps to Reproduce
- Clone https://github.com/abrisco/rules_pyo3/tree/stubgen
- Run
bazel build //pyo3/private/tests/string_sum:string_sum
Backtrace
Your operating system and version
Linux, MacOS, Windows
Your Python version (python --version)
Python 3.11.11
Your Rust version (rustc --version)
1.85.1 (4eb161250 2025-03-15)
Your PyO3 version
0.25.0-dev
How did you install python? Did you use a virtualenv?
N/A
Additional Info
I know my steps to repro are Bazel but I can work with someone to get more canonical repro steps. My hope was that I could provide enough info so that the issue might be obvious.
kcking
Metadata
Metadata
Assignees
Labels
No labels