Skip to content

Conversation

@JelleZijlstra
Copy link
Member

@JelleZijlstra JelleZijlstra commented Apr 16, 2025

  • Explicitly say that isinstance/issubclass do not work on non-runtime checkable
    protocols.
  • Move the sentence "This raises TypeError when applied to a non-protocol class". It
    took me quite some time to decide what "this" was here: it refers to applying the
    decorator, not to an isinstance() call.

📚 Documentation preview 📚: https://cpython-previews--132606.org.readthedocs.build/

- Explicitly say that isinstance/issubclass do not work on non-runtime checkable
  protocols.
- Move the sentence "This raises TypeError when applied to a non-protocol class". It
  took me quite some time to decide what "this" was here: it refers to applying the
  decorator, not to an isinstance() call.
@JelleZijlstra JelleZijlstra enabled auto-merge (squash) April 16, 2025 17:38
@JelleZijlstra JelleZijlstra merged commit 14efcad into python:main Apr 16, 2025
24 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs Apr 16, 2025
@miss-islington-app
Copy link

Thanks @JelleZijlstra for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 16, 2025
- Explicitly say that isinstance/issubclass do not work on non-runtime checkable
  protocols.
- Move the sentence "This raises TypeError when applied to a non-protocol class". It
  took me quite some time to decide what "this" was here: it refers to applying the
  decorator, not to an isinstance() call.
(cherry picked from commit 14efcad)

Co-authored-by: Jelle Zijlstra <[email protected]>
Co-authored-by: Alex Waygood <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Apr 16, 2025

GH-132607 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Apr 16, 2025
AlexWaygood added a commit that referenced this pull request Apr 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants