Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 503: Specify index content format #1126

Closed
chrahunt opened this issue Jul 20, 2019 · 3 comments
Closed

PEP 503: Specify index content format #1126

chrahunt opened this issue Jul 20, 2019 · 3 comments
Assignees

Comments

@chrahunt
Copy link
Contributor

Currently PEP 503 states

Within a repository, the root URL (/) MUST be a valid HTML5 page with a
single anchor element per project in the repository.

"HTML5 page" is used in a few other places to refer to the expected return value of the PEP 503 repository.

HTML5 specifies two syntaxes/document formats: HTML and XML. Currently pip only supports HTML documents.

I would propose the following:

  1. Add a note to PEP 503 to the effect of:

    Below, "HTML page" can be taken to mean an HTML document confirming to [[HTML5]].

    and then replace each instance of "HTML5 page" with "HTML page".

  2. Add a constraint to the existing list

    When served via HTTP, repositories SHOULD include a Content-Type header with a media-type value of text/html when returning an HTML page. Clients MAY choose to parse an HTTP response body as an HTML page in the absence of a Content-Type header.

References

  1. Fails with PEP 503-compliant XML-serialised HTML5 ("XHTML5") directory indices pypa/pip#6697
  2. https://html.spec.whatwg.org/multipage/introduction.html#html-vs-xhtml
@brettcannon
Copy link
Member

@dstufft

@KloolK
Copy link

KloolK commented Aug 19, 2020

I'm trying to use the auto-indexed web version of an SVN repository as a repository for pip. Unfortunately, the pages are served with Content-Type: text/xml and therefore pip currently skips the repository. I thought I'd add this here as a real-world example why this could be useful.

@hugovk
Copy link
Member

hugovk commented Oct 12, 2023

We try to avoid discussing the content of PEPs themselves in this repo, as there's not many people following here.

Instead, use the place listed under the Pep's "Discussions-To" header.

In this case, it's the now-archived Distutils-SIG list, so please post to the Packaging category at https://discuss.python.org/c/packaging/14

@hugovk hugovk closed this as not planned Won't fix, can't repro, duplicate, stale Oct 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants