Simple index of the PyPI package registry is not compliant with PEP 503
Problem to solve
PEP 503 states that
A repository that implements the simple API is defined by its base URL, this is the top level URL that all additional URLs are below. The API is named the "simple" repository due to the fact that PyPI's base URL is
https://pypi.org/simple/
.[...]
Within a repository, the root URL (
/
for this PEP which represents the base URL) MUST be a valid HTML5 page with a single anchor element per project in the repository. The text of the anchor tag MUST be the name of the project and the href attribute MUST link to the URL for that particular project. As an example:<!DOCTYPE html> <html> <body> <a href="/frob/">frob</a> <a href="/spamspamspam/">spamspamspam</a> </body> </html>
The root URL of a PyPI package registry on Gitlab shows
$ curl https://__token__:<token>@gitlab.netqa.de/api/v4/projects/127/packages/pypi/simple
{"error":"404 Not Found"}
instead.
Proposal
Render the simple index page when accessing packages/pypi/simple
. I guess an endpoint should be added to lib/api/pypi_packages.rb
, from brief looking at the code, not a Ruby expert though.