Author ramalho
Recipients docs@python, gvanrossum, levkivskyi, ramalho
Date 2020-07-14.01:43:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1594691016.12.0.30478584061.issue40978@roundup.psfhosted.org>
In-reply-to
Content
After experimenting with theses protocols, I believe the user community is better served by leaving undocumented the fact that they are runtime checkable, because their runtime results are inconsistent with how Mypy handles them, producing both false positives and false negatives.

I've documented the problems (https://github.com/fluentpython/abc-protocol-labs/blob/master/protocol-issues.rst) and started two threads about them in the typing-sig mailing list:

[1] https://mail.python.org/archives/list/typing-sig@python.org/message/CSM3ZCWNRBO4RGGTSM664DD37JYOUVCO/ 
[2] https://mail.python.org/archives/list/typing-sig@python.org/message/FSV6WSFGWD4QZO6ECY3JADF7M2PW5FKK/

Thread [1] got a useful partial response from Guido. Open questions remain. Thread [2] got no response at all.

I will gladly reengage in those threads or in this issue if there is interest. As it stands, I believe the use of the @runtime_checkable feature on several of these protocols is unreliable and should not be promoted.
History
Date User Action Args
2020-07-14 01:43:36ramalhosetrecipients: + ramalho, gvanrossum, docs@python, levkivskyi
2020-07-14 01:43:36ramalhosetmessageid: <1594691016.12.0.30478584061.issue40978@roundup.psfhosted.org>
2020-07-14 01:43:36ramalholinkissue40978 messages
2020-07-14 01:43:35ramalhocreate