]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-46642: Explicitly disallow subclassing of instaces of TypeVar, ParamSpec, etc...
authorGregory Beauregard <greg@greg.red>
Sat, 25 Jun 2022 06:35:33 +0000 (01:35 -0500)
committerGitHub <noreply@github.com>
Sat, 25 Jun 2022 06:35:33 +0000 (09:35 +0300)
commit81e91c95a51daaa77efa3a3758ecba0475cfef38
tree88fe3a23f998737f846ec9c4d2d9a8701510cfd8
parent605e9c66ad367b54a847f9fc65447a071742f554
bpo-46642: Explicitly disallow subclassing of instaces of TypeVar, ParamSpec, etc (GH-31148)

The existing test covering this case passed only incidentally. We
explicitly disallow doing this and add a proper error message.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/test/test_typing.py
Lib/typing.py
Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst [new file with mode: 0644]