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

How agressively should we hunt source of pypi.io -> pypi.org 301 and pypi.org -> files.pythonhosted.org 301 redirect. #176

Open
Carreau opened this issue Oct 28, 2024 · 2 comments
Labels

Comments

@Carreau
Copy link

Carreau commented Oct 28, 2024

I recently realized that many of the conda-forge recipe point to pypi.io, and that

https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/{{ name }}-{{ version }}.{{ ext}}
  1. Redirect to https://pypi.org/... which itself
  2. Redirect to https://files.pythonhosted.org/...

2 questions:

  • How much should we work on not having links to pypi.io ? That is to say how aggressively should we update recipes to point to pypi.org, or emit errors/warning message.
  • same for pypi.org, if we can directly update code to reach for https://files.pythonhosted.org/... url, how aggressively should we try to do it.
@miketheman
Copy link
Member

Hi @Carreau ! I took a look today, and found that 3xx redirects for pypi.org-service is larger than the 2xx responses - almost by 40% - that happen at the edge provider (Fastly).

Since this is handled at the edge and the traffic rarely gets all the way to the backend, it hasn't been super bothersome to manage, rather the experience is seen by clients having to perform yet another DNS lookup, TLS exchange, etc etc.

The guidance surfaced in https://docs.pypi.org/api/#predictable-urls is probably what you want, and if you're already constructing URLs, there's no reason you'd need to also ask pypi.org for that to get a redirect to files.pythonhosted.org

@Carreau
Copy link
Author

Carreau commented Dec 21, 2024

Thanks; I was also in particular thinking that at some point in the future you may want to retire pypi.io, but is there are that amny redirect; we are far from it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants