Skip to content

Commit 63ca335

Browse files
committed
Normalize PACKAGE_LINKS_ALLOW_LIST to the spelling lookups actually use
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.
1 parent 82783ad commit 63ca335

1 file changed

Lines changed: 4 additions & 7 deletions

File tree

s3_management/manage_v2.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,10 @@
478478
# instead of processing wheels in subdirectories
479479
# For example: whl/nightly/filelock/index.html -> whl/nightly/cu128/filelock/index.html
480480
PACKAGE_LINKS_ALLOW_LIST = {
481-
x.lower()
481+
# Normalized to the underscore spelling every lookup uses: package names are
482+
# derived from wheel filenames, and get_packages_to_copy_from_parent maps
483+
# parent directory names through the same replace() before comparing.
484+
x.lower().replace("-", "_")
482485
for x in [
483486
"filelock",
484487
"sympy",
@@ -489,17 +492,11 @@
489492
"fsspec",
490493
"typing-extensions",
491494
"spmd-types",
492-
"spmd_types",
493495
"cuda-bindings",
494-
"cuda_bindings",
495496
"cuda-toolkit",
496-
# Underscore spelling is the one that matches; see "spmd_types" above.
497497
"cuda-pathfinder",
498-
"cuda_pathfinder",
499498
"cuda-python",
500-
"cuda_python",
501499
"nvidia-ml-py",
502-
"nvidia_ml_py",
503500
"nvidia-cuda-nvrtc-cu12",
504501
"nvidia-cuda-nvrtc",
505502
"nvidia-cuda-runtime-cu12",

0 commit comments

Comments
 (0)