From 94030d06be8746e5accf510726dfdcd747bda8a9 Mon Sep 17 00:00:00 2001 From: ahochheiden Date: Tue, 12 Dec 2023 03:52:00 +0000 Subject: [PATCH] Bug 1843209 - Bump Mach's minimum Python version to `3.8` r=firefox-build-system-reviewers,glandium Differential Revision: https://phabricator.services.mozilla.com/D183449 --- build/docs/python.rst | 2 +- js/src/jit-test/README | 2 +- mach | 4 ++-- python/mozboot/bin/bootstrap.py | 6 ++--- taskcluster/ci/bootstrap/kind.yml | 5 ----- taskcluster/ci/packages/ubuntu.yml | 22 +++++++++---------- taskcluster/ci/toolchain/python.yml | 11 ---------- taskcluster/docker/ubuntu1804-base/Dockerfile | 8 +++---- 8 files changed, 22 insertions(+), 38 deletions(-) diff --git a/build/docs/python.rst b/build/docs/python.rst index 1c54dd1452d0..4edef1244d2c 100644 --- a/build/docs/python.rst +++ b/build/docs/python.rst @@ -11,7 +11,7 @@ related to the build system, Python is typically the first choice. Python Requirements =================== -The tree requires Python 3.7 or greater to build. +The tree requires Python 3.8 or greater to build. All Python packages not in the Python distribution are included in the source tree. So all you should need is a vanilla Python install and you should be good to go. diff --git a/js/src/jit-test/README b/js/src/jit-test/README index 31fe732d51c9..5e559e9aa194 100644 --- a/js/src/jit-test/README +++ b/js/src/jit-test/README @@ -20,7 +20,7 @@ they are running in the JS shell environment. * REQUIREMENTS -Python 3.7. This is already a standard requirement for building our tree. +Python 3.8. This is already a standard requirement for building our tree. * RUNNING THE TESTS diff --git a/mach b/mach index b5a6ef1a94f9..5ea05fb643c0 100755 --- a/mach +++ b/mach @@ -10,7 +10,7 @@ import subprocess import traceback from textwrap import dedent, fill -MIN_PYTHON_VERSION = (3, 7) +MIN_PYTHON_VERSION = (3, 8) MAX_PYTHON_VERSION_TO_CONSIDER = (3, 11) @@ -80,7 +80,7 @@ def try_alternate_python3_executables(args): def main(args): - # Ensure we are running Python 3.7+. We run this check as soon as + # Ensure we are running Python 3.8+. We run this check as soon as # possible to avoid a cryptic import/usage error. if sys.version_info < MIN_PYTHON_VERSION: print( diff --git a/python/mozboot/bin/bootstrap.py b/python/mozboot/bin/bootstrap.py index b3156e40a39c..8009219c1d78 100755 --- a/python/mozboot/bin/bootstrap.py +++ b/python/mozboot/bin/bootstrap.py @@ -14,10 +14,10 @@ import sys major, minor = sys.version_info[:2] -if (major < 3) or (major == 3 and minor < 7): +if (major < 3) or (major == 3 and minor < 8): print( - "Bootstrap currently only runs on Python 3.7+." - "Please try re-running with python3.7+." + "Bootstrap currently only runs on Python 3.8+." + "Please try re-running with python3.8+." ) sys.exit(1) diff --git a/taskcluster/ci/bootstrap/kind.yml b/taskcluster/ci/bootstrap/kind.yml index 4f34fde38abb..1a6118693193 100644 --- a/taskcluster/ci/bootstrap/kind.yml +++ b/taskcluster/ci/bootstrap/kind.yml @@ -12,11 +12,6 @@ transforms: - gecko_taskgraph.transforms.task:transforms jobs: - debian10: - image: debian:buster - pre-commands: - - apt-get update - - apt-get install -y --no-install-recommends curl mercurial python3-pip debian11: image: debian:bullseye pre-commands: diff --git a/taskcluster/ci/packages/ubuntu.yml b/taskcluster/ci/packages/ubuntu.yml index 3b63eb34c8ce..2218a55901dd 100644 --- a/taskcluster/ci/packages/ubuntu.yml +++ b/taskcluster/ci/packages/ubuntu.yml @@ -38,8 +38,8 @@ ub18-python-psutil: sha256: a0ca4560d25fcfe5b7407d2cb21318f0635f2c3559898efce1679eef35b61f05 name: python-psutil pre-build-command: >- - apt-get install python3.7-dev python3.7-dbg && - export DEBPYTHON3_SUPPORTED="3.7" + apt-get install python3.8-dev python3.8-dbg && + export DEBPYTHON3_SUPPORTED="3.8" ub18-pygobject: description: "pygobject for Ubuntu bionic" @@ -51,8 +51,8 @@ ub18-pygobject: sha256: b77f84885d9b6d2c03422ecb3bf69d50dd0607d3456154943671e5a1f87946aa name: pygobject pre-build-command: >- - apt-get install python3.7-dev python3.7-dbg && - export DEBPYTHON3_SUPPORTED="3.6,3.7" + apt-get install python3.8-dev python3.8-dbg && + export DEBPYTHON3_SUPPORTED="3.6,3.8" ub18-pyatspi: description: "pyatspi for Ubuntu bionic" @@ -66,8 +66,8 @@ ub18-pyatspi: pre-build-command: >- sed -i s/\\basync\\b/asynchronous/ pyatspi/registry.py && EDITOR=cat dpkg-source --commit . sync && - apt-get install python3.7-dev python3.7-dbg && - export DEBPYTHON3_SUPPORTED="3.6,3.7" + apt-get install python3.8-dev python3.8-dbg && + export DEBPYTHON3_SUPPORTED="3.6,3.8" ub18-python-zstandard: description: "python-zstandard for Ubuntu bionic" @@ -79,8 +79,8 @@ ub18-python-zstandard: sha256: 31d12fcd942dd8dbf52ca5f6b1bbe287f44e5d551a081a983ff3ea2082867863 name: python-zstandard pre-build-command: >- - apt-get install python3.7-dev && - export DEBPYTHON3_SUPPORTED="3.7" && + apt-get install python3.8-dev && + export DEBPYTHON3_SUPPORTED="3.8" && debchange -v 0.19.0-1.ub18moz --distribution bionic "Mozilla backport for bionic" ub18-mercurial: @@ -92,9 +92,9 @@ ub18-mercurial: url: https://www.mercurial-scm.org/release/mercurial-6.4.3.tar.gz sha256: a77fb62d325934a83a00b2fc6db109f44c67b86768fc40490366f513640c7f64 pre-build-command: >- - apt-get install python3.7-dev && - export DEB_HG_PYTHON_VERSIONS="3.7" && - export DEBPYTHON3_SUPPORTED="3.7" && + apt-get install python3.8-dev && + export DEB_HG_PYTHON_VERSIONS="3.8" && + export DEBPYTHON3_SUPPORTED="3.8" && cp -r contrib/packaging/debian debian && sed -i -e "s/__VERSION__/$(awk -F\" '$2 {print $2}' mercurial/__version__.py)-1.ub18moz1/" \ -e "s/__DATE__/$(date --rfc-2822)/" \ diff --git a/taskcluster/ci/toolchain/python.yml b/taskcluster/ci/toolchain/python.yml index a05216fa5294..a198743a621b 100644 --- a/taskcluster/ci/toolchain/python.yml +++ b/taskcluster/ci/toolchain/python.yml @@ -12,17 +12,6 @@ job-defaults: run: script: build-cpython.sh -linux64-python-3.7: - treeherder: - symbol: TL(python3.7) - run: - toolchain-artifact: public/build/python.tar.zst - fetches: - fetch: - - cpython-3.7.15 - worker: - docker-image: {in-tree: ubuntu1804-build-python} - linux64-python-3.8: treeherder: symbol: TL(python) diff --git a/taskcluster/docker/ubuntu1804-base/Dockerfile b/taskcluster/docker/ubuntu1804-base/Dockerfile index 2a46f15a9db2..cf0c741728f2 100644 --- a/taskcluster/docker/ubuntu1804-base/Dockerfile +++ b/taskcluster/docker/ubuntu1804-base/Dockerfile @@ -37,9 +37,9 @@ RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAG make \ mercurial \ patch \ - python3.7 \ - python3.7-dev \ - python3.7-venv \ + python3.8 \ + python3.8-dev \ + python3.8-venv \ python3-distutils-extra \ python3-minimal \ python3-zstandard \ @@ -50,7 +50,7 @@ RUN /usr/local/sbin/setup_packages.sh $TASKCLUSTER_ROOT_URL $DOCKER_IMAGE_PACKAG zstd \ && /usr/local/sbin/clean_packages.sh $DOCKER_IMAGE_PACKAGES -RUN test $(readlink /usr/bin/python3) = python3.6 && ln -sf python3.7 /usr/bin/python3 +RUN test $(readlink /usr/bin/python3) = python3.6 && ln -sf python3.8 /usr/bin/python3 # %include testing/mozharness/external_tools/robustcheckout.py COPY topsrcdir/testing/mozharness/external_tools/robustcheckout.py /usr/local/mercurial/robustcheckout.py