Commit 36e59d5
fix(pip): preserve PEP 508 URL-based requirements when extract_url_srcs=False (#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)1 parent ca69bd8 commit 36e59d5
File tree
3 files changed
+45
-1
lines changed- python/private/pypi
- tests/pypi/parse_requirements
3 files changed
+45
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
60 | 63 | | |
61 | 64 | | |
62 | 65 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
263 | | - | |
| 263 | + | |
264 | 264 | | |
265 | 265 | | |
266 | 266 | | |
| |||
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
195 | 236 | | |
196 | 237 | | |
197 | 238 | | |
| |||
0 commit comments