How to expose custom type derived from pure python type
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
Issue description
My goal is to create a wrapper to the python default file type.
For that I created a C++ class (with no base class) and I want to expose it as a subclass of file. Which I cannot do as file isn't itself exported by pybind11.
Is there a way to support this pattern with this library (I couldn't find this workflow in the doc) ?
Contributor guide
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
No source file, test, or entry point is identified. Start by reviewing pybind11's existing documentation and type-exposure APIs, then determine whether the requested wrapper can be exposed as a subclass of Python's built-in file type. Done means documenting a supported workflow or clearly defining the required library change and its tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100