bpo-44807: Allow Protocol classes to define __init__ by adriangb · Pull Request #31628 · python/cpython · GitHub

github.com

Tin mới

adriangb:allow-init-in-protocol

GitHub CopilotWrite better code with AI

GitHub Copilot appDirect agents from issue to merge

ActionsAutomate any workflow

CodespacesInstant dev environments

IssuesPlan and track work

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

View all use cases

Financial services

View all industries

Software Development

GitHub SponsorsFund open source developers

Copilot for BusinessEnterprise-grade AI features

Premium SupportEnterprise-grade 24/7 support

Pull requests 2.6k

Security and quality 0

Allow Protocol classes to define __init__

View reviewed changes

Learn more about hiding disruptive comments

The reason will be displayed to describe this comment to others. Learn more.

📜🤖 Added by blurb_it.

split up and improve test

View reviewed changes

Update Lib/test/test_typing.py

Update Misc/NEWS.d/next/Library/2022-03-02-04-25-58.bpo-44807.gHNC9J.rst

Update Lib/test/test_typing.py

View reviewed changes

Update Lib/test/test_typing.py

View reviewed changes

typing.Protocol silently overrides __init__ method of delivered class #88970

Add typing to 3.11 What's New #91491

stubtest: fix false-positive error for Protocol __init__s and Protocol __annotations__ python/mypy#13179

typing.Protocol in 3.11 needs to be backported python/typing_extensions#104

Backport https://github.com/python/cpython/pull/31628

python3-typing-extensions: upgrade 4.5.0 -> 4.6.2

python/cpython#23294

python/cpython#23383

python/cpython#74690

python/cpython#103034

python/cpython#101827

python/cpython#104048

python3-typing-extensions: upgrade 4.5.0 -> 4.6.2

python3-typing-extensions: upgrade 4.5.0 -> 4.6.2

Update dependency typing-extensions to v4.6.3 (

https://github.com/python/cpython/pull/105152](https://togithub.com/python/cpython/pull/105152)l/105152

https://github.com/python/cpython/pull/23294](https://togithub.com/python/cpython/pull/23294)3294

https://github.com/python/cpython/pull/23383](https://togithub.com/python/cpython/pull/23383)ll/23383