Skip to content

Commit 65d6503

Browse files
author
Jussi Kukkonen
committed
verify_release: Be explicit about PyPI version
We are interested in what pip thinks is the current tuf version: make that explicit in method naming and comments. Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
1 parent 53bacdf commit 65d6503

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

verify_release

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ def get_github_version() -> str:
5454
return releases["tag_name"][1:]
5555

5656

57-
def get_pypi_version() -> str:
58-
"""Return latest version string available on PyPI"""
59-
# pip is sad: it can't even tell what the newest available version is...
60-
# FIXME: Maybe think of something better than downloading latest tarball here?
57+
def get_pypi_pip_version() -> str:
58+
"""Return latest version string available on PyPI according to pip"""
59+
# pip can't tell us what the newest available version is... So we download
60+
# newest tarball and figure out the version from the filename
6161
with TemporaryDirectory() as pypi_dir:
6262
cmd = ["pip", "download", "--no-deps", "--dest", pypi_dir]
6363
source_download = cmd + ["--no-binary", ":all:", PYPI_PROJECT]
@@ -133,7 +133,7 @@ def main() -> int:
133133
finished(f"WARNING: GitHub latest version is {github_version}")
134134

135135
progress("Checking PyPI latest version")
136-
pypi_version = get_pypi_version()
136+
pypi_version = get_pypi_pip_version()
137137
if pypi_version != build_version:
138138
finished(f"WARNING: PyPI latest version is {pypi_version}")
139139

0 commit comments

Comments
 (0)