New pybind11 type hints break signature parsing from doc string
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.2k
- Forks
- 146
- PR merge metrics
- No merged PRs in 30d
Description
With pybind11 3.0.0, type hints for int and float where changed to the correct typing.SupportsInt | typing.SupportsIndex and typing.SupportsFloat | typing.SupportsIndex type hints (see pybind/pybind11#5158 and pybind/pybind11#5540).
Also type hints for Capsules where changed to types.CapsuleType / typing_extensions.CapsuleType (depending on the Python version, see pybind/pybind11#5693).
This results in exec raises Exception name 'typing' is not defined in _signature_from_string().
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
Locate _signature_from_string() and inspect how its docstring signature is executed. Reproduce the failure with pybind11 3.0.0, including the updated int, float, and Capsule type hints. Done means those signatures parse without the missing-name exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100