Issue #27243: Change PendingDeprecationWarning -> DeprecationWarning.

As it was agreed in the issue, __aiter__ returning an awaitable
should result in PendingDeprecationWarning in 3.5 and in
DeprecationWarning in 3.6.
This commit is contained in:
Yury Selivanov 2016-11-08 15:13:07 -05:00
parent 1c9bd1d8ec
commit 2edd8a1e2c
3 changed files with 15 additions and 10 deletions

View file

@ -1911,7 +1911,7 @@ _PyEval_EvalFrameDefault(PyFrameObject *f, int throwflag)
Py_DECREF(iter);
if (PyErr_WarnFormat(
PyExc_PendingDeprecationWarning, 1,
PyExc_DeprecationWarning, 1,
"'%.100s' implements legacy __aiter__ protocol; "
"__aiter__ should return an asynchronous "
"iterator, not awaitable",