Update release verification script for now PyPi API (#31007)

pull/31010/head
Richard Belleville 2 years ago committed by GitHub
parent 4e7f0e1eac
commit ead11434c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      tools/release/verify_python_release.py

@ -71,9 +71,11 @@ def _get_remote_artifacts_for_package(package, version):
experience, it has taken a minute on average to be fresh.
"""
artifacts = set()
payload = requests.get("https://pypi.org/pypi/{}/{}/json".format(
package, version)).json()
for download_info in payload['releases'][version]:
payload_resp = requests.get("https://pypi.org/pypi/{}/{}/json".format(
package, version))
payload_resp.raise_for_status()
payload = payload_resp.json()
for download_info in payload['urls']:
artifacts.add(
Artifact(download_info['filename'], download_info['md5_digest']))
return artifacts

Loading…
Cancel
Save