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

Broken links in the Installation doc #1042

Closed
badersur opened this issue Apr 18, 2017 · 11 comments
Closed

Broken links in the Installation doc #1042

badersur opened this issue Apr 18, 2017 · 11 comments

Comments

@badersur
Copy link

badersur commented Apr 18, 2017

Edit on GitHub leads to: https://github.com/pypa/virtualenv/blob/bcc2a4c15bc1f839bf11107deb48f0c1cad8cf66/docs/installation.rst which doesn't exist.

Also, I tried downloading from https://pypi.python.org/packages/source/v/virtualenv/virtualenv-X.X.tar.gz via curl and Chrome where X.X set to 15.1.0 & 15.1 but it didn't work. Based on PyPI, it seems that the last version is 15.1.0 so I'm thinking the link is broken!

Strangely, when I tried 1.9 (https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.tar.gz) it download!

I suggest including a link to the latest version in the doc.

I'm trying to install pip & virtualenv for Ubuntu 17.04 which doesn't have pip pre-installed! (I'm trying to avoid installing via apt-get)

@pabutcher
Copy link

pabutcher commented May 12, 2017

Same problem here. Can the link be fixed please?

edit: this link appears to work with curl
https://pypi.python.org/simple/virtualenv-15.0.1.tar.gz

this one in chrome
https://pypi.python.org/packages/d4/0c/9840c08189e030873387a73b90ada981885010dd9aea134d6de30cd24cb8/virtualenv-15.1.0.tar.gz#md5=44e19f4134906fe2d75124427dc9b716

Found from finding file in directory at:
https://pypi.python.org/simple/

@abalkin
Copy link

abalkin commented Jul 26, 2017

Based on the recent distutils-sig discussion, it looks like the best option would be to include a JavaScript-generated download link on the installation instructions page as described at the PyPI wiki.

@pfmoore
Copy link
Member

pfmoore commented Jul 26, 2017

Better just to link to https://pypi.org/project/virtualenv/#files and direct the user to use whatever method of download they prefer to get the file from that page. I don't think we should try to describe specific commands, or link to a specific version, and I don't think using Javascript to navigate the PyPI JSON API is a reasonable solution, as the API isn't designed for that.

@badersur
Copy link
Author

@pfmoore What about the the "Edit on GitHub" links that point to 404 pages?

@pfmoore
Copy link
Member

pfmoore commented Jul 29, 2017

@badersur As far as I can see, the "Edit with Github" links don't come from anything in our doc sources, but I'm quite happy for them to be fixed, if someone can determine where they are being generated and what needs to be changed.

@badersur
Copy link
Author

I've tried to find how these links are generated but couldn't find anything :/

@warsaw
Copy link

warsaw commented Oct 4, 2018

I just landed here. We have some scripts that try to automatically download and install virtualenv based on a given version number of virtualenv that they want. This script was using pypi.python.org. I don't think there's any good way to automate this now that everything's moved to pypi.org and the links have hashes in them.

@pfmoore
Copy link
Member

pfmoore commented Oct 4, 2018

@warsaw There's always the PyPI JSON API: http://pypi.org/pypi/virtualenv/json gets you all the data about what virtualenv releases exist.

>>> r = requests.get('https://pypi.org/pypi/virtualenv/json')
>>> for file in r.json()['releases']['16.0.0']:
...     print(file['url'])
...
https://files.pythonhosted.org/packages/b6/30/96a02b2287098b23b875bc8c2f58071c35d2efe84f747b64d523721dc2b5/virtualenv-16.0.0-py2.py3-none-any.whl
https://files.pythonhosted.org/packages/33/bc/fa0b5347139cd9564f0d44ebd2b147ac97c36b2403943dbee8a25fd74012/virtualenv-16.0.0.tar.gz

@zvezdan
Copy link

zvezdan commented Oct 4, 2018

The download with curl works just fine -- with the right options ...

$ VENV_VERSION=16.0.0
$ curl -LO https://pypi.org/packages/source/v/virtualenv/virtualenv-${VENV_VERSION}.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   281  100   281    0     0    641      0 --:--:-- --:--:-- --:--:--   643
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100 1924k  100 1924k    0     0  2821k      0 --:--:-- --:--:-- --:--:-- 2821k
$ tar xzvf virtualenv-${VENV_VERSION}.tar.gz
virtualenv-16.0.0/
virtualenv-16.0.0/PKG-INFO
...
virtualenv-16.0.0/virtualenv.py

The key here is -L option that ensures that redirects are followed by curl.

I informed our internal user @warsaw :-)

zvezdan added a commit to zvezdan/virtualenv that referenced this issue Oct 4, 2018
Replaced pypi.python.org with pypi.org in the download URL.
Added `-L` option to `curl` to follow redirects from randomized hash
URLS.

Also, replaced pypi.python.org/pypi with pypi.org/project throughout the
docs.

This fix addresses the most important part of pypa#1042.
gaborbernat pushed a commit that referenced this issue Oct 5, 2018
Replaced pypi.python.org with pypi.org in the download URL.
Added `-L` option to `curl` to follow redirects from randomized hash
URLS.

Also, replaced pypi.python.org/pypi with pypi.org/project throughout the
docs.

This fix addresses the most important part of #1042.
@zvezdan
Copy link

zvezdan commented Oct 5, 2018

@pfmoore I believe that the PR above fixes this issue. I do not have any problems clicking on "Edit on GitHub" link in virtualenv docs, and the broken links and instructions are now fixed.

@stale
Copy link

stale bot commented Jan 14, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just add a comment if you want to keep it open. Thank you for your contributions.

@stale stale bot added the wontfix label Jan 14, 2019
@stale stale bot closed this as completed Jan 21, 2019
@pypa pypa locked and limited conversation to collaborators Jan 14, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants