fix(pip): preserve PEP 508 URL-based requirements when extract_url_srcs=False by jsharpe · Pull Request #3582 · bazel-contrib/rules_python
…cs=False pip_parse (via pip_repository) passes extract_url_srcs=False to parse_requirements. The _package_srcs() function silently dropped PEP 508 URL-based requirements (pkg @ https://...) in this mode because _add_dists() returns can_fallback=False for URL requirements, causing them to fall through to the `continue` statement. Fix the elif condition to also accept the case where extract_url_srcs is False but a valid URL dist exists, falling back to pip to handle the URL requirement directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rickeylev pushed a commit to rickeylev/rules_python that referenced this pull request
Feb 23, 2026…cs=False (bazel-contrib#3582) pip_parse (via pip_repository) passes extract_url_srcs=False to parse_requirements. The _package_srcs() function silently dropped PEP 508 URL-based requirements (pkg @ https://...) in this mode because _add_dists() returns can_fallback=False for URL requirements, causing them to fall through to the `continue` statement. Fix the elif condition to also accept the case where extract_url_srcs is False but a valid URL dist exists, falling back to pip to handle the URL requirement directly. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> (cherry picked from commit 9dcbabb)
aignas pushed a commit to aignas/rules_python that referenced this pull request
Feb 23, 2026…cs=False (bazel-contrib#3582) pip_parse (via pip_repository) passes extract_url_srcs=False to parse_requirements. The _package_srcs() function silently dropped PEP 508 URL-based requirements (pkg @ https://...) in this mode because _add_dists() returns can_fallback=False for URL requirements, causing them to fall through to the `continue` statement. Fix the elif condition to also accept the case where extract_url_srcs is False but a valid URL dist exists, falling back to pip to handle the URL requirement directly. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters