From 6318ffcba21f8fc155f5558237ab03aa45f0e174 Mon Sep 17 00:00:00 2001 From: Adam Turner <9087854+AA-Turner@users.noreply.github.com> Date: Wed, 25 Sep 2024 20:06:54 +0100 Subject: [PATCH] Doc: Use ``major.minor`` for documentation distribution archive filenames (#124489) --- Doc/tools/extensions/patchlevel.py | 2 +- Doc/tools/templates/download.html | 24 +++++++++++++----------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/Doc/tools/extensions/patchlevel.py b/Doc/tools/extensions/patchlevel.py index f2df6db47a2227..53ea1bf47b8fd3 100644 --- a/Doc/tools/extensions/patchlevel.py +++ b/Doc/tools/extensions/patchlevel.py @@ -74,4 +74,4 @@ def get_version_info(): if __name__ == "__main__": - print(format_version_info(get_header_version_info())[1]) + print(format_version_info(get_header_version_info())[0]) diff --git a/Doc/tools/templates/download.html b/Doc/tools/templates/download.html index b4217908cc63c9..c978e61b16a49e 100644 --- a/Doc/tools/templates/download.html +++ b/Doc/tools/templates/download.html @@ -1,13 +1,15 @@ {% extends "layout.html" %} {% set title = _('Download') %} {% if daily is defined %} - {% set dlbase = pathto('archives', 1) %} + {% set dl_base = pathto('archives', resource=True) %} + {% set dl_version = version %} {% else %} {# The link below returns HTTP 404 until the first related alpha release. This is expected; use daily documentation builds for CPython development. #} - {% set dlbase = 'https://www.python.org/ftp/python/doc/' + release %} + {% set dl_base = 'https://www.python.org/ftp/python/doc/' + release %} + {% set dl_version = release %} {% endif %} {% block body %} @@ -26,27 +28,27 @@

{% trans %}Download Python {{ release }} Documentation{% endtrans %}

{% trans %}PDF{% endtrans %} - {% trans download_size="17" %}Download (ca. {{ download_size }} MiB){% endtrans %} - {% trans download_size="17" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="17" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="17" %}Download (ca. {{ download_size }} MiB){% endtrans %} {% trans %}HTML{% endtrans %} - {% trans download_size="13" %}Download (ca. {{ download_size }} MiB){% endtrans %} - {% trans download_size="8" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="13" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="8" %}Download (ca. {{ download_size }} MiB){% endtrans %} {% trans %}Plain text{% endtrans %} - {% trans download_size="4" %}Download (ca. {{ download_size }} MiB){% endtrans %} - {% trans download_size="3" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="4" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="3" %}Download (ca. {{ download_size }} MiB){% endtrans %} {% trans %}Texinfo{% endtrans %} - {% trans download_size="9" %}Download (ca. {{ download_size }} MiB){% endtrans %} - {% trans download_size="7" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="9" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="7" %}Download (ca. {{ download_size }} MiB){% endtrans %} {% trans %}EPUB{% endtrans %} - {% trans download_size="6" %}Download (ca. {{ download_size }} MiB){% endtrans %} + {% trans download_size="6" %}Download (ca. {{ download_size }} MiB){% endtrans %}