Normalize PACKAGE_LINKS_ALLOW_LIST to the spelling lookups actually use - #8513
Merged
atalman merged 1 commit intoAug 12, 2026
Merged
Conversation
Every lookup against this set compares an underscore-spelled name. Package
names come from wheel filenames via obj_to_package_name, and
get_packages_to_copy_from_parent maps parent directory names through
.replace("-", "_") before comparing. But the set stored whatever spelling was
typed, which for most entries is hyphenated -- so "typing_extensions" was
tested against a set holding "typing-extensions" and never matched.
Effect: 77 of the 102 entries could never be copied into an arch subdirectory.
Only single-word names and the four that happened to carry an explicit
underscore twin worked. That is why whl/test/cu134/typing-extensions/ does not
exist and every cu134 smoke test on v2.14.0-rc2 fails to resolve
typing-extensions>=4.10.0 from an index that has no PyPI fallback. cuda-toolkit
was missing from cu134 for the same reason.
Normalize once at definition. The four underscore twins and the comment
explaining that workaround are now redundant, so drop them: 102 entries become
97, and the set they produce grows from 20 reachable names to 97, with no
name that previously worked dropping out.
|
@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
zxiiro
approved these changes
Aug 12, 2026
This was referenced Aug 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
whl/test/cu134/typing-extensions/does not exist, so every CUDA 13.4 smoke test onv2.14.0-rc2fails:All 8 Python versions of
manywheel-*-cuda13_4-testfail this way (run).from versions: nonerather than a version complaint, because the smoke test installs from that single index with no PyPI fallback and the package directory simply is not there.Root cause
typing-extensionsis inPACKAGE_LINKS_ALLOW_LIST, but the membership test can never succeed.Every lookup compares an underscore-spelled name:
obj_to_package_name—typing_extensions-4.16.0-...whl->typing_extensionsget_packages_to_copy_from_parentmaps parent directory names through the same conversion before comparing:But the set stored whatever spelling was typed, which for most entries is hyphenated. So
"typing_extensions" in {..., "typing-extensions", ...}isFalse, and the copy step skips it — in every subdirectory, in every channel, always.This had been hit before and worked around by listing both spellings, with a comment saying as much:
Applied to four entries, missed on the rest.
Scope
77 of the 102 entries could never be copied. Only single-word names (
filelock,sympy,networkx,fsspec, ...) and the four with an explicit underscore twin worked — which is exactly what is published today:cu134has filelock/sympy/networkx/fsspec and is missing typing-extensions.cuda-toolkitis on the broken list too, which explains the other cu134 gap reported earlier.Fix
Normalize once at definition:
The four underscore twins and the comment documenting the workaround become redundant, so they are dropped. 102 entries -> 97.
Verified by replaying the real code paths (
parent_dir.replace("-","_")andwheel_name.split("-",1)[0]) against the parsed list:Please dry-run before applying
This makes the next index run copy ~77 additional package indexes into every arch subdirectory. That is the intended behaviour and each one is already allow-listed, but it is a large one-time change to published indexes, so it is worth running the update in dry-run first and eyeballing the plan.
Does not retroactively repair existing subdirectories
get_packages_to_copy_from_parentonly copies packages "in parent but not in subdir", so a subdir is never refreshed once a package exists there. Two consequences:whl/test/cu134/typing-extensions/will be created by this, since it is absent — so this does fix the rc2 breakage on the next run.whl/test/cu126/typing-extensions/still lists 5 versions topping out at 4.15.0 while the parent has 64 up to 4.16.0. Harmless while the floor is>=4.10.0, but it is a separate latent issue and not addressed here.ruff formatandruff checkclean. No test added:s3_management/has no test harness and no CI runs pytest over it — happy to add one if you would like that set up.