-
Notifications
You must be signed in to change notification settings - Fork 9
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
Clarify use of index-url vs. extra-index-url #76
Comments
Relevant thing to point to (c.f. pypa/pip#8606 (comment)) is PEP 708 – Extending the Repository API to Mitigate Dependency Confusion Attacks (currently unimplimented). |
Note that From
|
I'm curious if that's intended. I thought that their aim was to be a drop-in replacement. |
I think it is, though we could easily check (and ask).
I believe the goal is for functionality to be achieved, not for design choices to be replicated. In the limitations section of the README they note
|
Yeah, it is intentional given astral-sh/uv#2083. |
If there are issue with the order of I'm wondering if a proxy index like that would even need a permanent server or could be hosted purely on an edge cloud as it is likely stateless. |
@Carreau do you have examples of these proxy indexes? I haven't heard of this before, so it would be interesting to see how they work. |
Hum, it's theoretical, but basically you fetch multiple Think: import flask
import request
import bs4
app = flask.app(__file__)
repos = ['https://pypi.org/', 'https://nightly.com/']
@app.route('/simple/<package>')
def simple(package):
pages = [requests.get(r+'/simple/'+package) for r in repos]
bodys = [bs4.parse(p).body for p in pages]
return HEAD + concat(bodys) + FOOTER That's the legacy API – I think anaconda.org only have it – but there is a new JSON API as well, so we might need some work to figure out the details. We should only need to serve indexes, as the download come from somewhere else. |
Here is a poc using flask: https://github.com/Carreau/multi-index which does work locally. It's sync, but it should not be hard to make it async with various caching. |
See https://github.com/Carreau/cloudflare-pypi-multi-index deployed on cloudflare workers on
Should now just work and "merge" Pypi and https://pypi.anaconda.org/scientific-python-nightly-wheels/simple/, we should be able to add any other PyPI mirror or have crazy things like If it's of interest we could have that owned by the tools team, which would simplify the above (and we could have usage metrics...) |
Clarify the need(?) and use of
--index-url
and--extra-index-url
. I might have over complicated some of the instructions given a misunderstanding of priority, but there seems to be no priority and no way to enforce priority. This I think lead to some of the confusion in #41.References:
pip install
docs "Finding Packages" sectionThe text was updated successfully, but these errors were encountered: