Can apache generate an HTML 5 index?

For years I’ve been using apache to generate index pages for a local wheel repository. With pip 22.2, this will become a problem since the generated index isn’t a proper HTML 5 document.

Does anyone know a way of causing apache to generate a valid HTML 5 index? I’ve tried a variety of parameters to mod_autoindex, but no luck.

I know about devpi, but I’m not allowed to install any software on the server, although I can configure stock apache any way I’d like.

Do you need an index, or would using --find-links be acceptable? --find-links can get links from a page and is much more forgiving about the markup needed.

Good question! I’ve never really understood the difference. I’ll try —find-links and see. Thanks for the suggestion.

You might need to restructure your repository, as --find-links looks at a single page with all the wheels on it, rather than a page of links to project pages, with each project page having the links to the files.

Typically --find-links is better for handling a wheel repository precisely because it’s just a simple 1-level directory listing.

It turns out I’m already using find-links and no-index = true in pip.conf, and pip is giving me the HTML 5 warning about the find-links URL.

Ah, that’s --find-links should not warn about missing HTML5 doctype · Issue #10903 · pypa/pip · GitHub which was fixed in

Are you using the latest version of pip? It was fixed in 22.0.4 - see here

I’m using 22.0.2. I’ll look into upgrading. Thanks for your help!

Although I guess since it’s currently just a warning, I can continue to ignore it, and upgrading won’t break anything.

But I admit testing a newer pip would be good all around.

1 Like

Also, in the meantime, you can actually make Apache mod_autoindex
return content which that version of pip will handle (as I noted in
my comment on that issue):

Thanks, @fungi. I’ll check it out.