{% extends "layout.html" %}
{% set title = _('Download') %}
{% if daily is defined %}
  {% 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 dl_base = 'https://www.python.org/ftp/python/doc/' + release %}
  {% set dl_version = release %}
{% endif %}

{%- block extrahead -%}
    {{ super() }}
    <meta property="og:title" content="Download — Python {{ dl_version }} documentation">
    <meta property="og:type" content="website">
    <meta property="og:url" content="https://docs.python.org/3/download.html">
    <meta property="og:site_name" content="Python documentation">
    <meta property="og:description" content="Download Python documentation.">
    <meta property="og:image" content="https://docs.python.org/3/_static/og-image.png">
    <meta name="description" content="Download Python documentation.">
    <meta property="og:image:width" content="200">
    <meta property="og:image:height" content="200">
    <meta name="theme-color" content="#3776ab">
{%- endblock -%}

{% block body %}
<h1>{% trans %}Download Python {{ dl_version }} documentation{% endtrans %}</h1>

{% if last_updated %}<p><b>{% trans %}Last updated on: {{ last_updated }}.{% endtrans %}</b></p>{% endif %}

<p>{% trans %}Download an archive containing all the documentation for this version of Python:{% endtrans %}</p>

<table class="docutils">
  <tr>
    <th>{% trans %}Format{% endtrans %}</th>
    <th>{% trans %}Packed as .zip{% endtrans %}</th>
    <th>{% trans %}Packed as .tar.bz2{% endtrans %}</th>
  </tr>
  <tr>
    <td>{% trans %}HTML{% endtrans %}</td>
    <td>{% trans %}<a href="{{ dl_base }}/python-{{ dl_version }}-docs-html.zip">Download</a>{% endtrans %}</td>
    <td>{% trans %}<a href="{{ dl_base }}/python-{{ dl_version }}-docs-html.tar.bz2">Download</a>{% endtrans %}</td>
  </tr>
  <tr>
    <td>{% trans %}Plain text{% endtrans %}</td>
    <td>{% trans %}<a href="{{ dl_base }}/python-{{ dl_version }}-docs-text.zip">Download</a>{% endtrans %}</td>
    <td>{% trans %}<a href="{{ dl_base }}/python-{{ dl_version }}-docs-text.tar.bz2">Download</a>{% endtrans %}</td>
  </tr>
  <tr>
    <td>{% trans %}Texinfo{% endtrans %}</td>
    <td>{% trans %}<a href="{{ dl_base }}/python-{{ dl_version }}-docs-texinfo.zip">Download</a>{% endtrans %}</td>
    <td>{% trans %}<a href="{{ dl_base }}/python-{{ dl_version }}-docs-texinfo.tar.bz2">Download</a>{% endtrans %}</td>
 </tr>
 <tr>
    <td>{% trans %}EPUB{% endtrans %}</td>
    <td>{% trans %}<a href="{{ dl_base }}/python-{{ dl_version }}-docs.epub">Download</a>{% endtrans %}</td>
    <td></td>
  </tr>
</table>

<p>{% trans %}
We no longer provide updates to the pre-built PDFs of the documentation.
The previously-built archives are still available and may be of use:
<a href="{{ dl_base }}/python-{{ dl_version }}-docs-pdf-a4.zip">PDF (.zip archive)</a>;
<a href="{{ dl_base }}/python-{{ dl_version }}-docs-pdf-a4.tar.bz2">PDF (.tar.bz2 archive)</a>.
To build a PDF archive, follow the instructions in the
<a href="https://devguide.python.org/documentation/start-documenting/#building-the-documentation">Developer's Guide</a>
and run <code>make dist-pdf</code> in the <code>Doc/</code> directory of a copy of the CPython repository.
{% endtrans %}</p>

<p>{% trans %}
See the <a href="https://docs.python.org/{{ version }}/archives/">directory listing</a>
for file sizes.{% endtrans %}</p>

<h2>{% trans %}Problems{% endtrans %}</h2>
{% set bugs = pathto('bugs') %}
<p>{% trans bugs = bugs %}<a href="{{ bugs }}">Open an issue</a>
if you have comments or suggestions for the Python documentation.{% endtrans %}</p>
{% endblock %}
