Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Don't reimplement runtime_checkable on py38+#194

Merged
JelleZijlstra merged 10 commits into
python:mainpython/typing_extensions:mainfrom
AlexWaygood:simplify-runtime-checkableAlexWaygood/typing_extensions:simplify-runtime-checkableCopy head branch name to clipboard
Jun 9, 2023
Merged

Don't reimplement runtime_checkable on py38+#194
JelleZijlstra merged 10 commits into
python:mainpython/typing_extensions:mainfrom
AlexWaygood:simplify-runtime-checkableAlexWaygood/typing_extensions:simplify-runtime-checkableCopy head branch name to clipboard

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented May 25, 2023

Copy link
Copy Markdown
Member

Re-export it from typing instead.

Prior to #184, typing.runtime_checkable didn't work on typing_extensions.Protocol. Now that typing_extensions.Protocol inherits from typing.Generic on py38+, however, it does! This means that we can just re-export typing.runtime_checkable on py38+, rather than reimplementing it on all versions <3.12.

Comment thread CHANGELOG.md
@JelleZijlstra JelleZijlstra merged commit a2c6c88 into python:main Jun 9, 2023
@AlexWaygood AlexWaygood deleted the simplify-runtime-checkable branch June 9, 2023 14:40
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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.