Adding "View Python 3 Documentation" to all Python 2 documentation URLs
Right now, many Google searches for Python modules return the Python 2 documentation. IMO since 2 will be reaching EOL in around 3 years, it would be nice to have a giant red box at the top with a link to the Python 3 documentation. SFML already does something like this: https://www.sfml-dev.org/tutorials/2.3/ (I mean, it would be even nicer to have a "jump to latest version" for *all* not-new Python versions, though I figured just 2 would be a lot easier.) -- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else http://refi64.com/
Another example is PyPI showing a bold "Latest version: x.x.x".
Example: https://pypi.python.org/pypi/requests/2.17.0
Victor
2017-09-07 0:52 GMT+02:00 Ryan Gonzalez
Right now, many Google searches for Python modules return the Python 2 documentation. IMO since 2 will be reaching EOL in around 3 years, it would be nice to have a giant red box at the top with a link to the Python 3 documentation.
SFML already does something like this: https://www.sfml-dev.org/tutorials/2.3/
(I mean, it would be even nicer to have a "jump to latest version" for *all* not-new Python versions, though I figured just 2 would be a lot easier.)
-- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else http://refi64.com/ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
That's a good idea. Could you suggest it to
https://github.com/python/pythondotorg/ ? (There is actually a version
switcher on every page, but it's rather polite. :-)
On Wed, Sep 6, 2017 at 3:52 PM, Ryan Gonzalez
Right now, many Google searches for Python modules return the Python 2 documentation. IMO since 2 will be reaching EOL in around 3 years, it would be nice to have a giant red box at the top with a link to the Python 3 documentation.
SFML already does something like this: https://www.sfml-dev.org/ tutorials/2.3/
(I mean, it would be even nicer to have a "jump to latest version" for *all* not-new Python versions, though I figured just 2 would be a lot easier.)
-- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else http://refi64.com/ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
A bit radical but do you believe we can contact Google to alter the search
results?
It's for the benefit of the user after all, and many just switch to python
3 in the version picker anyway.
On Thu, Sep 7, 2017, 4:18 AM Guido van Rossum
That's a good idea. Could you suggest it to https://github.com/python/pythondotorg/ ? (There is actually a version switcher on every page, but it's rather polite. :-)
On Wed, Sep 6, 2017 at 3:52 PM, Ryan Gonzalez
wrote: Right now, many Google searches for Python modules return the Python 2 documentation. IMO since 2 will be reaching EOL in around 3 years, it would be nice to have a giant red box at the top with a link to the Python 3 documentation.
SFML already does something like this: https://www.sfml-dev.org/tutorials/2.3/
(I mean, it would be even nicer to have a "jump to latest version" for *all* not-new Python versions, though I figured just 2 would be a lot easier.)
-- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else http://refi64.com/ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
A progmatic workaround for yourself:
https://addons.mozilla.org/de/firefox/addon/py3direct/
https://chrome.google.com/webstore/detail/py3redirect/codfjigcljdnlklcaopdci...
Bar Harel
A bit radical but do you believe we can contact Google to alter the search results? It's for the benefit of the user after all, and many just switch to python 3 in the version picker anyway.
On Thu, Sep 7, 2017, 4:18 AM Guido van Rossum
wrote: That's a good idea. Could you suggest it to https://github.com/python/pythondotorg/ ? (There is actually a version switcher on every page, but it's rather polite. :-)
On Wed, Sep 6, 2017 at 3:52 PM, Ryan Gonzalez
wrote: Right now, many Google searches for Python modules return the Python 2 documentation. IMO since 2 will be reaching EOL in around 3 years, it would be nice to have a giant red box at the top with a link to the Python 3 documentation.
SFML already does something like this: https://www.sfml-dev.org/tutorials/2.3/
(I mean, it would be even nicer to have a "jump to latest version" for *all* not-new Python versions, though I figured just 2 would be a lot easier.)
-- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else http://refi64.com/ _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
A sitemap.xml may be helpful for indicating search relevance to search
crawlers?
https://www.google.com/search?q=sphinx+sitemap
On Thursday, September 7, 2017, Bar Harel
A bit radical but do you believe we can contact Google to alter the search results? It's for the benefit of the user after all, and many just switch to python 3 in the version picker anyway.
On Thu, Sep 7, 2017, 4:18 AM Guido van Rossum
javascript:_e(%7B%7D,'cvml','guido@python.org');> wrote: That's a good idea. Could you suggest it to https://github.com/python/ pythondotorg/ ? (There is actually a version switcher on every page, but it's rather polite. :-)
On Wed, Sep 6, 2017 at 3:52 PM, Ryan Gonzalez
javascript:_e(%7B%7D,'cvml','rymg19@gmail.com');> wrote: Right now, many Google searches for Python modules return the Python 2 documentation. IMO since 2 will be reaching EOL in around 3 years, it would be nice to have a giant red box at the top with a link to the Python 3 documentation.
SFML already does something like this: https://www.sfml-dev.org/ tutorials/2.3/
(I mean, it would be even nicer to have a "jump to latest version" for *all* not-new Python versions, though I figured just 2 would be a lot easier.)
-- Ryan (ライアン) Yoko Shimomura, ryo (supercell/EGOIST), Hiroyuki Sawano >> everyone else http://refi64.com/ _______________________________________________ Python-ideas mailing list Python-ideas@python.org javascript:_e(%7B%7D,'cvml','Python-ideas@python.org'); https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido) _______________________________________________ Python-ideas mailing list Python-ideas@python.org javascript:_e(%7B%7D,'cvml','Python-ideas@python.org'); https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
On Thu, Sep 07, 2017 at 05:51:31AM +0000, Bar Harel wrote:
A bit radical but do you believe we can contact Google to alter the search results?
You should try DuckDuckGo, it recognises "python" searches and quotes from, and links to, the Python 3 documentation at the top of the page before the search results. E.g.: https://duckduckgo.com/html/?q=python%20functools Both Bing and Yahoo also gives the Python 2 docs first: https://www.bing.com/search?q=python+functools https://au.search.yahoo.com/search?p=python+functools -- Steve
We just need someone with SEO experience to fix this for us.
On Thu, Sep 7, 2017 at 9:13 AM, Steven D'Aprano
On Thu, Sep 07, 2017 at 05:51:31AM +0000, Bar Harel wrote:
A bit radical but do you believe we can contact Google to alter the search results?
You should try DuckDuckGo, it recognises "python" searches and quotes from, and links to, the Python 3 documentation at the top of the page before the search results. E.g.:
https://duckduckgo.com/html/?q=python%20functools
Both Bing and Yahoo also gives the Python 2 docs first:
https://www.bing.com/search?q=python+functools
https://au.search.yahoo.com/search?p=python+functools
-- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
-- --Guido van Rossum (python.org/~guido)
Guido van Rossum
We just need someone with SEO experience to fix this for us.
I'm not an SEO expert, but I think a possible approach would be using (or partly abusing) the <link rel="canonical"> element on the documentation pages: https://support.google.com/webmasters/answer/139066 Python's documentation is already using these canonical links, just in an incomplete way: The Python documentation for 2.7 and 3.5 and later has a <link rel="canonical"> pointing to the generic documentation URL of the same major Python version, e.g. in https://docs.python.org/3/library/functools.html you can find this in the page source: <link rel="canonical" href="https://docs.python.org/3/library/functools.html" /> This is why if you search for "python 3 $module" in Google, you'll never see a direct link to the 3.5 or 3.6 versions of the documentation (because Google merges them with the generic docs.python.org/3/), but you still results for versions 3.2, 3.3 etc. of the documentation (because the lack the canonical links). A very good step would be to also add this canoncial link to the documentation versions 3.0-3.4, this will make docs.python.org/3.3/ etc. vanish from Google and probably rank the generic docs.python.org/3/ higher than now. And now to the abuse part (I'm honestly not sure how well this would actually work): If you would add such a canonical link in docs.python.org/2/ pointing to docs.python.org/3/ (at least where the same module exists in both versions), you would eventually hide /2/ from the search results. If you don't want to be so extreme (people still want Python 2 documentation if they search for "python 2 $module") you could remove the canonical link just from the specific docs.python.org/2.7/ which will then be ranked much lower than docs.python.org/3/ in the search results, but at least still show up. Sebastian
Sebastian Krause
This is why if you search for "python 3 $module" in Google, you'll never see a direct link to the 3.5 or 3.6 versions of the documentation (because Google merges them with the generic docs.python.org/3/), but you still results for versions 3.2, 3.3 etc. of the documentation (because the lack the canonical links).
A very good step would be to also add this canoncial link to the documentation versions 3.0-3.4, this will make docs.python.org/3.3/ etc. vanish from Google and probably rank the generic docs.python.org/3/ higher than now.
Here is Nick Coghlan's bpo issue which added these canonical links: https://bugs.python.org/issue26355 - looks like applying this to the older doc versions never happened in the end.
On 7 September 2017 at 12:24, Sebastian Krause
Sebastian Krause
wrote: This is why if you search for "python 3 $module" in Google, you'll never see a direct link to the 3.5 or 3.6 versions of the documentation (because Google merges them with the generic docs.python.org/3/), but you still results for versions 3.2, 3.3 etc. of the documentation (because the lack the canonical links).
A very good step would be to also add this canoncial link to the documentation versions 3.0-3.4, this will make docs.python.org/3.3/ etc. vanish from Google and probably rank the generic docs.python.org/3/ higher than now.
Here is Nick Coghlan's bpo issue which added these canonical links: https://bugs.python.org/issue26355 - looks like applying this to the older doc versions never happened in the end.
Right, as adding those will need to be handled through the web server and/or by manually regenerating the docs with the additional HTML headers - making the changes to the CPython repo won't achieve anything, since the docs for those branches aren't automatically regenerated anymore. Another big task that could be undertaken is to start re-routing unqualified deep links to Python 3 - the reason we still haven't done that is because the tree layout is actually different (as per the six.moves module), so it isn't a trivial rewrite rule the way the current redirection into the Python 2 docs is. Given such a mapping, it would also be possible to add the corresponding canonical URL entries to the Python 2.7 documentation to merge their search ranking in to the corresponding Python 3 pages. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia
participants (9)
-
Bar Harel
-
Guido van Rossum
-
Nick Coghlan
-
Philipp A.
-
Ryan Gonzalez
-
Sebastian Krause
-
Steven D'Aprano
-
Victor Stinner
-
Wes Turner