summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorPetr Viktorin <encukou@gmail.com>2023-05-03 13:17:14 (GMT)
committerGitHub <noreply@github.com>2023-05-03 13:17:14 (GMT)
commit524a7f77fd8244835e382f076dd4a76404580bb3 (patch)
tree2c4cf20e01075972e4861d8cfc54ec5902af1233 /Misc
parent423d7faeb37b6c13b3ebbf9255165fefc651983e (diff)
downloadcpython-524a7f77fd8244835e382f076dd4a76404580bb3.zip
cpython-524a7f77fd8244835e382f076dd4a76404580bb3.tar.gz
cpython-524a7f77fd8244835e382f076dd4a76404580bb3.tar.bz2
gh-103968: Deprecate creating heap types whose metaclass has custom tp_new. (GH-103972)
(That's a mouthful of an edge case!) Co-authored-by: Barney Gale <barney.gale@gmail.com>
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS.d/next/C API/2023-04-28-18-04-38.gh-issue-103968.EnVvOx.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2023-04-28-18-04-38.gh-issue-103968.EnVvOx.rst b/Misc/NEWS.d/next/C API/2023-04-28-18-04-38.gh-issue-103968.EnVvOx.rst
new file mode 100644
index 0000000..5e4270f
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2023-04-28-18-04-38.gh-issue-103968.EnVvOx.rst
@@ -0,0 +1,4 @@
+:c:func:`PyType_FromSpec` and its variants now allow creating classes whose
+metaclass overrides :c:member:`~PyTypeObject.tp_new`. The ``tp_new`` is
+ignored. This behavior is deprecated and will be disallowed in 3.14+. The
+new :c:func:`PyType_FromMetaclass` already disallows it.