]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-44232: Fix type_new() error reporting (GH-26359)
authorVictor Stinner <vstinner@python.org>
Tue, 25 May 2021 20:28:10 +0000 (22:28 +0200)
committerGitHub <noreply@github.com>
Tue, 25 May 2021 20:28:10 +0000 (22:28 +0200)
commitbd199e72fb60a8ff001a023f23925092a290be91
treee9b5c2af362534862219d453a36046301212d8b5
parentbd404ccac0d3e8358995ac0cbeec9373bb6c4d96
bpo-44232: Fix type_new() error reporting (GH-26359)

Fix a regression in type() when a metaclass raises an exception. The
C function type_new() must properly report the exception when a
metaclass constructor raises an exception and the winner class is not
the metaclass.
Lib/test/test_types.py
Misc/NEWS.d/next/Core and Builtins/2021-05-25-18-20-10.bpo-44232.DMcCCf.rst [new file with mode: 0644]
Objects/typeobject.c