summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-09-03 16:56:05 (GMT)
committerGitHub <noreply@github.com>2021-09-03 16:56:05 (GMT)
commit41c23740243cc3a0699bc4d5dcfd47a0007ff039 (patch)
treeea37dd3bc3cbbcd779881d394a6120506e53b103 /Objects
parent98eb40828af97760badfa7b8ff84bd4f7a079839 (diff)
downloadcpython-41c23740243cc3a0699bc4d5dcfd47a0007ff039.zip
cpython-41c23740243cc3a0699bc4d5dcfd47a0007ff039.tar.gz
cpython-41c23740243cc3a0699bc4d5dcfd47a0007ff039.tar.bz2
[3.9] bpo-45083: Include the exception class qualname when formatting an exception (GH-28119) (GH-28135)
* bpo-45083: Include the exception class qualname when formatting an exception (GH-28119) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@innova.no> (cherry picked from commit b4b6342848ec0459182a992151099252434cc619) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Co-authored-by: Ɓukasz Langa <lukasz@langa.pl>
Diffstat (limited to 'Objects')
-rw-r--r--Objects/typeobject.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index f201515..feae25f 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3119,6 +3119,14 @@ PyType_FromSpec(PyType_Spec *spec)
return PyType_FromSpecWithBases(spec, NULL);
}
+/* private in 3.10 and 3.9.8+; public in 3.11 */
+PyObject *
+_PyType_GetQualName(PyTypeObject *type)
+{
+ return type_qualname(type, NULL);
+}
+
+
void *
PyType_GetSlot(PyTypeObject *type, int slot)
{