The issue seems to stem from this piece of code.
def expand_python_version(version):
if not re.match(r"^\d\.\d$", version):
return [version]
The above regular expression assumes the minor version number can have only a single digit. Therefore the result will be incorrect for Python versions >= 3.10.
We probably want to change it to
if not re.match(r"^\d\.\d*\d$", version)