diff options
author | fanquake <fanquake@gmail.com> | 2023-04-28 10:09:46 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2023-04-28 10:22:20 +0100 |
commit | d89aca1bdbe52406f000e3fa8dda12c46dca9bdd (patch) | |
tree | 84b320fef82276ca3c1f76e84c166608d87a5fa5 /test/functional/test_framework | |
parent | 904a98702e7372ed186e3faa81ef64f1ce49c945 (diff) | |
parent | fac395e5eb2cd3210ba6345f777a586a9bec84e3 (diff) |
Merge bitcoin/bitcoin#27483: Bump python minimum version to 3.8
fac395e5eb2cd3210ba6345f777a586a9bec84e3 ci: Bump ci/lint/Dockerfile (MarcoFalke)
fa6eb6516727a8675dc6e46634d8343e282528ab test: Use python3.8 pow() (MarcoFalke)
88881cf7ac029aea660c2413ca8e2a5136fcd41b Bump python minimum version to 3.8 (MarcoFalke)
Pull request description:
There is no pressing reason to drop support for 3.7, however there are several maintenance issues:
* There is no supported operating system that ships 3.7 by default. (debian:buster is EOL and unmaintained to the extent that it doesn't run in the CI environment. See https://github.com/bitcoin/bitcoin/pull/27340#issuecomment-1484988445)
* Compiling python 3.7 from source is also unsupported on at least macos, according to https://github.com/bitcoin/bitcoin/pull/24017#issuecomment-1107820790
* Recent versions of lief require 3.8, see https://github.com/bitcoin/bitcoin/pull/27507#issuecomment-1517561645
Fix all maintenance issues by bumping the minimum.
ACKs for top commit:
RandyMcMillan:
ACK fac395e
fjahr:
ACK fac395e5eb2cd3210ba6345f777a586a9bec84e3
fanquake:
ACK fac395e5eb2cd3210ba6345f777a586a9bec84e3
Tree-SHA512: c198decdbbe29d186d73ea3f6549d8a38479383495d14a965a2f9211ce39637b43f13a4c2a5d3bf56e2d468be4bbe49b4ee8e8e19ec69936ff43ddf2b714c712
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r-- | test/functional/test_framework/util.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/test/functional/test_framework/util.py b/test/functional/test_framework/util.py index a1b90860f6..5eeb67c00a 100644 --- a/test/functional/test_framework/util.py +++ b/test/functional/test_framework/util.py @@ -542,18 +542,7 @@ def modinv(a, n): """Compute the modular inverse of a modulo n using the extended Euclidean Algorithm. See https://en.wikipedia.org/wiki/Extended_Euclidean_algorithm#Modular_integers. """ - # TODO: Change to pow(a, -1, n) available in Python 3.8 - t1, t2 = 0, 1 - r1, r2 = n, a - while r2 != 0: - q = r1 // r2 - t1, t2 = t2, t1 - q * t2 - r1, r2 = r2, r1 - q * r2 - if r1 > 1: - return None - if t1 < 0: - t1 += n - return t1 + return pow(a, -1, n) class TestFrameworkUtil(unittest.TestCase): def test_modinv(self): |