Skip to content

Commit

Permalink
Silence "cannot parse version" warning by default
Browse files Browse the repository at this point in the history
This message occurs way too often when running e3-pypi-closure
because of bad version in old software.
  • Loading branch information
enzbang committed Apr 4, 2024
1 parent 3cf7df0 commit cbd7d66
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/e3/python/pypi.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cbd7d66

Please sign in to comment.