Use packaging.tags.generic_tags
As with cpython_tags and compatible_tags, we assume this function covers
our use cases in the no-argument case and will customize our arguments
for it in a few steps.
@@ -12,6 +12,7 @@ from pip._vendor.packaging.tags import (
Tag,
compatible_tags,
cpython_tags,
+ generic_tags,
interpreter_name,
interpreter_version,
mac_platforms,
@@ -320,7 +321,10 @@ def _generic_tags(
impl=None, # type: Optional[str]
abi=None, # type: Optional[str]
):
- # type: (...) -> List[Tuple[str, str, str]]
+ # type: (...) -> Union[Iterator[Tag], List[Tuple[str, str, str]]]
+ if version is None and platform is None and impl is None and abi is None:
+ return generic_tags()
+
supported = [] # type: List[Tuple[str, str, str]]
# Versions must be given with respect to the preference
