Skip to content

Properties not generated for Cython-compiled .so files #300

@MohammadRaziei

Description

@MohammadRaziei

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions