From bf2737b3a2791dd2a2e89b8b6f1e68ece18c580a Mon Sep 17 00:00:00 2001 From: Mondo Diaz Date: Tue, 3 Feb 2026 08:23:39 -0600 Subject: [PATCH] Fix self-dependency check to use case-insensitive PyPI name normalization --- backend/app/dependencies.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/app/dependencies.py b/backend/app/dependencies.py index 43a0fd6..58a3bc1 100644 --- a/backend/app/dependencies.py +++ b/backend/app/dependencies.py @@ -773,7 +773,12 @@ def resolve_dependencies( # Resolve each dependency first (depth-first) for dep in deps: # Skip self-dependencies (can happen with PyPI extras like pytest[testing]) - if dep.dependency_project == proj_name and dep.dependency_package == pkg_name: + # Use case-insensitive comparison and normalize for PyPI naming conventions + dep_proj_normalized = dep.dependency_project.lower() + dep_pkg_normalized = re.sub(r'[-_.]+', '-', dep.dependency_package).lower() + curr_proj_normalized = proj_name.lower() + curr_pkg_normalized = re.sub(r'[-_.]+', '-', pkg_name).lower() + if dep_proj_normalized == curr_proj_normalized and dep_pkg_normalized == curr_pkg_normalized: continue resolved_dep = _resolve_dependency_to_artifact(