Skip to content
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

Allow Protocols to inherit from typing_extensions.Buffer or collections.abc.Buffer #220

Merged
merged 4 commits into from
Jun 5, 2023

Conversation

AlexWaygood
Copy link
Member

Backport of python/cpython#104827

@AlexWaygood AlexWaygood marked this pull request as draft June 4, 2023 16:40
@AlexWaygood AlexWaygood marked this pull request as ready for review June 4, 2023 16:50
@AlexWaygood AlexWaygood changed the title Allow Protocols to inherit from typing_extensions.Buffer Allow Protocols to inherit from typing_extensions.Buffer or collections.abc.Buffer Jun 4, 2023
Comment on lines +2740 to +2744
@skipUnless(
hasattr(collections.abc, "Buffer"),
"needs collections.abc.Buffer to exist"
)
@skip_if_py312b1
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test isn't run in CI at all right now, but I've confirmed locally that it passes with the CPython main branch (so when 3.12b2 comes along, it should pass in CI for us here)

@srittau srittau merged commit afabbbd into python:main Jun 5, 2023
@AlexWaygood AlexWaygood deleted the buffer-subclassing branch June 5, 2023 09:51
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.

2 participants