Skip to content

Python 2 sunset preparation: docs.python.org deep links #3

@ncoghlan

Description

@ncoghlan

The current handling of deep links on docs.python.org is covered by PEP 430:

  • unqualified deep links resolve to the Python 2.7 documentation
  • the canonical URL for up to date Python 3 documentation includes a /3/ segment in the path

That approach made sense when I wrote PEP 430, but that's almost 7 years ago now, and there's the potential to ask the PSF for assistance in the somewhat tedious task of implementing a more sophisticated solution for adoption as part of the Python 2 sunsetting process (and also easing a possible future transition to a python 4.0 release if we ever decide to make one of those rather than continuing with double-digit minor versions in the 3.x series).

I'm not planning to write that PEP myself, but some potential ideas that it could cover:

  • switching the canonical URL for the English Python documentation from "docs.python.org/3/" to "docs.python.org/en/" (in alignment with PEP 545)
  • setting the canonical URL even on old maintenance branches that are otherwise no longer receiving documentation updates (either by making one final commit to them, or by amending the HTML files directly on the documentation hosting server)
  • setting the canonical URL meta tag even in the Python 2.7 documentation to refer to the relevant "docs.python.org/en/" URL (but do the work to handle module renames and other moves correctly)
  • adding a banner to end of life versions that clearly indicates that the specified version is no longer receiving security updates, and potentially also linking to the latest version (see https://docs.djangoproject.com/en/1.10/ref/django-admin/ for an example of such a banner, albeit without a direct link to more recent documentation)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions