mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
Merge bitcoin/bitcoin#28211: Bump python minimum supported version to 3.9
fa25e8b0a1doc: Recommend lint image build on every call (MarcoFalke)faf70c1f33Bump python minimum version to 3.9 (MarcoFalke)fa8996b930ci: Bump i686_multiprocess.sh to latest Ubuntu LTS (MarcoFalke) Pull request description: All supported operating systems ship with python 3.9 (or later), so bumping the minimum should not cause any issues. A bump will allow new code to use new python 3.9 features. For reference: * https://packages.debian.org/bullseye/python3 * https://packages.ubuntu.com/focal/python3.9 * FreeBSD 12/13 also ships with 3.9 * CentOS-like 8/9 also ships with 3.9 (and 3.11) * OpenSuse Leap also ships with 3.9 (and 3.11) https://software.opensuse.org/package/python311-base This is for Bitcoin Core 27.0 in 2024 (next year), not the soon upcoming 26.0 next month. ACKs for top commit: Sjors: ACKfa25e8b0a1jamesob: ACKfa25e8b0a1([`jamesob/ackr/28211.1.MarcoFalke.bump_python_minimum_supp`](https://github.com/jamesob/bitcoin/tree/ackr/28211.1.MarcoFalke.bump_python_minimum_supp)) Tree-SHA512: 86c9f6ac4b5ba94a62ee6a6062dd48a8295d8611a39cdb5829f4f0dbc77aaa1a51edccc7a99275bf699143ad3a6fe826de426d413e5a465e3b0e82b86d10c32e
This commit is contained in:
@@ -287,10 +287,10 @@ def sha256sum_file(filename):
|
||||
return h.digest()
|
||||
|
||||
|
||||
# TODO: Remove and use random.randbytes(n) instead, available in Python 3.9
|
||||
# TODO: Remove and use random.randbytes(n) directly
|
||||
def random_bytes(n):
|
||||
"""Return a random bytes object of length n."""
|
||||
return bytes(random.getrandbits(8) for i in range(n))
|
||||
return random.randbytes(n)
|
||||
|
||||
|
||||
# RPC/P2P connection constants and functions
|
||||
|
||||
@@ -7,13 +7,11 @@ To run linters locally with the same versions as the CI environment, use the inc
|
||||
Dockerfile:
|
||||
|
||||
```sh
|
||||
DOCKER_BUILDKIT=1 docker build -t bitcoin-linter --file "./ci/lint_imagefile" ./
|
||||
|
||||
docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
|
||||
DOCKER_BUILDKIT=1 docker build -t bitcoin-linter --file "./ci/lint_imagefile" ./ && docker run --rm -v $(pwd):/bitcoin -it bitcoin-linter
|
||||
```
|
||||
|
||||
After building the container once, you can simply run the last command any time you
|
||||
want to lint.
|
||||
Building the container can be done every time, because it is fast when the
|
||||
result is cached and it prevents issues when the image changes.
|
||||
|
||||
|
||||
check-doc.py
|
||||
|
||||
Reference in New Issue
Block a user