Skip to content

Conversation

@tirkarthi
Copy link
Member

@tirkarthi tirkarthi commented Jun 21, 2019

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

@tirkarthi
Copy link
Member Author

Tested locally

➜  cpython git:(bpo37323) PYTHONWARNINGS=error ./python.exe -Werror -m test -v test_asyncio -m test_debug_mode_interop
== CPython 3.9.0a0 (heads/master:f8dd77d360, Jun 21 2019, 23:36:25) [Clang 7.0.2 (clang-700.1.81)]
== macOS-10.10.4-x86_64-i386-64bit little-endian
== cwd: /Users/karthikeyansingaravelan/stuff/python/cpython/build/test_python_3331
== CPU count: 4
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 1.88 [1/1] test_asyncio
test_debug_mode_interop (test.test_asyncio.test_tasks.CompatibilityTests) ... ok

----------------------------------------------------------------------

Ran 1 test in 0.324s

OK

== Tests result: SUCCESS ==

1 test OK.

Total duration: 1 sec 363 ms
Tests result: SUCCESS

Copy link
Member

@vstinner vstinner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. But I would prefer to see @asvetlov or @1st1 also review it.

Copy link
Contributor

@asvetlov asvetlov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.
The test change is correct.
We should support @coroutine for years in deprecated mode.

@miss-islington miss-islington merged commit 186f709 into python:master Jun 22, 2019
@miss-islington
Copy link
Contributor

Thanks @tirkarthi for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Jun 22, 2019
…ythonGH-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
(cherry picked from commit 186f709)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
@bedevere-bot
Copy link

GH-14305 is a backport of this pull request to the 3.8 branch.

@tirkarthi
Copy link
Member Author

Thanks for the reviews :)

miss-islington added a commit that referenced this pull request Jun 22, 2019
…H-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
(cherry picked from commit 186f709)

Co-authored-by: Xtreak <tir.karthi@gmail.com>
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot x86 Gentoo Installed with X 3.x has failed when building commit 186f709.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/103/builds/2688) and take a look at the build logs.
  4. Check if the failure is related to this commit (186f709) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/103/builds/2688

Click to see traceback logs
From https://github.com/python/cpython
 * branch                  master     -> FETCH_HEAD
Reset branch 'master'

Objects/unicodeobject.c: In function ‘_PyUnicode_CheckConsistency’:
Objects/unicodeobject.c:459:15: warning: variable ‘data’ set but not used [-Wunused-but-set-variable]
         void *data;
               ^~~~
Python/peephole.c: In function ‘PyCode_Optimize’:
Python/peephole.c:258:19: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Py_ssize_t’ {aka ‘int’} [-Wsign-compare]
     for (j = 0; j < tabsiz; j += 2) {
                   ^
Python/pystrhex.c: In function ‘_Py_strhex_impl’:
Python/pystrhex.c:60:27: warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘Py_ssize_t’ {aka ‘const int’} [-Wsign-compare]
     if (abs_bytes_per_sep >= arglen) {
                           ^~

/buildbot/tmp/tmpdir/tmp39gfau5i/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w
/buildbot/tmp/tmpdir/tmp39gfau5i/pip-19.0.3-py2.py3-none-any.whl/pip/_vendor/pyparsing.py:3068: SyntaxWarning: invalid escape sequence \w

@asvetlov
Copy link
Contributor

Hmm, the failure is

======================================================================
FAIL: test_list_cases (test.test_regrtest.ArgsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/test_regrtest.py", line 915, in test_list_cases
    self.assertEqual(output.splitlines(), all_methods)
AssertionError: Lists differ: ['tes[73 chars]hod2', "/buildbot/buildarea/cpython/3.x.ware-g[305 chars]th:'] != ['tes[73 chars]hod2']
First list contains 2 additional elements.
First extra element 2:
"/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/support/__init__.py:1058: RuntimeWarning: tests may fail, unable to create temporary directory '/buildbot/tmp/tmpdir/test_python_5670': [Errno 17] File exists: '/buildbot/tmp/tmpdir/test_python_5670'"
  ['test_regrtest_noop8.Tests.test_method1',
-  'test_regrtest_noop8.Tests.test_method2',
?                                          ^
+  'test_regrtest_noop8.Tests.test_method2']
?                                          ^
-  '/buildbot/buildarea/cpython/3.x.ware-gentoo-x86.installed/build/target/lib/python3.9/test/support/__init__.py:1058: '
-  'RuntimeWarning: tests may fail, unable to create temporary directory '
-  "'/buildbot/tmp/tmpdir/test_python_5670': [Errno 17] File exists: "
-  "'/buildbot/tmp/tmpdir/test_python_5670'",
-  '  with temp_dir(path=name, quiet=quiet) as temp_path:']

I'm pretty sure it is not related to the PR.

@tirkarthi
Copy link
Member Author

There is an issue for this test failure : https://bugs.python.org/issue37359

@tirkarthi tirkarthi deleted the bpo37323 branch June 22, 2019 13:53
lisroach pushed a commit to lisroach/cpython that referenced this pull request Sep 10, 2019
…ythonGH-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
@tirkarthi tirkarthi restored the bpo37323 branch September 27, 2019 04:35
DinoV pushed a commit to DinoV/cpython that referenced this pull request Jan 14, 2020
…ythonGH-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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants