[New-bugs-announce] [issue43595] Can not add a metclass that inherits both ABCMeta & ABC to a Union
Erez Zinman
report at bugs.python.org
Mon Mar 22 09:53:50 EDT 2021
New submission from Erez Zinman <erezinman.programmer at gmail.com>:
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
>>> TypeError: descriptor '__subclasses__' of 'type' object needs an argument
Tested on v3.6.9
----------
messages: 389317
nosy: erezinman
priority: normal
severity: normal
status: open
title: Can not add a metclass that inherits both ABCMeta & ABC to a Union
versions: Python 3.6
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43595>
_______________________________________
More information about the New-bugs-announce
mailing list