8000 PEP 737: gh-111696: Add type.__fully_qualified_name__ attribute by vstinner · Pull Request #112133 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

PEP 737: gh-111696: Add type.__fully_qualified_name__ attribute #112133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 8 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix PyType_FromSpec() error handling
  • Loading branch information
vstinner committed Nov 17, 2023
commit e63c93730d73f671064c1791958bd7c6c8a3a739
6 changes: 3 additions & 3 deletions Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ test_get_type_name(PyObject *self, PyObject *Py_UNUSED(ignored))

PyObject *HeapTypeNameType = PyType_FromSpec(&HeapTypeNameType_Spec);
if (HeapTypeNameType == NULL) {
Py_RETURN_NONE;
return NULL;
}
tp_name = PyType_GetName((PyTypeObject *)HeapTypeNameType);
assert(PyUnicode_EqualToUTF8(tp_name, "HeapTypeNameType"));
Expand Down Expand Up @@ -620,7 +620,7 @@ test_get_type_qualname(PyObject *self, PyObject *Py_UNUSED(ignored))

PyObject *HeapTypeNameType = PyType_FromSpec(&HeapTypeNameType_Spec);
if (HeapTypeNameType == NULL) {
Py_RETURN_NONE;
return NULL;
}
tp_qualname = PyType_GetQualName((PyTypeObject *)HeapTypeNameType);
assert(PyUnicode_EqualToUTF8(tp_qualname, "HeapTypeNameType"));
Expand Down Expand Up @@ -658,7 +658,7 @@ test_get_type_fullyqualname(PyObject *self, PyObject *Py_UNUSED(ignored))

PyObject *HeapTypeNameType = PyType_FromSpec(&HeapTypeNameType_Spec);
if (HeapTypeNameType == NULL) {
Py_RETURN_NONE;
return NULL;
}
name = PyType_GetFullyQualifiedName((PyTypeObject *)HeapTypeNameType);
assert(PyUnicode_EqualToUTF8(name, "_testcapi.HeapTypeNameType"));
Expand Down
0