[Feature request] Support bytearray argument as string_view
Open
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 18k
- Forks
- 2.3k
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 10
Description
I have a class method that takes string_view parameters.
It works fine with bytes and strings, but not with bytearray.
How can I make it work?
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
Start by reproducing the reported class method that accepts string_view with bytes, strings, and bytearray, then inspect pybind11's string_view argument-conversion entry point. Done means bytearray arguments are accepted consistently with the existing bytes and string cases, with regression coverage for the reported behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, python
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100