Julian Fortune added the comment:
Ian,
`MyProtocol` does not provide an `__init__()`, and thus
```
super().__init__()
```
is calling the `__init__()` from `Protocol`. This results in the `TypeError`.
Simply remove `super().__init__()` to resolve your issue.
This behavior was changed in
Change by Julian Fortune :
--
stage: patch review -> resolved
status: open -> closed
___
Python tracker
<https://bugs.python.org/issue45081>
___
___
Pyth
New submission from Julian Fortune :
I believe [`bpo-44806: Fix __init__ in subclasses of
protocols`](https://github.com/python/cpython/pull/27545) has caused a
regression when using a Dataclass.
In Python `3.9.7`, a `dataclass` that inherits from a subclass of
`typing.Protocol` (i.e., a