Skip to content

fix(typing): Buffer type hint #5662

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 14, 2025
Merged

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs changelog Possibly needs a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: Incorrect type hints for older versions
2 participants