From 2dd7074e26fb11c1dcf8470e03e83faac01e4744 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Luis=20Cano=20Rodr=C3=ADguez?= Date: Tue, 30 May 2023 10:22:01 +0200 Subject: [PATCH] Note change from pkg_requirements MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/pypa/packaging/issues/644#issuecomment-1567982812 Signed-off-by: Juan Luis Cano Rodríguez --- kedro/framework/cli/micropkg.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kedro/framework/cli/micropkg.py b/kedro/framework/cli/micropkg.py index 7690f8430b..6693115306 100644 --- a/kedro/framework/cli/micropkg.py +++ b/kedro/framework/cli/micropkg.py @@ -876,6 +876,9 @@ def _append_package_reqs( requirements_txt: Path, package_reqs: list[str], package_name: str ) -> None: """Appends micro-package requirements to project level requirements.txt""" + # NOTE: packaging.requirements.Requirement equality check + # does not normalize names, and as such is not equivalent to pkg_resources.Requirement, + # see https://github.com/pypa/packaging/issues/644#issuecomment-1567982812 incoming_reqs = _safe_parse_requirements(package_reqs) if requirements_txt.is_file(): existing_reqs = _safe_parse_requirements(requirements_txt.read_text())