Bump python minimum version to 3.9

This commit is contained in:
MarcoFalke committed 2023-08-29 11:54:29 +02:00
1 parent fa8996b930
commit faf70c1f33
6 files changed
+12 -12

No files matched your search

+2 -2
View File
@@ -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