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

Open
badersur opened this Issue Apr 18, 2017 · 10 comments

Comments

Projects
None yet
6 participants
@badersur

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

This comment has been minimized.

Show comment
Hide comment
@pabutcher

pabutcher commented May 12, 2017

@abalkin

This comment has been minimized.

Show comment
Hide comment
@abalkin

abalkin 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.

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

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Jul 26, 2017

Member

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.

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

This comment has been minimized.

Show comment
Hide comment
@badersur

badersur Jul 29, 2017

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

badersur commented Jul 29, 2017

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

@pfmoore

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Jul 29, 2017

Member

@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.

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

This comment has been minimized.

Show comment
Hide comment
@badersur

badersur Jul 31, 2017

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

badersur commented Jul 31, 2017

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

@warsaw

This comment has been minimized.

Show comment
Hide comment
@warsaw

warsaw Oct 4, 2018

Contributor

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.

Contributor

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

This comment has been minimized.

Show comment
Hide comment
@pfmoore

pfmoore Oct 4, 2018

Member

@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
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

This comment has been minimized.

Show comment
Hide comment
@zvezdan

zvezdan Oct 4, 2018

Contributor

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 :-)

Contributor

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

Fix instructions for download of virtualenv.
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 added a commit that referenced this issue Oct 5, 2018

Fix instructions for download of virtualenv. (#1210)
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

This comment has been minimized.

Show comment
Hide comment
@zvezdan

zvezdan Oct 5, 2018

Contributor

@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.

Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment