On mardi, 7 février 2017 11.14:17 h CET Mikhail Terekhov wrote:
On 02/07/2017 08:05 AM, Thomas Bechtold wrote:
On Mon, 2017-02-06 at 10:30 -0700, Sean Marlow wrote:
On 02/06/2017 12:24 AM, Thomas Bechtold wrote:
Hi,
On Sun, 2017-02-05 at 19:33 +0100, Axel Braun wrote:
Am Sonntag, 5. Februar 2017, 13:12:18 CET schrieb Mikhail
Terekhov:
Hi,
There are at least three ways to use PyPI as a source URL for python packages:
https://pypi.python.org/pypi - a canonical (production) site
https://pypi.org - a pre production (test) version of the
Warehouse that according its documentation will _eventually_ power the canonical site.
https://pypi.io - just redirects to https://pypi.org
I noticed that pypi.io points to files.pythonhosted.org ...so this would be #4
In a declined request the python maintainers asked to point to pypi.io, without answering why any of the other options is 'invalid'.
I've also had a declined request to update the source url with pypi.io for a new Python package.
pypi.python.org is "invalid" because it has only hashed urls so you need to update the Source url whenever you update the version. See [1]. So I personally prefer pypi.io because it is short. But I'm also fine with option 2 and 4.
Best
Tom
[1] https://bitbucket.org/pypa/pypi/issues/438/backwards-compatible -un- hashed-package
The maintainer who made the url changes [1] recommends files.pythonhosted.org. It has one less redirect than pypi.io.
The Python packaging documentation [2] mentions py2pack using pypi.python.org. And it indeed generates the spec using the hashed url.
It now generates a pypi.io url [3] but a new release for py2pack is needed.
[3] https://github.com/openSUSE/py2pack/commit/fd2051d15b07bcbbdb09241c f4d02d3bfe755716
According to http://www.redirect-checker.org pypi.io is a redirect to primary domain pypi.org. IMHO one character longer name is worth one less redirect. :)
With a full url then the fun start Result https://pypi.io/packages/source/c/csvkit/csvkit-0.9.1.tar.gz 301 Redirect to Primary Domain https://pypi.org/packages/source/c/csvkit/csvkit-0.9.1.tar.gz 301 Moved Permanently https://files.pythonhosted.org/packages/source/c/csvkit/csvkit-0.9.1.tar.gz 302 Found https://pypi.python.org/packages/f6/5a/ 4843db5d3ea69c4984fbfd64859e5ae32847e9384ccc82849c27fd33720b/ csvkit-0.9.1.tar.gz 200 OK Report of the checker Problems found: You use 301 and 302 redirect at the same time. This might be confusing for search engine. Generally, please do not use 301 and 302 redirects at the same time. You use a 302 redirect. This means, that the actually content is temporary not reachable and will come back soon. To use a 302 redirection for generally moved pages is a bad idea. Search engine bot might not follow it or handle it as temporary. For SEO this is also a bad idea, because no link juice will be transferred to the linked page. Can't anyone upstream can fix their s... and avoid the packaging's blues ? :-) -- Bruno Friedmann Ioda-Net Sàrl www.ioda-net.ch Bareos Partner, openSUSE Member, fsfe fellowship GPG KEY : D5C9B751C4653227 irc: tigerfoot -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org