[Python-checkins] bpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)

Miss Islington (bot) webhook-mailer at python.org
Sat Jun 22 06:25:34 EDT 2019


https://github.com/python/cpython/commit/186f70905d07b42a9cbf0a29e448f30baf2b53cb
commit: 186f70905d07b42a9cbf0a29e448f30baf2b53cb
branch: master
author: Xtreak <tir.karthi at gmail.com>
committer: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
date: 2019-06-22T03:25:25-07:00
summary:

bpo-37323: Suppress DeprecationWarning raised by @asyncio.coroutine (GH-14293)



When the test is ran with `PYTHONWARNINGS=error` the environment variable is passed to the python interpreter used in `assert_python_ok` where `DeprecationWarning` from  `@asyncio.coroutine` is converted into an error. Ignore the `DeprecationWarning` in `assert_python_ok`.


https://bugs.python.org/issue37323

files:
M Lib/test/test_asyncio/test_tasks.py

diff --git a/Lib/test/test_asyncio/test_tasks.py b/Lib/test/test_asyncio/test_tasks.py
index 22a49077d5e7..d5f44b8091de 100644
--- a/Lib/test/test_asyncio/test_tasks.py
+++ b/Lib/test/test_asyncio/test_tasks.py
@@ -3352,7 +3352,9 @@ def old_style_coro():
 
             asyncio.run(old_style_coro())
         """)
-        assert_python_ok("-c", code, PYTHONASYNCIODEBUG="1")
+
+        assert_python_ok("-Wignore::DeprecationWarning", "-c", code,
+                         PYTHONASYNCIODEBUG="1")
 
 
 if __name__ == '__main__':



More information about the Python-checkins mailing list