summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-09-08 16:32:19 (GMT)
committerGitHub <noreply@github.com>2021-09-08 16:32:19 (GMT)
commit6b996d61c96222d959d043b9424e8125c0efbb27 (patch)
tree2a6cbad4ec168b0c80c671db75d23c08cbd6239d /Objects
parentd41abe8970453716dbc6a3a898ac8fb01cbf6c6f (diff)
downloadcpython-6b996d61c96222d959d043b9424e8125c0efbb27.zip
cpython-6b996d61c96222d959d043b9424e8125c0efbb27.tar.gz
cpython-6b996d61c96222d959d043b9424e8125c0efbb27.tar.bz2
[3.10] bpo-45083: Include the exception class qualname when formatting an exception (GH-28119) (GH-28134)
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> * Use a private version of _PyType_GetQualName 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 a84a17d..d966d36 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -3617,6 +3617,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)
{