push_to_asf.py asks the user for input. This recently
switched from raw_input() to input(), because Python 3
doesn't have a raw_input() function.
Python 2's input() function has weird semantics. At the
"[Y/n]:" prompt, typing y (no quotes) produces this error:
NameError: name 'y' is not defined
Instead, it wants 'y' (with quotes). This is because Python 2's
input() function wants a python expression. This switches the
script to use python3, which has the old behavior from
raw_input().
Testing:
- Ran script with Python 3, hand tested the confirm_prompt function
Change-Id: Ida49993bfea71ade9d335ac1ceb53788d0a57f69
Reviewed-on: http://gerrit.cloudera.org:8080/19817
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Joe McDonnell <joemcdonnell@cloudera.com>
We're starting to see environments where the system Python ('python') is
Python 3. Updates utility and build scripts to work with Python 3, and
updates check-pylint-py3k.sh to check scripts that use system python.
Fixes other issues found during a full build and test run with Python
3.8 as the default for 'python'.
Fixes a impala-shell tip that was supposed to have been two tips (and
had no space after period when they were printed).
Removes out-of-date deploy.py and various Python 2.6 workarounds.
Testing:
- Full build with /usr/bin/python pointed to python3
- run-all-tests passed with python pointed to python3
- ran push_to_asf.py
Change-Id: Idff388aff33817b0629347f5843ec34c78f0d0cb
Reviewed-on: http://gerrit.cloudera.org:8080/19697
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Michael Smith <michael.smith@cloudera.com>
Python 3 now treats print as a function and requires
the parenthesis in invocation.
print "Hello World!"
is now:
print("Hello World!")
This fixes all locations to use the function
invocation. This is more complicated when the output
is being redirected to a file or when avoiding the
usual newline.
print >> sys.stderr , "Hello World!"
is now:
print("Hello World!", file=sys.stderr)
To support this properly and guarantee equivalent behavior
between python 2 and python 3, all files that use print
now add this import:
from __future__ import print_function
This also fixes random flake8 issues that intersect with
the changes.
Testing:
- check-python-syntax.sh shows no errors related to print
Change-Id: Ib634958369ad777a41e72d80c8053b74384ac351
Reviewed-on: http://gerrit.cloudera.org:8080/19552
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Reviewed-by: Michael Smith <michael.smith@cloudera.com>
Tested-by: Michael Smith <michael.smith@cloudera.com>
All Apache repositories are migrating from git-wip to gitbox.
With INFRA-17572, the Impala repo is now on gitbox. This change
updates the references to git-wip in the Impala codebase
to gitbox.
I found the references using "git grep git-wip"
Change-Id: I480a1062cdf0fb6efd82f8b2da2a521fdc8b875d
Reviewed-on: http://gerrit.cloudera.org:8080/12232
Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This fixes push_to_asf.py and various other scripts that had the Apache
repo location hard-coded. Also fixed the location of the github mirror
and mailing list archives.
Testing:
Ran push_to_asf.py to check I got the URL right. Checked a couple of the
github and mailing list URLs to make sure the new URL is valid.
Change-Id: Ie49221300340ef34bdd7c01670c35bdbbce3e84f
Reviewed-on: http://gerrit.cloudera.org:8080/8685
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Reviewed-by: Jim Apple <jbapple-impala@apache.org>
Reviewed-by: Michael Brown <mikeb@cloudera.com>
Tested-by: Impala Public Jenkins
The script now points to the updated 'Impala-ASF' repo on Gerrit.
Some fixes were also made to the error messages and how we handle
remotes.
Now we have the following options:
'--gerrit_remote' to set any gerrit remote name of the committers
choice.
'--apache_remote' also lets any remote name to point to the Apache
git repo.
The Gerrit URL is now hardcoded and no longer an option because the
Gerrit project name has been decided and is unlikely to change.
This is a follow up commit to other commits with the same JIRA ID.
Change-Id: Ieac2c2715ced99fd0ff3e3c1422187d5d1eef3d9
Reviewed-on: http://gerrit.cloudera.org:8080/3759
Reviewed-by: Jim Apple <jbapple@cloudera.com>
Reviewed-by: Sailesh Mukil <sailesh@cloudera.com>
Tested-by: Sailesh Mukil <sailesh@cloudera.com>
Adds a script (copied and modified from Kudu) that attempts
to push any changes to ASF branches from gerrit branches
that have new changes.
Change-Id: I15de939acc4b08a8f01511fffcb6ab1743d09c01
Reviewed-on: http://gerrit.cloudera.org:8080/3468
Reviewed-by: Matthew Jacobs <mj@cloudera.com>
Tested-by: Internal Jenkins