From 3cf7df0ea8138dfc4b33cc57f46c0dca31d07ec4 Mon Sep 17 00:00:00 2001 From: Olivier Ramonat Date: Thu, 4 Apr 2024 14:04:28 +0200 Subject: [PATCH 1/2] Fix typo --- src/e3/python/pypi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/e3/python/pypi.py b/src/e3/python/pypi.py index cb423f94..04cbd156 100644 --- a/src/e3/python/pypi.py +++ b/src/e3/python/pypi.py @@ -182,7 +182,7 @@ def __init__( *, data: dict["str", Any], ) -> None: - """Initialize a pakage metadata object. + """Initialize a package metadata object. :param pypi: a PyPIClosure session :param data: the data as fetched on pypi From cbd7d660853bbc9b94a3081065d872d24d5a4100 Mon Sep 17 00:00:00 2001 From: Olivier Ramonat Date: Thu, 4 Apr 2024 14:04:42 +0200 Subject: [PATCH 2/2] Silence "cannot parse version" warning by default This message occurs way too often when running e3-pypi-closure because of bad version in old software. --- src/e3/python/pypi.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/e3/python/pypi.py b/src/e3/python/pypi.py index 04cbd156..13cfe17c 100644 --- a/src/e3/python/pypi.py +++ b/src/e3/python/pypi.py @@ -203,7 +203,10 @@ def __init__( ): self.versions.append(v) except Exception: - logger.warning(f"Cannot parse version {version} of {self.name}") + # Many packages uploaded before pip 1.4 had versions that are + # rejected by packaging.version. Do not warn but just log + # the error. + logger.debug(f"Cannot parse version {version} of {self.name}") logger.debug(f"Load package {self.name}") def __eq__(self, other: Any) -> bool: