fix URL in get_pypi_info()

The JSON API path is wrong.

See https://warehouse.pypa.io/api-reference/json/

Change-Id: I1574e568e6c3eeddc3619591b6335c314bf92c39
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
Doug Hellmann 2019-03-07 18:31:53 -05:00
parent 8f594b7089
commit b952446ba2

View File

@ -106,7 +106,7 @@ def get_pypi_info(dist_name):
"Return PyPI information for the distribution."
canonical_name = packaging_utils.canonicalize_name(dist_name)
LOG.debug('looking at PyPI for {!r}'.format(canonical_name))
url = 'https://pypi.org/project/{}/json'.format(canonical_name)
url = 'https://pypi.org/pypi/{}/json'.format(canonical_name)
LOG.debug(url)
try:
return requests.get(url).json()