ci: drop now-dead Python 2 coverage

In the preceding commit we've dropped the last job that still used
Ubuntu 20.04. We still had some conditional logic for that specific
image that made us use Python 2 instead of Python 3, but this is dead
code now.

We could of course exercise Python 2 in any of our other CI jobs. But it
reached end of life in 2020 already, and none of the distros that we use
have it packaged anymore. Furthermore, it seems like the world has
finally adapted to Python 3. So it doesn't feel all that useful to still
exercise it.

Drop the logic and instead use Python 3 unconditionally.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
seen
Patrick Steinhardt 2026-10-09 13:32:04 +02:00 committed by Junio C Hamano
parent 35d666d7c0
commit 57ddf64d90
2 changed files with 2 additions and 11 deletions

View File

@ -61,7 +61,7 @@ ubuntu-*|i386/debian-*|debian-*)
tcl tk gettext zlib1g-dev perl-modules liberror-perl libauthen-sasl-perl \
libemail-valid-perl libio-pty-perl libio-socket-ssl-perl libnet-smtp-ssl-perl libdbd-sqlite3-perl libcgi-pm-perl \
libsecret-1-dev libpcre2-dev meson ninja-build pkg-config cargo \
${CC_PACKAGE:-${CC:-gcc}} $PYTHON_PACKAGE
${CC_PACKAGE:-${CC:-gcc}} python3

# Starting with Ubuntu 25.10, sudo can now be provided via either
# sudo(1) or sudo-rs(1), with the latter being the default. The problem

View File

@ -335,16 +335,7 @@ esac

case "$distro" in
ubuntu-*)
# Python 2 is end of life, and Ubuntu 23.04 and newer don't actually
# have it anymore. We thus only test with Python 2 on older LTS
# releases.
if test "$distro" = "ubuntu-20.04"
then
PYTHON_PACKAGE=python2
else
PYTHON_PACKAGE=python3
fi
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/$PYTHON_PACKAGE"
MAKEFLAGS="$MAKEFLAGS PYTHON_PATH=/usr/bin/python3"

export GIT_TEST_HTTPD=true