Skip to content
GitLab
Next
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • GitLab GitLab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 44,767
    • Issues 44,767
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1,330
    • Merge requests 1,330
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • GitLab.orgGitLab.org
  • GitLabGitLab
  • Issues
  • #327595
Closed
Open
Issue created Apr 13, 2021 by hoefling@hoefling

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.

Assignee
Assign to
Time tracking