diff --git a/stdlib/VERSIONS b/stdlib/VERSIONS index a8526aab9422..d2db958fb6d8 100644 --- a/stdlib/VERSIONS +++ b/stdlib/VERSIONS @@ -65,9 +65,9 @@ array: 3.0- ast: 3.0- asynchat: 3.0-3.11 asyncio: 3.4- -asyncio.mixins: 3.10- asyncio.exceptions: 3.8- asyncio.format_helpers: 3.7- +asyncio.mixins: 3.10- asyncio.runners: 3.7- asyncio.staggered: 3.8- asyncio.taskgroups: 3.11- diff --git a/tests/check_typeshed_structure.py b/tests/check_typeshed_structure.py index 74d1c3980f7f..8e56bcc21136 100755 --- a/tests/check_typeshed_structure.py +++ b/tests/check_typeshed_structure.py @@ -127,7 +127,7 @@ def check_no_symlinks() -> None: def check_versions_file() -> None: """Check that the stdlib/VERSIONS file has the correct format.""" - versions = set[str]() + versions = list[str]() with open("stdlib/VERSIONS", encoding="UTF-8") as f: data = f.read().splitlines() for line in data: @@ -139,12 +139,18 @@ def check_versions_file() -> None: raise AssertionError(f"Bad line in VERSIONS: {line}") module = m.group(1) assert module not in versions, f"Duplicate module {module} in VERSIONS" - versions.add(module) + versions.append(module) + + deduped_versions = set(versions) + assert len(versions) == len(deduped_versions) + sorted_versions = sorted(versions) + assert versions == sorted_versions, f"{versions=}\n\n{sorted_versions=}" + modules = _find_stdlib_modules() # Sub-modules don't need to be listed in VERSIONS. - extra = {m.split(".")[0] for m in modules} - versions + extra = {m.split(".")[0] for m in modules} - deduped_versions assert not extra, f"Modules not in versions: {extra}" - extra = versions - modules + extra = deduped_versions - modules assert not extra, f"Versions not in modules: {extra}"