Michael Smith has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22191 )
Change subject: IMPALA-13597: Upgrade critique-gerrit-review.py to Python3 ...................................................................... IMPALA-13597: Upgrade critique-gerrit-review.py to Python3 Commit 8e71f5ec8609cc046cf35eb044d91bf34ae9f9c7 has changed the Python environment for the gerrit-auto-critic script from Python2 to Python3. Unfortunately the change missed a few Python3-related updates, so the script started failing in the pre-commit environment. This patch adds the following updates to the Python3 update: - changes the virtualenv implementation from virtualenv to the venv module offered by default in Python3. - adds pip3 and system_site_packages=True to the venv creation - bumps the flake8 module to a newer version, as it doesn't have to be compatible with Python2 any longer. - extends Popen calls with universal_newlines=True wherever these were missing. The patch also fixes a regex search string in test_kudu.py (changes the regex pattern string to a raw Python string). This is somewhat unrelated to the Python script change, but it was discovered during testing to make flake8 emit a badly formatted warning message. The python3-venv and python3-wheel packages were installed manually on jenkins.impala.io during testing. These were necessary to eliminate errors during the scripts initial virtualenv-setup steps. Tests: - ran the new script locally - ran the new script through the precommit process using a test copy of the gerrit-auto-critic job, test-gerrit-auto-critic. Change-Id: I5efa035fae38bd42cc3b07f479da2b3983f68252 Reviewed-on: http://gerrit.cloudera.org:8080/22191 Reviewed-by: Riza Suminto <[email protected]> Reviewed-by: Michael Smith <[email protected]> Tested-by: Michael Smith <[email protected]> --- M bin/jenkins/critique-gerrit-review.py M tests/query_test/test_kudu.py 2 files changed, 11 insertions(+), 9 deletions(-) Approvals: Riza Suminto: Looks good to me, but someone else must approve Michael Smith: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/22191 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I5efa035fae38bd42cc3b07f479da2b3983f68252 Gerrit-Change-Number: 22191 Gerrit-PatchSet: 5 Gerrit-Owner: Laszlo Gaal <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Laszlo Gaal <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]>
