diff -r 03708c680eca Objects/genobject.c --- a/Objects/genobject.c Wed Feb 03 07:52:06 2016 +0000 +++ b/Objects/genobject.c Tue Feb 02 22:59:07 2016 +0530 @@ -178,7 +178,7 @@ /* Pop the exception before issuing a warning. */ PyErr_Fetch(&exc, &val, &tb); - if (PyErr_WarnFormat(PyExc_PendingDeprecationWarning, 1, + if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1, "generator '%.50S' raised StopIteration", gen->gi_qualname)) { /* Warning was converted to an error. */