mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
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>
This commit is contained in:
parent
e091520fdb
commit
dc6d66f44c
20 changed files with 562 additions and 327 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue