Skip to content

Commit

Permalink
When filtering for allowed packages allow both upper case and lower c…
Browse files Browse the repository at this point in the history
…ase packages (#5808)

Latest pillow releases have changed from 'Pillow'->'pillow'
Please refer: https://pypi.org/project/pillow/11.0.0/#files vs
https://pypi.org/project/pillow/10.0.0/#files
hence we should allow both conventions for now.

In Prod for example: https://download.pytorch.org/whl/pillow/ 

As per: https://peps.python.org/pep-0566/ :
All transformed keys should be reduced to lower case. Hyphens should be
replaced with underscores, but otherwise should retain all other
characters;
  • Loading branch information
atalman authored Oct 23, 2024
1 parent cda8858 commit 412ad91
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion s3_management/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@
"wheel"
}

PACKAGE_ALLOW_LIST=[x.lower() for x in PACKAGE_ALLOW_LIST]

# Should match torch-2.0.0.dev20221221+cu118-cp310-cp310-linux_x86_64.whl as:
# Group 1: torch-2.0.0.dev
# Group 2: 20221221
Expand Down Expand Up @@ -278,7 +280,7 @@ def nightly_packages_to_show(self: S3IndexType) -> List[S3Object]:
package_name = full_package_name.split('-')[0]
package_build_time = extract_package_build_time(full_package_name)
# Hard pass on packages that are included in our allow list
if package_name not in PACKAGE_ALLOW_LIST:
if package_name.lower() not in PACKAGE_ALLOW_LIST:
to_hide.add(obj)
continue
if package_build_time not in KEEP_NIGHTLY_PACKAGES_FOR_EXECUTORCH and (
Expand Down

0 comments on commit 412ad91

Please sign in to comment.