Substituting file links with VCS links in the Simple Repository API

Thank you for all your responses.

After reading the PEP 503 and some of pip’s source code, my impression is that it’s not by design that it works.

@sinoroc

I am surprised this works. Have you tried other installers besides pip?

It doesn’t work with uv. uv does not support the #egg fragment in the URL and removing it from the URL basically removes the package name and version information (which now both pip and uv cannot find).

It’s certainly useful for us at my organization. We use it with an internal self-hosted Gitlab instance to serve our packages via a package index. I’ve begun to use Gitlab’s package registry feature to serve wheels and do it the proper way.

I’m hesitant to formally propose it as I don’t know just how many people would actually find it useful.

If deployed on the web, such VCS links could, I suppose, prove to be a security risk. I don’t know if such links could end up on pypi or not.

I’ve found a few github issues/discussions that are somewhat related, although none of them talk about installing packages via a package index. They just consider installation of package by explicitly passing the URL to pip.