Skip to content

Commit d3e4409

Browse files
termoshttaldanor
andauthored
Revising #21 (#25)
#21 with some modification of #21 (comment) --------- Co-authored-by: Ivan Smirnov <github@ivan.smirnov.ie>
1 parent db4c597 commit d3e4409

File tree

5 files changed

+30
-90
lines changed

5 files changed

+30
-90
lines changed

Cargo.lock

Lines changed: 19 additions & 79 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ version = "0.1.3"
1212
edition = "2021"
1313

1414
description = "Stub file (*.pyi) generator for PyO3"
15-
repository = "https://github.com/Jij-Inc/pyo3-stub-gen"
16-
keywords = ["pyo3"]
17-
license = "MIT OR Apache-2.0"
18-
readme = "README.md"
15+
repository = "https://github.com/Jij-Inc/pyo3-stub-gen"
16+
keywords = ["pyo3"]
17+
license = "MIT OR Apache-2.0"
18+
readme = "README.md"
1919

2020
[workspace.dependencies]
2121
anyhow = "1.0.86"
2222
insta = "1.39.0"
2323
inventory = "0.3.15"
24-
itertools = "0.12.1"
24+
itertools = "0.13.0"
2525
prettyplease = "0.2.20"
2626
proc-macro2 = "1.0.86"
27-
pyo3 = { version = "0.20.3", features = ["experimental-inspect"] }
27+
pyo3 = { version = ">=0.21.0", features = ["experimental-inspect"] }
2828
quote = "1.0.36"
29-
serde = { version = "1.0.204", features = ["derive"] }
29+
serde = { version = "1.0.205", features = ["derive"] }
3030
syn = "2.0.72"
3131
toml = "0.8.19"

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
3939
}
4040

4141
#[pymodule]
42-
fn pyo3_stub_gen_testing(_py: Python, m: &PyModule) -> PyResult<()> {
42+
fn pyo3_stub_gen_testing(m: &Bound<PyModule>) -> PyResult<()> {
4343
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
4444
Ok(())
4545
}
@@ -58,7 +58,7 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
5858
}
5959

6060
#[pymodule]
61-
fn pyo3_stub_gen_testing(_py: Python, m: &PyModule) -> PyResult<()> {
61+
fn pyo3_stub_gen_testing(m: &Bound<PyModule>) -> PyResult<()> {
6262
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
6363
Ok(())
6464
}

pyo3-stub-gen-testing-mixed/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
1010

1111
/// Initializes the Python module
1212
#[pymodule]
13-
fn my_rust_pkg(_py: Python, m: &PyModule) -> PyResult<()> {
13+
fn my_rust_pkg(m: &Bound<PyModule>) -> PyResult<()> {
1414
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
1515
Ok(())
1616
}

pyo3-stub-gen-testing-pure/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
1313

1414
/// Initializes the Python module
1515
#[pymodule]
16-
fn pyo3_stub_gen_testing_pure(_py: Python, m: &PyModule) -> PyResult<()> {
16+
fn pyo3_stub_gen_testing_pure(m: &Bound<PyModule>) -> PyResult<()> {
1717
m.add_function(wrap_pyfunction!(sum_as_string, m)?)?;
1818
Ok(())
1919
}

0 commit comments

Comments
 (0)