Tin mới
ilevkivskyi:protocols-typing-extensions
GitHub CopilotWrite better code with AI
GitHub Copilot appDirect agents from issue to merge
CodespacesInstant dev environments
Code ReviewManage code changes
Code QualityEnforce quality at merge
GitHub Advanced SecurityFind and fix vulnerabilities
Code securitySecure your code as you build
Secret protectionStop leaks before they start
GitHub SponsorsFund open source developers
Copilot for BusinessEnterprise-grade AI features
Premium SupportEnterprise-grade 24/7 support
Adapt Protocol and runtime from PR
An attempt to fix missing failure on some versions
Abandon attempts to support protocols in 3.5.0 and 3.5.1, see
Attempt to keep support of 3.5.2
Hopefully last backward compatibility nit
Conditionally add Protocol and runtime to __all__
Add Protocol and runtime to typing_extensions python/typeshed#1564
User-defined protocols python/mypy#3838
Learn more about hiding disruptive comments
The reason will be displayed to describe this comment to others. Learn more.
Tweaks following Jelle's comments
https://github.com/python/cpython/blob/master/Lib/_collections_abc.py#L151
Just checking for None attribute in the class sounds like a good idea, thought it wouldn't be enough by itself. For example, B could be defined like:
Release typing_extensions to PyPI #467
Backport latest changes and tests on Python 2
Apply the None rule only to callable protocol members. python/mypy#3938
Prohibit issubclass() for runtime protocols with non-method members python/mypy#3939
typing_extensions/src_py3/test_typing_extensions.py
Minor updates to protocol semantics python/mypy#3996
Minor updates to protocol semantics (
Yes, still valid. See python/cpython#89138 In general, please avoid commenting on long closed pull requests.