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

Allow projects to store pre-releases on external file hosts #7439

Closed
leezu opened this issue Dec 5, 2019 · 4 comments
Closed

Allow projects to store pre-releases on external file hosts #7439

leezu opened this issue Dec 5, 2019 · 4 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@leezu
Copy link

leezu commented Dec 5, 2019

What's the problem this feature will solve?
https://pypi.org/stats/ shows that a small number of projects creates large storage and data transfer costs by uploading daily nightly releases to Pypi servers. If projects want to avoid imposing those costs, they need to ask users to specify the -f option to pip to select an external file host. This is inconvenient for users, thus projects may not be inclined to use this option.

Describe the solution you'd like
To avoid straining Pypi's ressources, such projects can host the nightly releases themselves. Currently users then need to install via pip install --pre X -f example.org/nightly.html.
Let projects specify example.org/nightly.html somewhere in Pypi, so that pip install --pre X will automatically use -f example.org/nightly.html as a source.

Alternative Solutions
Ask users to specify the -f option.

Additional context
This would simplify pypi/support#50 (comment)

@triage-new-issues triage-new-issues bot added the S: needs triage Issues/PRs that need to be triaged label Dec 5, 2019
@uranusjr
Copy link
Member

uranusjr commented Dec 5, 2019

This is probably more suited for the Warehouse issue tracker (the current PyPI implementation) than pip. pip by default does not discover file URLs, but simply asks the index server for them (which is PyPI by default). So this kind of information needs to be relayed by PyPI to pip.

PyPI actually used to allow external storage (both for pre-release and stable), but eventually dropped that feature entirely. I’m not sure about the reason behind it, but with this in mind, it’s probably better to start a discussion on a mailing list or forum before submitting a straight-up feature request. Some places to start:

@RonnyPfannschmidt
Copy link
Contributor

also extra note - this was dropped for multiple reasons,

  • security
  • having control on the pypi side
  • no longer having packages go away by taken down server

i would strongly suggest using a own index + extra_index_urls, or setting up a public devpi thats set up to crosslink pypi annd putting dev versions there

@xavfernandez
Copy link
Member

Cf PEP-0470 for motivations.

@pradyunsg
Copy link
Member

pradyunsg commented Dec 5, 2019

(I'm travelling, apologies for the terseness/typos)

If you want to request PyPI to allow for such links, do take note that PyPI removed this functionality as documented in PEP 470 linked above.

If you want to request for pip to add any other sources "out of the box", that's a no-go -- at minimum you'd need concensus to do that from discuss.python.org (Packaging category) and I don't think that'd be very easy to get.

None the less, given that pip isn't the only project affected by the requested change and there's an accepted PEP that has the exact opposite position, I am going to close this issue.


I suggest that you mention that the aim here is to move mxnet pre-releases off of PyPI so that the size of storing them on PyPI is less, which in turn would allow increasing your upload limits.

A good way IMO would be host your own index that has only the mxnet projects (with nighties/pre-releases) on that package index. This can be a bunch of static files somewhere linking to the S3 buckets y'all have. (PyPI doesn't have external links, doesn't mean other indexes can't have them). Only "stable" releases would make it to PyPI then.

This way, users who want to use the stable releases can get them from PyPI and users who want the pre-releases can add/pass "extra-index-urls" to pip's configuration or CLI, to be able to install those pre-releases.

If you want to have further discussion on this, please start a topic on discuss.python.org.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jan 4, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 4, 2020
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Jan 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

5 participants