From 4c0c141a77ba238d2a33b1bfb677331db30145cb Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 3 Jun 2023 10:59:36 +0300 Subject: [PATCH 1/2] Maintain support for pre-Python 3.11 --- README.rst | 2 +- _tools/generate_release_cycle.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 7f0e8b92cc..950b24a06f 100644 --- a/README.rst +++ b/README.rst @@ -24,6 +24,6 @@ The official home of this guide is https://devguide.python.org. Compilation ----------- -For the compilation of the devguide, Python 3.11+ is needed:: +For the compilation of the devguide:: make html diff --git a/_tools/generate_release_cycle.py b/_tools/generate_release_cycle.py index dc37010589..27b5cc3ec0 100644 --- a/_tools/generate_release_cycle.py +++ b/_tools/generate_release_cycle.py @@ -5,6 +5,7 @@ import csv import datetime as dt import json +import sys import jinja2 @@ -44,7 +45,10 @@ def __init__(self) -> None: def write_csv(self) -> None: """Output CSV files.""" - now_str = str(dt.datetime.now(dt.UTC)) + if sys.version_info >= (3, 11): + now_str = str(dt.datetime.now(dt.UTC)) + else: + now_str = str(dt.datetime.utcnow()) versions_by_category = {"branches": {}, "end-of-life": {}} headers = None From 0fa66024d154a2dd592ca38e9d03c39332ce6d68 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sun, 4 Jun 2023 08:42:07 +0300 Subject: [PATCH 2/2] Wording Co-authored-by: C.A.M. Gerlach --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 950b24a06f..f8f7ff2519 100644 --- a/README.rst +++ b/README.rst @@ -21,9 +21,9 @@ nickname of "the devguide" by the Python core developers. The official home of this guide is https://devguide.python.org. -Compilation +Render HTML ----------- -For the compilation of the devguide:: +To render the devguide to HTML under ``_build/html``, run:: make html