Skip to content

Move builtin protocol whitelist to mapping instead of list#128

Merged
JelleZijlstra merged 4 commits intopython:mainfrom
YouJiacheng:ContextManager-is-Protocol
Apr 5, 2023
Merged

Move builtin protocol whitelist to mapping instead of list#128
JelleZijlstra merged 4 commits intopython:mainfrom
YouJiacheng:ContextManager-is-Protocol

Conversation

@YouJiacheng
Copy link
Copy Markdown
Contributor

Backport from:
python/cpython#15647
Also rename to allowlist, following these changes:
python/cpython#21823
python/cpython#21825

@ghost
Copy link
Copy Markdown

ghost commented Mar 28, 2023

All commit authors signed the Contributor License Agreement.
CLA signed

blank line contains whitespace

Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Copy link
Copy Markdown
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

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

LGTM. The added test does indeed fail with the current latest version of typing_extensions on Python 3.7, and this is the fix that was applied in CPython.

@JelleZijlstra JelleZijlstra merged commit c661cde into python:main Apr 5, 2023
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.

3 participants