Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Doc/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,13 @@ Then, from the ``Doc`` directory, run ::
where ``<builder>`` is one of html, text, latex, or htmlhelp (for explanations
see the make targets above).

Deprecation header
==================

Following the sunsetting of Python 2.7, a red banner displays at the
top of each page redirecting to the corresponding page on
``https://docs.python.org/3/``.


Contributing
============
Expand Down
4 changes: 4 additions & 0 deletions Doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@
# Split the index
html_split_index = True

html_context = {
'outdated': True
}


# Options for LaTeX output
# ------------------------
Expand Down
10 changes: 10 additions & 0 deletions Doc/tools/templates/layout.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
{% extends "!layout.html" %}
{% block header %}
{%- if outdated %}
<div id="outdated-warning" style="padding: .5em; text-align: center; background-color: #FFBABA; color: #6A0E0E;">
{% trans %}This document is for an old version of Python that is {% endtrans %}<a href="https://devguide.python.org/devcycle/#end-of-life-branches">{% trans %}no longer supported{% endtrans %}</a>.
{% trans %}You should upgrade, and read the {% endtrans %}
<a href="https://docs.python.org/{{ language + '/' if language and language != 'en' else '' }}3/{{ pagename }}{{ file_suffix }}">{% trans %} Python documentation for the current stable release{% endtrans %}</a>.
</div>
{%- endif %}
{% endblock %}

{% block rootrellink %}
<li><img src="{{ pathto('_static/py.png', 1) }}" alt=""
style="vertical-align: middle; margin-top: -1px"/></li>
Expand Down