diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2023-05-18 22:56:15 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-18 22:56:15 (GMT) |
commit | b9dce3aec46bf5190400bd8239fdd4ea9e64d674 (patch) | |
tree | dc4e08c00d835d3f45b66e5be4b73df0d94ddbe3 /Modules | |
parent | 1c55e8d00728ceabd97cd1a5bd4906c9875a80c6 (diff) | |
download | cpython-b9dce3aec46bf5190400bd8239fdd4ea9e64d674.zip cpython-b9dce3aec46bf5190400bd8239fdd4ea9e64d674.tar.gz cpython-b9dce3aec46bf5190400bd8239fdd4ea9e64d674.tar.bz2 |
gh-104549: Set __module__ on TypeAliasType (#104550)
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_typingmodule.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/_typingmodule.c b/Modules/_typingmodule.c index ed2999c..39a124a 100644 --- a/Modules/_typingmodule.c +++ b/Modules/_typingmodule.c @@ -6,6 +6,7 @@ #include "Python.h" #include "internal/pycore_interp.h" +#include "internal/pycore_typevarobject.h" #include "clinic/_typingmodule.c.h" /*[clinic input] @@ -56,9 +57,11 @@ _typing_exec(PyObject *m) EXPORT_TYPE("ParamSpec", paramspec_type); EXPORT_TYPE("ParamSpecArgs", paramspecargs_type); EXPORT_TYPE("ParamSpecKwargs", paramspeckwargs_type); - EXPORT_TYPE("TypeAliasType", typealias_type); EXPORT_TYPE("Generic", generic_type); #undef EXPORT_TYPE + if (PyModule_AddObjectRef(m, "TypeAliasType", (PyObject *)&_PyTypeAlias_Type) < 0) { + return -1; + } return 0; } |