[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-08-02 Thread Guido van Rossum
Guido van Rossum added the comment: Thanks, I was looking for this. -- resolution: -> fixed stage: -> resolved status: open -> closed ___ Python tracker ___

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-08-02 Thread Luciano Ramalho
Luciano Ramalho added the comment: The merged PR that fixed https://bugs.python.org/issue40979 also fixes this issue. It is now documented that these protocols are runtime checkable, with caveats. -- ___ Python tracker

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-08-01 Thread Luciano Ramalho
Luciano Ramalho added the comment: I have added a note about the protocols decorated with `@runtime_checkable` to the `Procools` section of the reorganized `typing.rst` in https://bugs.python.org/issue40979. I also expanded the note about the caveats of `@runtime_checkable` in its entry in

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-07-31 Thread Guido van Rossum
Guido van Rossum added the comment: I agree with Luciano's conclusion and have nothing to add other than to encourage him to submit a PR for the docs. (I know he already submitted a PR to refactor the docs. Honestly I lost track of that one. Luciano, if you need my review for that one, please p

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-07-31 Thread Mariatta
Mariatta added the comment: > because their runtime results are inconsistent with how Mypy handles them, > producing both false positives and false negatives. @guido or @ivan, do you have further thoughts or additional context to share about the above point? -- nosy: +Mariatta ___

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-07-13 Thread ramalho
ramalho added the comment: 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

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-06-16 Thread Guido van Rossum
Guido van Rossum added the comment: And here I had hoped that this was a Pull Request. :-) Note that the docs also still state that these are ABCs -- in fact they are Protocols. I'm not sure why the same info should be repeated for the `@runtime_checkable` decorator though. -- ___

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-06-14 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsub

[issue40978] Document that typing.SupportsXXX protocols are runtime checkable

2020-06-14 Thread ramalho
New submission from ramalho : The typing module documentation (https://docs.python.org/3/library/typing.html#typing.SupportsInt) does not mention that the protocols listed below are all decorated with `@runtime_checkable`. This should mentioned in the entry for each protocol and also in the