mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
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:
parent
1c9bd1d8ec
commit
2edd8a1e2c
3 changed files with 15 additions and 10 deletions
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue