[issue44919] TypedDict subtypes ignore any other metaclasses in 3.9+

2021-09-28 Thread Łukasz Langa
Łukasz Langa added the comment: The change to disallow this in Python 3.9 was deliberate, see BPO-40187 and its description. Your attempt to make `isinstance()` work with TypedDict subclasses goes directly against this design. In fact, PEP 589 explicitly says that: - Methods are not

[issue44919] TypedDict subtypes ignore any other metaclasses in 3.9+

2021-08-30 Thread Yurii Karabas
Change by Yurii Karabas <1998uri...@gmail.com>: -- keywords: +patch nosy: +uriyyo nosy_count: 1.0 -> 2.0 pull_requests: +26501 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28057 ___ Python tracker

[issue44919] TypedDict subtypes ignore any other metaclasses in 3.9+

2021-08-15 Thread Nikita Sobolev
New submission from Nikita Sobolev : Some context. I have a `User` class defined as a `TypedDict`: ```python from typing import TypedDict class User(TypedDict): name: str registered: bool ``` Now, I want to check if some `dict` is an instance of `User` like so: `isinstance(my_dict,