Message401671
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 https://github.com/python/cpython/pull/27545 (see `Lib/typing.py:1384`); I don't see what you are reporting as a regression, I see it as correct behavior that I would expect. Apologies if you feel differently.
Cheers,
Julian |
|
Date |
User |
Action |
Args |
2021-09-12 20:42:53 | julianfortune | set | recipients:
+ julianfortune, eric.smith, lukasz.langa, serhiy.storchaka, icgood, miss-islington, uriyyo, kj, edgarrmondragon, shrik |
2021-09-12 20:42:53 | julianfortune | set | messageid: <1631479373.27.0.214807648277.issue45081@roundup.psfhosted.org> |
2021-09-12 20:42:53 | julianfortune | link | issue45081 messages |
2021-09-12 20:42:53 | julianfortune | create | |
|