From 412ad91c55842a25ea569709f6a81be7be059f11 Mon Sep 17 00:00:00 2001 From: Andrey Talman Date: Wed, 23 Oct 2024 18:09:41 -0400 Subject: [PATCH] When filtering for allowed packages allow both upper case and lower case 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; --- s3_management/manage.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/s3_management/manage.py b/s3_management/manage.py index a6adea0ea3..feea9f3867 100755 --- a/s3_management/manage.py +++ b/s3_management/manage.py @@ -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 @@ -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 (