summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst
diff options
context:
space:
mode:
authorGregory Beauregard <greg@greg.red>2022-06-25 06:35:33 (GMT)
committerGitHub <noreply@github.com>2022-06-25 06:35:33 (GMT)
commit81e91c95a51daaa77efa3a3758ecba0475cfef38 (patch)
tree88fe3a23f998737f846ec9c4d2d9a8701510cfd8 /Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst
parent605e9c66ad367b54a847f9fc65447a071742f554 (diff)
downloadcpython-81e91c95a51daaa77efa3a3758ecba0475cfef38.zip
cpython-81e91c95a51daaa77efa3a3758ecba0475cfef38.tar.gz
cpython-81e91c95a51daaa77efa3a3758ecba0475cfef38.tar.bz2
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>
Diffstat (limited to 'Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst')
-rw-r--r--Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst b/Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst
new file mode 100644
index 0000000..2d2815c
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-02-05-18-46-54.bpo-46642.YI6nHQ.rst
@@ -0,0 +1 @@
+Improve error message when trying to subclass an instance of :data:`typing.TypeVar`, :data:`typing.ParamSpec`, :data:`typing.TypeVarTuple`, etc. Based on patch by Gregory Beauregard.