Skip to content

Commit aef8b4f

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26226: Bump minimum python version to 3.7
fa8fe5b scripted-diff: Use new python 3.7 keywords (MarcoFalke) fa2a235 Revert "contrib: Fix capture_output in getcoins.py" (MarcoFalke) dddd462 Bump minimum python version to 3.7 (MarcoFalke) Pull request description: While there is nothing that requires a bump, it may require less maintenance to drop python3.6 support. Python3.7 is available through the package manager on all currently supported operating systems. ACKs for top commit: jamesob: ACK bitcoin/bitcoin@fa8fe5b hebasto: ACK fa8fe5b Tree-SHA512: f6e080d8751948bb0e01c87be601363158f345e8037b70ce7e1bc507c611eb61600e4f24f1d2f8a6e7e44877ab09319302869e33ce8118c4c4f71fc89c0a1198
2 parents 3fef294 + fa8fe5b commit aef8b4f

32 files changed

+64
-58
lines changed

.cirrus.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,10 +295,10 @@ task:
295295
FILE_ENV: "./ci/test/00_setup_env_i686_multiprocess.sh"
296296

297297
task:
298-
name: '[no wallet, libbitcoinkernel] [bionic]'
298+
name: '[no wallet, libbitcoinkernel] [buster]'
299299
<< : *GLOBAL_TASK_TEMPLATE
300300
container:
301-
image: ubuntu:bionic
301+
image: debian:buster
302302
env:
303303
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
304304
FILE_ENV: "./ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh"

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.6.15
1+
3.7.16

ci/test/00_setup_env_i686_centos.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
99
export HOST=i686-pc-linux-gnu
1010
export CONTAINER_NAME=ci_i686_centos
1111
export CI_IMAGE_NAME_TAG=quay.io/centos/centos:stream8
12-
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python3 python3-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison"
12+
export CI_BASE_PACKAGES="gcc-c++ glibc-devel.x86_64 libstdc++-devel.x86_64 glibc-devel.i686 libstdc++-devel.i686 ccache libtool make git python38 python38-pip which patch lbzip2 xz procps-ng dash rsync coreutils bison"
1313
export PIP_PACKAGES="pyzmq"
1414
export GOAL="install"
1515
export BITCOIN_CONFIG="--enable-zmq --with-gui=qt5 --enable-reduce-exports"

ci/test/00_setup_env_native_nowallet_libbitcoinkernel.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_nowallet_libbitcoinkernel
10-
export CI_IMAGE_NAME_TAG=ubuntu:18.04 # Use bionic to have one config run the tests in python3.6, see doc/dependencies.md
11-
export PACKAGES="python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev" # Use clang-8 to test C++17 compatibility, see doc/dependencies.md
10+
export CI_IMAGE_NAME_TAG=debian:buster
11+
# Use minimum supported python3.7 and clang-8, see doc/dependencies.md
12+
export PACKAGES="-t buster-backports python3-zmq clang-8 llvm-8 libc++abi-8-dev libc++-8-dev"
13+
export APPEND_APT_SOURCES_LIST="deb http://deb.debian.org/debian buster-backports main"
1214
export DEP_OPTS="NO_WALLET=1 CC=clang-8 CXX='clang++-8 -stdlib=libc++'"
1315
export GOAL="install"
1416
export BITCOIN_CONFIG="--enable-reduce-exports CC=clang-8 CXX='clang++-8 -stdlib=libc++' --enable-experimental-util-chainstate --with-experimental-kernel-lib --enable-shared"

ci/test/00_setup_env_native_qt5.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
export LC_ALL=C.UTF-8
88

99
export CONTAINER_NAME=ci_native_qt5
10-
export CI_IMAGE_NAME_TAG=debian:buster # Check that buster gcc-8 can compile our C++17 and run our functional tests in python3, see doc/dependencies.md
10+
export CI_IMAGE_NAME_TAG=debian:buster
11+
# Use minimum supported python3.7 and gcc-8, see doc/dependencies.md
1112
export PACKAGES="gcc-8 g++-8 python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
1213
export DEP_OPTS="NO_QT=1 NO_UPNP=1 NO_NATPMP=1 DEBUG=1 ALLOW_HOST_PACKAGES=1 CC=gcc-8 CXX=g++-8"
1314
export TEST_RUNNER_EXTRA="--previous-releases --coverage --extended --exclude feature_dbcrash" # Run extended tests so that coverage does not fail, but exclude the very slow dbcrash

ci/test/04_install.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,9 @@ elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
9292
# TODO: drop this once we can use newer images in GCE
9393
CI_EXEC_ROOT add-apt-repository ppa:hadret/bpfcc
9494
fi
95+
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
96+
CI_EXEC_ROOT echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
97+
fi
9598
${CI_RETRY_EXE} CI_EXEC_ROOT apt-get update
9699
${CI_RETRY_EXE} CI_EXEC_ROOT apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$CI_BASE_PACKAGES"
97100
fi

configure.ac

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ AC_PATH_TOOL([AR], [ar])
120120
AC_PATH_TOOL([GCOV], [gcov])
121121
AC_PATH_TOOL([LLVM_COV], [llvm-cov])
122122
AC_PATH_PROG([LCOV], [lcov])
123-
dnl Python 3.6 is specified in .python-version and should be used if available, see doc/dependencies.md
124-
AC_PATH_PROGS([PYTHON], [python3.6 python3.7 python3.8 python3.9 python3.10 python3.11 python3 python])
123+
dnl Python 3.7 is specified in .python-version and should be used if available, see doc/dependencies.md
124+
AC_PATH_PROGS([PYTHON], [python3.7 python3.8 python3.9 python3.10 python3.11 python3.12 python3 python])
125125
AC_PATH_PROG([GENHTML], [genhtml])
126126
AC_PATH_PROG([GIT], [git])
127127
AC_PATH_PROG([CCACHE], [ccache])

contrib/devtools/clang-format-diff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def main():
146146
stdout=subprocess.PIPE,
147147
stderr=None,
148148
stdin=subprocess.PIPE,
149-
universal_newlines=True)
149+
text=True)
150150
stdout, stderr = p.communicate()
151151
if p.returncode != 0:
152152
sys.exit(p.returncode)

contrib/devtools/gen-manpages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
# If not otherwise specified, get top directory from git.
2424
topdir = os.getenv('TOPDIR')
2525
if not topdir:
26-
r = subprocess.run([git, 'rev-parse', '--show-toplevel'], stdout=subprocess.PIPE, check=True, universal_newlines=True)
26+
r = subprocess.run([git, 'rev-parse', '--show-toplevel'], stdout=subprocess.PIPE, check=True, text=True)
2727
topdir = r.stdout.rstrip()
2828

2929
# Get input and output directories.
@@ -36,7 +36,7 @@
3636
for relpath in BINARIES:
3737
abspath = os.path.join(builddir, relpath)
3838
try:
39-
r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, universal_newlines=True)
39+
r = subprocess.run([abspath, "--version"], stdout=subprocess.PIPE, check=True, text=True)
4040
except IOError:
4141
print(f'{abspath} not found or not an executable', file=sys.stderr)
4242
sys.exit(1)

contrib/devtools/test-security-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def call_security_check(cc, source, executable, options):
3939
env_flags += filter(None, os.environ.get(var, '').split(' '))
4040

4141
subprocess.run([*cc,source,'-o',executable] + env_flags + options, check=True)
42-
p = subprocess.run([os.path.join(os.path.dirname(__file__), 'security-check.py'), executable], stdout=subprocess.PIPE, universal_newlines=True)
42+
p = subprocess.run([os.path.join(os.path.dirname(__file__), 'security-check.py'), executable], stdout=subprocess.PIPE, text=True)
4343
return (p.returncode, p.stdout.rstrip())
4444

4545
def get_arch(cc, source, executable):

0 commit comments

Comments
 (0)