Bug 1713818: Require Python 3.6+ to run Mach r=ahal

This will both:
* Ensure that developers aren't accidentally using Mach with Python 2
  in the year 2021.
* Confirm that CI tasks aren't still using Python 2 with Mach.
* Remove support for Python 3.5, which is EOL'd.

Differential Revision: https://phabricator.services.mozilla.com/D116484
This commit is contained in:
Mitchell Hentges 2021-06-03 15:54:28 +00:00
Родитель 0ce0daef98
Коммит 75f1a25537
2 изменённых файлов: 3 добавлений и 10 удалений

Просмотреть файл

@ -193,9 +193,9 @@ def bootstrap(topsrcdir):
# Ensure we are running Python 2.7 or 3.5+. We put this check here so we
# generate a user-friendly error message rather than a cryptic stack trace
# on module import.
major, minor = sys.version_info[:2]
if (major == 2 and minor < 7) or (major == 3 and minor < 5):
print("Python 2.7 or Python 3.5+ is required to run mach.")
major = sys.version_info[:2][0]
if sys.version_info < (3, 6):
print("Python 3.6+ is required to run mach.")
print("You are running Python", platform.python_version())
sys.exit(1)

Просмотреть файл

@ -287,13 +287,6 @@ class Bootstrapper(object):
subprocess.check_call((sys.executable, mach_binary, "install-moz-phab"))
def bootstrap(self, settings):
if sys.version_info[0] < 3:
print(
"This script must be run with Python 3. \n"
'Try "python3 bootstrap.py".'
)
sys.exit(1)
if self.choice is None:
# Like ['1. Firefox for Desktop', '2. Firefox for Android Artifact Mode', ...].
labels = [