summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorAlex Waygood <Alex.Waygood@Gmail.com>2023-06-23 14:59:25 (GMT)
committerGitHub <noreply@github.com>2023-06-23 14:59:25 (GMT)
commit9499b0f138cc53b9a2590350d0b545d2f69ee126 (patch)
tree5645c328afb0e9205ae4c8264b48460ca86ec681 /Misc
parent968435ddb1c1af9333befb26f7970cded8a5c710 (diff)
downloadcpython-9499b0f138cc53b9a2590350d0b545d2f69ee126.zip
cpython-9499b0f138cc53b9a2590350d0b545d2f69ee126.tar.gz
cpython-9499b0f138cc53b9a2590350d0b545d2f69ee126.tar.bz2
gh-105974: Revert unintentional behaviour change for protocols with non-callable members and custom `__subclasshook__` methods (#105976)
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/Library/2023-06-21-19-04-27.gh-issue-105974.M47n3t.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Library/2023-06-21-19-04-27.gh-issue-105974.M47n3t.rst b/Misc/NEWS.d/next/Library/2023-06-21-19-04-27.gh-issue-105974.M47n3t.rst
new file mode 100644
index 0000000..982192e
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2023-06-21-19-04-27.gh-issue-105974.M47n3t.rst
@@ -0,0 +1,6 @@
+Fix bug where a :class:`typing.Protocol` class that had one or more
+non-callable members would raise :exc:`TypeError` when :func:`issubclass`
+was called against it, even if it defined a custom ``__subclasshook__``
+method. The behaviour in Python 3.11 and lower -- which has now been
+restored -- was not to raise :exc:`TypeError` in these situations if a
+custom ``__subclasshook__`` method was defined. Patch by Alex Waygood.