mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-139198: Remove Tools/scripts/checkpip.py script (GH-139199)
Commit
This commit is contained in:
parent
c45e6e1bb3
commit
622d97b8bb
3 changed files with 1 additions and 34 deletions
|
|
@ -0,0 +1 @@
|
|||
Remove ``Tools/scripts/checkpip.py`` script.
|
||||
|
|
@ -1,8 +1,6 @@
|
|||
This directory contains a collection of executable Python scripts that are
|
||||
useful while building, extending or managing Python.
|
||||
|
||||
checkpip.py Checks the version of the projects bundled in ensurepip
|
||||
are the latest available
|
||||
combinerefs.py A helper for analyzing PYTHONDUMPREFS output
|
||||
divmod_threshold.py Determine threshold for switching from longobject.c
|
||||
divmod to _pylong.int_divmod()
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
"""
|
||||
Checks that the version of the projects bundled in ensurepip are the latest
|
||||
versions available.
|
||||
"""
|
||||
import ensurepip
|
||||
import json
|
||||
import urllib.request
|
||||
import sys
|
||||
|
||||
|
||||
def main():
|
||||
outofdate = False
|
||||
|
||||
for project, version in ensurepip._PROJECTS:
|
||||
data = json.loads(urllib.request.urlopen(
|
||||
"https://pypi.org/pypi/{}/json".format(project),
|
||||
cadefault=True,
|
||||
).read().decode("utf8"))
|
||||
upstream_version = data["info"]["version"]
|
||||
|
||||
if version != upstream_version:
|
||||
outofdate = True
|
||||
print("The latest version of {} on PyPI is {}, but ensurepip "
|
||||
"has {}".format(project, upstream_version, version))
|
||||
|
||||
if outofdate:
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue