diff options
author | Jelle Zijlstra <jelle.zijlstra@gmail.com> | 2025-03-04 11:44:19 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-04 11:44:19 -0800 |
commit | dc6d66f44c0a25b69dfec7e4ffc4a6fa5e4feada (patch) | |
tree | 045fed4b7965d56ea45c009dad6dddb42d7be8b0 /Modules/_typingmodule.c | |
parent | e091520fdbcfe406e5fdcf66b7864b2b34a6726b (diff) | |
download | cpython-dc6d66f44c0a25b69dfec7e4ffc4a6fa5e4feada.tar.gz cpython-dc6d66f44c0a25b69dfec7e4ffc4a6fa5e4feada.zip |
gh-105499: Merge typing.Union and types.UnionType (#105511)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Co-authored-by: Ken Jin <kenjin@python.org>
Co-authored-by: Carl Meyer <carl@oddbird.net>
Diffstat (limited to 'Modules/_typingmodule.c')
-rw-r--r-- | Modules/_typingmodule.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Modules/_typingmodule.c b/Modules/_typingmodule.c index 09fbb3c5e8b..e51279c808a 100644 --- a/Modules/_typingmodule.c +++ b/Modules/_typingmodule.c @@ -5,9 +5,10 @@ #endif #include "Python.h" -#include "pycore_interp.h" +#include "internal/pycore_interp.h" +#include "internal/pycore_typevarobject.h" +#include "internal/pycore_unionobject.h" // _PyUnion_Type #include "pycore_pystate.h" // _PyInterpreterState_GET() -#include "pycore_typevarobject.h" #include "clinic/_typingmodule.c.h" /*[clinic input] @@ -63,6 +64,9 @@ _typing_exec(PyObject *m) if (PyModule_AddObjectRef(m, "TypeAliasType", (PyObject *)&_PyTypeAlias_Type) < 0) { return -1; } + if (PyModule_AddObjectRef(m, "Union", (PyObject *)&_PyUnion_Type) < 0) { + return -1; + } if (PyModule_AddObjectRef(m, "NoDefault", (PyObject *)&_Py_NoDefaultStruct) < 0) { return -1; } |