diff --git a/.pylintrc b/.pylintrc index b43e363f1ca..9d79cc2b461 100644 --- a/.pylintrc +++ b/.pylintrc @@ -133,6 +133,9 @@ dummy-variables-rgx=_|dummy # you should avoid to define new builtins when possible. additional-builtins= +# List of modules that can redefine builtins. (For python 2/3 compatibility) +redefining-builtins-modules=builtins + [TYPECHECK] diff --git a/dev-support/python-requirements.txt b/dev-support/python-requirements.txt index e7fcf3168b3..8ef693e7221 100644 --- a/dev-support/python-requirements.txt +++ b/dev-support/python-requirements.txt @@ -16,6 +16,7 @@ # limitations under the License. # requests +future gitpython rbtools jinja2 diff --git a/dev-support/submit-patch.py b/dev-support/submit-patch.py index 352b1ba433c..8c529153f65 100755 --- a/dev-support/submit-patch.py +++ b/dev-support/submit-patch.py @@ -22,6 +22,7 @@ # are not updated. Review board id is retrieved from the remote link in the jira. # Print help: submit-patch.py --h import argparse +from builtins import input, str import getpass import git import json @@ -146,7 +147,7 @@ def get_patch_name_with_version(patch_name_prefix): if html.status_code != 200: log_fatal_and_exit(" Cannot fetch jira information. Status code %s", html.status_code) # Iterate over patch names starting from version 1 and return when name is not already used. - content = unicode(html.content, 'utf-8') + content = str(html.content, 'utf-8') for i in range(1, 1000): name = patch_name_prefix + "." + ('{0:03d}'.format(i)) + ".patch" if name not in content: @@ -196,10 +197,10 @@ def get_credentials(): log_fatal_and_exit(" Couldn't decrypt ~/.apache-creds file. Exiting..") creds = json.loads(content) else: - creds['jira_username'] = raw_input("Jira username:") + creds['jira_username'] = input("Jira username:") creds['jira_password'] = getpass.getpass("Jira password:") if not args.skip_review_board: - creds['rb_username'] = raw_input("Review Board username:") + creds['rb_username'] = input("Review Board username:") creds['rb_password'] = getpass.getpass("Review Board password:") return creds