summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
Diffstat (limited to 'Objects')
-rw-r--r--Objects/exceptions.c4
-rw-r--r--Objects/moduleobject.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index 4c6a122..cbcda7b 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -424,9 +424,9 @@ SimpleExtendsException(PyExc_Exception, StopIteration,
/*
- * GeneratorExit extends Exception
+ * GeneratorExit extends BaseException
*/
-SimpleExtendsException(PyExc_Exception, GeneratorExit,
+SimpleExtendsException(PyExc_BaseException, GeneratorExit,
"Request that a generator exit.");
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c
index b8b2b8e..bf19f3c 100644
--- a/Objects/moduleobject.c
+++ b/Objects/moduleobject.c
@@ -30,6 +30,8 @@ PyModule_New(const char *name)
goto fail;
if (PyDict_SetItemString(m->md_dict, "__doc__", Py_None) != 0)
goto fail;
+ if (PyDict_SetItemString(m->md_dict, "__package__", Py_None) != 0)
+ goto fail;
Py_DECREF(nameobj);
PyObject_GC_Track(m);
return (PyObject *)m;