[ https://issues.apache.org/jira/browse/BEAM-8229?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16929339#comment-16929339 ]
Valentyn Tymofieiev edited comment on BEAM-8229 at 9/13/19 4:28 PM: -------------------------------------------------------------------- The rootcause of this failure is that we run a Python 3-only test in Python 2. To be excluded from execution on Python 2, test needs to end with _py3, not _py37. However, this may not be sufficient for the purposes of the failing test in case if it uses py37 syntax that is invalid on Python 35 (we can check if it also fails in Python 3.5 postcommits). If so, this is may be the first such test, as we don't have a per-minor version exclusion mechanism yet. We could improve the rules of how py3 tests are excluded, or, perhaps wait until we switch to py_test, which may make these type of configurations easier. cc: [~chadrik] [~udim] [~markliu] who may have opinions here. was (Author: tvalentyn): The rootcause of this failure is that we run a Python 3-only test in Python 2. To be excluded from execution on Python 2, test needs to end with _py3, not _py37. However, this may not be sufficient for the purposes of the failing test in case, it uses py37 syntax that is invalid on Python 35 (we can check if it also fails in Python 3.5 postcommits). If so, this is may be the first such test, as we don't have a per-minor version exclusion mechanism yet. We could improve the rules of how py3 tests are excluded, or, perhaps wait until we switch to py_test, which may make these type of configurations easier. cc: [~chadrik] [~udim] [~markliu] who may have opinions here. > Python postcommit 3.7 tests are failing with syntax error > --------------------------------------------------------- > > Key: BEAM-8229 > URL: https://issues.apache.org/jira/browse/BEAM-8229 > Project: Beam > Issue Type: Bug > Components: sdk-py-core > Reporter: Ahmet Altay > Assignee: Udi Meiri > Priority: Blocker > > Root cause: https://github.com/apache/beam/pull/9098 > 20:12:14 Traceback (most recent call last): > 20:12:14 File > "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python2_PR/src/build/gradleenv/-194514014/local/lib/python2.7/site-packages/nose/loader.py", > line 418, in loadTestsFromName > 20:12:14 addr.filename, addr.module) > 20:12:14 File > "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python2_PR/src/build/gradleenv/-194514014/local/lib/python2.7/site-packages/nose/importer.py", > line 47, in importFromPath > 20:12:14 return self.importFromDir(dir_path, fqname) > 20:12:14 File > "/home/jenkins/jenkins-slave/workspace/beam_PostCommit_Python2_PR/src/build/gradleenv/-194514014/local/lib/python2.7/site-packages/nose/importer.py", > line 94, in importFromDir > 20:12:14 mod = load_module(part_fqname, fh, filename, desc) > 20:12:14 SyntaxError: invalid syntax (external_test_py37.py, line 46) -- This message was sent by Atlassian Jira (v8.3.2#803003)