Skip to content

Conversation

@gentlegiantJGC
Copy link
Contributor

@gentlegiantJGC gentlegiantJGC commented May 14, 2025

Description

Fix a type hint regression introduced in #5566.
collections.abc.Buffer was added in Python 3.12.
If the Python version being compiled against is less than this it uses typing_extensions.Buffer.

Fixes #5660

Suggested changelog entry:

Fix Buffer type hint

@henryiii henryiii merged commit 6aa3b33 into pybind:master May 14, 2025
65 checks passed
@henryiii henryiii changed the title Fix Buffer type hint fix(typing): Buffer type hint May 14, 2025
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label May 14, 2025
@gentlegiantJGC gentlegiantJGC deleted the impr-type-hints branch May 14, 2025 14:48
@henryiii henryiii changed the title fix(typing): Buffer type hint fix(types): Buffer type hint May 17, 2025
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label May 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: Incorrect type hints for older versions

2 participants