-
-
Notifications
You must be signed in to change notification settings - Fork 33.9k
Open
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
I would expect this to raise, but it passes on all versions:
from typing import runtime_checkable, Protocol
@runtime_checkable
class Foo(Protocol):
x: int
class Bar(Foo, Protocol):
y: str
isinstance(object(), Bar)Some previous discussion in #132596 (comment) . We may not want to change this behavior for compatibility reasons, but I think it's a bug so I'm at least opening the issue.
CPython versions tested on:
CPython main branch, 3.13
Operating systems tested on:
macOS
Linked PRs
Metadata
Metadata
Assignees
Labels
3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixes3.15new features, bugs and security fixesnew features, bugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytopic-typingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error