Skip to content

Commit 8ffeda5

Browse files
hugovkCAM-Gerlach
andauthored
Maintain support for pre-Python 3.11 (#1107)
Co-authored-by: C.A.M. Gerlach <[email protected]>
1 parent f9230ff commit 8ffeda5

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ nickname of "the devguide" by the Python core developers.
2121

2222
The official home of this guide is https://devguide.python.org.
2323

24-
Compilation
24+
Render HTML
2525
-----------
2626

27-
For the compilation of the devguide, Python 3.11+ is needed::
27+
To render the devguide to HTML under ``_build/html``, run::
2828

2929
make html

_tools/generate_release_cycle.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import csv
66
import datetime as dt
77
import json
8+
import sys
89

910
import jinja2
1011

@@ -44,7 +45,10 @@ def __init__(self) -> None:
4445

4546
def write_csv(self) -> None:
4647
"""Output CSV files."""
47-
now_str = str(dt.datetime.now(dt.UTC))
48+
if sys.version_info >= (3, 11):
49+
now_str = str(dt.datetime.now(dt.UTC))
50+
else:
51+
now_str = str(dt.datetime.utcnow())
4852

4953
versions_by_category = {"branches": {}, "end-of-life": {}}
5054
headers = None

0 commit comments

Comments
 (0)