From 96b9764ddc89894e0cff2d4e634b93e4cbbcf958 Mon Sep 17 00:00:00 2001 From: Mark Elliot <123787712+mark-thm@users.noreply.github.com> Date: Wed, 26 Jun 2024 16:17:38 -0400 Subject: [PATCH 1/2] Fix broken logger statement in parse_requirements.bzl --- python/private/pypi/parse_requirements.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/private/pypi/parse_requirements.bzl b/python/private/pypi/parse_requirements.bzl index 22a6f0a875..f99329a995 100644 --- a/python/private/pypi/parse_requirements.bzl +++ b/python/private/pypi/parse_requirements.bzl @@ -449,7 +449,7 @@ def _add_dists(requirement, index_urls, python_version, logger = None): continue if logger: - logger.warn("Could not find a whl or an sdist with sha256={}".format(sha256)) + logger.warn(lambda: "Could not find a whl or an sdist with sha256={}".format(sha256)) yanked = {} for dist in whls + [sdist]: From c78743741d807fffb16bd47156350fd6c6f25062 Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Wed, 26 Jun 2024 14:48:07 -0700 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cbf2f91ce..9dc5ec4bca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ A brief description of the categories of changes: platform specific wheel and use `experimental_target_platforms`. Fixes [#1996](https://github.com/bazelbuild/rules_python/issues/1996). * (rules) The first element of the default outputs is now the executable again. +* (pip) Fixed crash when pypi packages lacked a sha (e.g. yanked packages) ### Removed * (pip): Removes the `entrypoint` macro that was replaced by `py_console_script_binary` in 0.26.0.