We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e107581 commit 4de031aCopy full SHA for 4de031a
versions.py
@@ -224,11 +224,9 @@ def get_latest_numpy_version():
224
"""
225
Retrieve the latest NumPy version
226
227
- url = "https://pypi.org/project/numpy/"
228
- req = request.Request(url, data=None, headers=HEADERS)
229
- html = request.urlopen(req).read().decode("utf-8")
230
- match = re.search(r"numpy (\d+\.\d+\.\d+)", html, re.DOTALL)
231
- return match.groups()[0]
+ url = f'https://pypi.python.org/pypi/numpy/json'
+ releases = json.loads(request.urlopen(url).read())['releases']
+ return list(releases.keys())[-1]
232
233
234
def check_python_version(row):
0 commit comments