Skip to content

Commit 1a15957

Browse files
committed
less strict
1 parent a9df0b0 commit 1a15957

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

validate.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from collections.abc import Mapping
1212
from typing import NamedTuple
1313

14+
import packaging.tags
1415
from packaging.tags import Tag
1516
from packaging.utils import parse_wheel_filename
1617
from packaging.version import Version
@@ -53,8 +54,11 @@ def _pythons_to_check(tags: frozenset[Tag]) -> tuple[str, ...]:
5354
ret.add(_py_exe(*_parse_cp_tag(tag.interpreter)))
5455
elif tag.interpreter == "py2":
5556
continue
56-
elif tag.interpreter == "py3":
57-
ret.update(_py_exe(*py) for py in PYTHONS)
57+
elif tag.interpreter.startswith("py3"):
58+
for py in PYTHONS:
59+
if tag not in packaging.tags.compatible_tags(py):
60+
raise AssertionError(f"{tag} is not compatible with python {py}")
61+
ret.update(_py_exe(*py) for py in PYTHONS)
5862
else:
5963
raise AssertionError(f"unexpected tag: {tag}")
6064

0 commit comments

Comments
 (0)