Commit 00c6633
committed
pip: Fix regression in downloader authentication logic
Commit b3a6c05 added support for bearer token auth support by
forcing header based authentication across the code base (primarily for
the generic backend). This broke the current proxy logic in the pip
backend because it tried to build a per-URL header for each artifact
too soon, i.e. it dereferenced the .url attribute of PipRequirement
objects of `kind == "pypi"` which explicitly raises an exception for
anything other than `kind == "url"` or `kind == "vcs"`.
The URLs for `kind == "pypi"` are only available after resolution, i.e.
once we fetch all distribution package infos from the index.
This fix moves the auth headers construction one level deeper to the
actual downloader which loops over dpis where these URLs are actually
available.
Fixes: b3a6c05
Assisted-by: Claude
Signed-off-by: Erik Skultety <eskultet@redhat.com>1 parent b791600 commit 00c6633
1 file changed
Lines changed: 6 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
248 | | - | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
252 | 255 | | |
253 | 256 | | |
254 | 257 | | |
| |||
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | 421 | | |
423 | 422 | | |
424 | 423 | | |
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
428 | | - | |
| 427 | + | |
429 | 428 | | |
430 | 429 | | |
431 | 430 | | |
| |||
0 commit comments