This actually has nothing to do with pip. PyPI doesn't support the endpoint. It would work on a private index that does support the endpoint. But PyPI had to disable it due to persistent abuse.

https://stackoverflow.com/questions/66375972

https://status.python.org/incidents/grk0k7sz6zkp