pybind / pybind/pybind11-stubgen
Properties not generated for Cython-compiled .so files
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 361
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
First, thank you for this amazing tool! It works great for Cython-compiled .so files.
However, I've noticed that properties are not being generated in the stub files. This is a critical feature that I'm desperately needing.
Example:
My Cython module has:
cdef class MyClass:
cdef int _value
@property
def value(self):
return self._value
@value.setter
def value(self, int v):
self._value = v
But the generated stub only has:
class MyClass:
...
The value property is missing entirely.
Expected behavior:
class MyClass:
value: int
...
Environment:
- pybind11-stubgen version: [latest]
- Python: 3.11
- OS: Linux
Additional notes:
- Regular methods and functions are generated correctly
- Only properties seem to be affected
- This is a critical feature for type safety in my project
I would really appreciate if this could be addressed as soon as possible. Happy to help test or provide more examples if needed.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no repository files or tests. Start by reproducing the problem with the shown Cython module and inspect how the generated stub represents MyClass; done means the value property appears with its int annotation while regular methods and functions remain generated correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100