GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Runtime-checkable protocol tests: Use `@runtime_checkable`, not `@runtime` by AlexWaygood · Pull Request #134 · python/typing_extensions

Conversation

@AlexWaygood

@AlexWaygood AlexWaygood commented Apr 10, 2023

Copy link
Copy Markdown
Member

The original name for this decorator was @runtime, and so that's the name that's currently used in most of the tests for this decorator in typing_extensions. However, the name was changed to @runtime_checkable before the decorator was added to the typing module, and so the old @runtime name doesn't appear anywhere in the docs for the typing module. The @runtime name exists in typing_extensions only for backwards compatibility.

Let's change the usages in our test suite to use the more modern name, so that it's less confusing and more consistent with typing.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@AlexWaygood
Runtime-checkable protocol tests: Use @runtime_checkable, not `@run…
ee100bd
…time`
carljm
carljm approved these changes Apr 10, 2023
View reviewed changes
@JelleZijlstra
JelleZijlstra merged commit 0fc655d into python:main Apr 10, 2023
@AlexWaygood
AlexWaygood deleted the runtime-checkable-not-runtime branch April 10, 2023 15:57
This was referenced May 23, 2023
Clarify error message for non @runtime_checkable decorated protocols #178
Merged
fix(typing): add @runtime_checkable decorator for CustomTreeNode protocol class metaopt/optree#56
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@carljm carljm carljm approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@AlexWaygood @carljm @JelleZijlstra
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.