gh-118895: Call PyType_Ready() on typing.NoDefault (#118897)

This commit is contained in:
Jelle Zijlstra 2024-05-10 08:42:00 -07:00 committed by GitHub
parent c444362c6e
commit 13d7cf997b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 27 additions and 2 deletions

View file

@ -63,6 +63,9 @@ _typing_exec(PyObject *m)
if (PyModule_AddObjectRef(m, "TypeAliasType", (PyObject *)&_PyTypeAlias_Type) < 0) {
return -1;
}
if (PyType_Ready(&_PyNoDefault_Type) < 0) {
return -1;
}
if (PyModule_AddObjectRef(m, "NoDefault", (PyObject *)&_Py_NoDefaultStruct) < 0) {
return -1;
}