all: Remove Python 2.7 support.

Python 2.7 has been EOL since January 2020.

Ubuntu oldoldlts (Focal Fossa, 20.04) has Python 3.8.  Debian oldoldstable
(Buster, from 2019) has Python 3.7.  RHEL 8 (from 2019) has Python 3.6.

It's easier than ever to install a modern Python using uv.

Given this, it seems like a fine idea to drop Python 2.7 support.

Even though the build is not tested on Python as old as 3.3, I left
comments stating that "3.3+" is the baseline Python version.  However, it
might make sense to bump this to e.g., 3.10, the oldest Python 3 version
used during CI. Or, using uv or another method actually test on the oldest
Python interpreter that is desirable to support (uv goes back to Python 3.7
easily; in October 2025, the oldest supported Python interpreter version
will be 3.10)

Signed-off-by: Jeff Epler <jepler@gmail.com>
This commit is contained in:
Jeff Epler
2025-08-08 10:09:13 -05:00
committed by Damien George
parent d441788975
commit f0c6f16b9e
12 changed files with 35 additions and 97 deletions

View File

@@ -105,7 +105,7 @@ def compute_pll2(hse, sys, relax_pll48):
# VCO_OUT must be between 192MHz and 432MHz
if sys * P not in mcu.range_vco_out:
continue
NbyM = float(sys * P) / hse # float for Python 2
NbyM = sys * P / hse
# scan M
M_min = mcu.range_n[0] // int(round(NbyM)) # starting value
while mcu.range_vco_in[-1] * M_min < hse:
@@ -121,7 +121,7 @@ def compute_pll2(hse, sys, relax_pll48):
# N is restricted
if N not in mcu.range_n:
continue
Q = float(sys * P) / 48 # float for Python 2
Q = sys * P / 48
# Q must be an integer in a set range
if close_int(Q) and round(Q) in mcu.range_q:
# found valid values
@@ -142,7 +142,6 @@ def compute_pll2(hse, sys, relax_pll48):
def compute_derived(hse, pll):
hse = float(hse) # float for Python 2
M, N, P, Q = pll
vco_in = hse / M
vco_out = hse * N / M