pex
pex copied to clipboard
pex 2.1.10 warns when multiple index URLs are configured
The combination of the default Max-Age cache header: https://github.com/pantsbuild/pex/blob/451977efdf987dd299a1b4798ac2ee298cd6d61b/pex/pip.py#L146-L149
and the pip header patch's refusal to set a header if multiple URLs are in use (?): https://github.com/pantsbuild/pex/blob/451977efdf987dd299a1b4798ac2ee298cd6d61b/pex/vendor/_vendored/pip/pip/_internal/cli/req_command.py#L83-L90
... every run with multiple index URLs configured triggers a warning about the header.
Seeing this too.
@jsirois fyi
That's an issue triggered when using multiple index URLs.
It seems that pex
is using a patched version of pip
, which cherry pick the commit from https://github.com/pypa/pip/pull/8078.
It's a PR not yet merged into pip
master and it prevents us from setting headers for multiple URLs (also send out this warning).
I'm a bit confused by setting Cache-Control:max-age=3600
, what would be the benefit from it?
If we do need this, how could we get rid of this warning and set the headers for multiple URLs? I think multiple URLs might be a common use case.
It also appears to warn if only one index URL is set.
This was obsoleted by #1133 which upgraded Pex's vendored Pip and lost support for setting custom headers at all.