polite-garden-50641
07/11/2022, 6:17 PM_build_session
method https://github.com/pantsbuild/pex/blob/main/pex/vendor/_vendored/pip/pip/_internal/cli/req_command.py#L85
i.e. call the original method and then modify the returned PipSession by modifying PipSession.headers['User-Agent']
see: https://github.com/pantsbuild/pex/blob/887607e1ca461001519214eba7fb7f8f3cc31978/pex/vendor/_vendored/pip/pip/_internal/network/session.py#L248enough-analyst-54434
07/11/2022, 6:28 PMenough-analyst-54434
07/11/2022, 6:31 PMgit apply
with a patch file.polite-garden-50641
07/11/2022, 6:56 PMenough-analyst-54434
07/11/2022, 7:11 PMgit apply patch
is simpler anyhow and minds could be changed later if you agree.