Skip to content

Commit cb570fd

Browse files
authored
Also purge source metadata files
1 parent a5ff970 commit cb570fd

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

run_release.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,15 +937,28 @@ def purge_the_cdn(db: ReleaseShelf) -> None:
937937
f"https://www.python.org/downloads/release/python-{str(db['release']).replace('.', '')}/",
938938
f"https://docs.python.org/release/{db['release']}/",
939939
f"https://www.python.org/ftp/python/{normalized_release}/",
940-
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tgz",
941-
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tgz.asc",
942-
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tar.xz",
943-
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tar.xz.asc",
944940
f"https://docs.python.org/release/{normalized_release}/",
945941
"https://www.python.org/downloads/",
946942
"https://www.python.org/downloads/windows/",
947943
"https://www.python.org/downloads/macos/",
948944
]
945+
# Purge the source URLs and their associated metadata files.
946+
source_urls = [
947+
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tgz",
948+
f"https://www.python.org/ftp/python/{normalized_release}/Python-{db['release']}.tar.xz",
949+
]
950+
for source_url in source_urls:
951+
urls.extend(
952+
[
953+
f"{source_url}",
954+
f"{source_url}.asc",
955+
f"{source_url}.crt",
956+
f"{source_url}.sig",
957+
f"{source_url}.sigstore",
958+
f"{source_url}.spdx.json",
959+
]
960+
)
961+
949962
for url in urls:
950963
req = urllib.request.Request(url=url, headers=headers, method="PURGE")
951964
# try:

0 commit comments

Comments
 (0)