Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Document that typing_extensions.Protocol and typing.Protocol don't always play well together #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,12 @@ Special typing primitives
``typing_extensions.Protocol`` simultaneously. Previously, this led to
:py:exc:`TypeError` being raised due to a metaclass conflict.

It is recommended to avoid doing this if possible. Not all features and
bugfixes that ``typing_extensions.Protocol`` backports from newer Python
versions are guaranteed to work if :py:class:`typing.Protocol` is also
present in a protocol class's :py:term:`method resolution order`. See
:issue:`245` for some examples.

.. data:: Required

See :py:data:`typing.Required` and :pep:`655`. In ``typing`` since 3.11.
Expand Down