[issue43595] Can not add a metclass that inherits both ABCMeta & ABC to a Union

2021-06-28 Thread Andrei Kulakov
Andrei Kulakov added the comment: Works for me, too - no error (MacOS, 3.9.1) -- nosy: +andrei.avk ___ Python tracker ___ ___

[issue43595] Can not add a metclass that inherits both ABCMeta & ABC to a Union

2021-03-23 Thread Jacob Nilsson
Jacob Nilsson added the comment: Hi, I tried both code snippets, and they work for me with the output: typing.Union[str, abc.ABC] For your second code snippet. Tested on 3.7.6 (IPython though) on a Windows machine, can test it on Linux tomorrow. -- nosy: +ajoino

[issue43595] Can not add a metclass that inherits both ABCMeta & ABC to a Union

2021-03-22 Thread Erez Zinman
Erez Zinman added the comment: This is actually a lot worse and unrelated to the aforementioned issue. The code ``` from typing import Union from abc import ABC Union[str, ABC] ``` raises the exception >>> TypeError: descriptor '__subclasses__' of 'type' object needs an argument

[issue43595] Can not add a metclass that inherits both ABCMeta & ABC to a Union

2021-03-22 Thread Erez Zinman
New submission from Erez Zinman : Related to Issue #43594. When running the following code ``` from abc import ABCMeta, ABC from typing import Union class MetaclassMixin(ABC): pass class Meta(MetaclassMixin, ABCMeta): pass print(Union[str, Meta]) ``` An exception is raised >>>