Skip to content
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

feat: Auto-generate python type hint file using pyo3-stub-gen #149

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

why-arong
Copy link
Contributor

This PR introduces pyo3-stub-gen into the project to automate the generation of Python interface type hint files (.pyi) from Rust code.

However, during the integration process, several compatibility issues were encountered.

1. Our project currently uses pyo3 0.20.3, (primarily due to the dependency on pyo3-asyncio..?) which is incompatible with pyo3 0.21.0.

This version mismatch leads to compilation failures when trying to run the stub generator, specifically when executing cargo run --bin stub_gen as per the documentation.

2. Errors from Example Code:

The provided example code results in errors when following the documented steps to generate stubs.

image

@jopemachine jopemachine changed the title Integration of pyo3-stub-gen..... feat: Integration of pyo3-stub-gen Oct 5, 2024
@jopemachine jopemachine added the python Python binding label Oct 5, 2024
@jopemachine
Copy link
Member

Since pyo3-stub-gen requires pyo3 version 0.21 or higher, I think this issue is related to pyo3's version mismatch.
Ref: #90

@jopemachine jopemachine changed the title feat: Integration of pyo3-stub-gen feat: Auto generate python type hint file using pyo3-stub-gen Oct 6, 2024
@jopemachine jopemachine changed the title feat: Auto generate python type hint file using pyo3-stub-gen feat: Auto-generate python type hint file using pyo3-stub-gen Oct 6, 2024
@jopemachine jopemachine added the ossca-24 OSS Contribution Academy mentee's contributions. label Oct 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold ossca-24 OSS Contribution Academy mentee's contributions. python Python binding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants