This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author icgood
Recipients edgarrmondragon, eric.smith, icgood, julianfortune, kj, lukasz.langa, miss-islington, serhiy.storchaka, shrik, uriyyo
Date 2021-09-11.21:01:10
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1631394071.12.0.778239336133.issue45081@roundup.psfhosted.org>
In-reply-to
Content
I believe this was a deeper issue that affected all classes inheriting Protocol, causing a TypeError on even the most basic case (see attached):

Traceback (most recent call last):
  File "/.../test.py", line 14, in <module>
    MyClass()
  File "/.../test.py", line 11, in __init__
    super().__init__()
  File "/usr/local/Cellar/python@3.9/3.9.7/Frameworks/Python.framework/Versions/3.9/lib/python3.9/typing.py", line 1083, in _no_init
    raise TypeError('Protocols cannot be instantiated')
TypeError: Protocols cannot be instantiated


This was a new regression in 3.9.7 and seems to be resolved by this fix. The desired behavior should be supported according to PEP 544: https://www.python.org/dev/peps/pep-0544/#explicitly-declaring-implementation
History
Date User Action Args
2021-09-11 21:01:11icgoodsetrecipients: + icgood, eric.smith, lukasz.langa, serhiy.storchaka, miss-islington, uriyyo, kj, julianfortune, edgarrmondragon, shrik
2021-09-11 21:01:11icgoodsetmessageid: <1631394071.12.0.778239336133.issue45081@roundup.psfhosted.org>
2021-09-11 21:01:11icgoodlinkissue45081 messages
2021-09-11 21:01:10icgoodcreate