I would have wished to see some active involvement on the upstream pip ticket and maybe even a PR to address the problem. IMHO, spending time on CI workarounds may not prove the best approach, especially for issues like this.
I would invite others to become more involved with upstream project that affect us, especially those working on older platforms (hint centos7 and python 3.6).
As pip maintainers mentioned, they time does not worth working around python 3.6 bugs, especially as it is like two months away for EOL. Still, they expressed willingness to review PRs from others!!!
IMHO add the extra environment variables to all systems and containers is likely to be 10x more time consuming than fixing the problem upstream.
Cheers
Sorin
--