Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(19)

Unified Diff: Objects/typeobject.c

Issue 20204: pydocs fails for some C implemented classes
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Objects/typeobject.c Sat Jan 31 12:20:40 2015 -0800
+++ b/Objects/typeobject.c Sun Feb 01 14:23:48 2015 +0200
@@ -2690,6 +2690,14 @@ PyType_FromSpecWithBases(PyType_Spec *sp
_PyDict_SetItemId(type->tp_dict, &PyId___module__,
PyUnicode_FromStringAndSize(
spec->name, (Py_ssize_t)(s - spec->name)));
+ else {
+ if (PyErr_WarnFormat(PyExc_SyntaxWarning, 1,
+ "builtin type %.200s has no the __module__ attribute",
+ spec->name)) {
+ Py_DECREF(res);
+ return NULL;
+ }
+ }
return (PyObject*)res;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+