Skip to content

Commit 9edafb0

Browse files
committed
1 parent 587de2e commit 9edafb0

File tree

4 files changed

+6
-152
lines changed

4 files changed

+6
-152
lines changed

.pre-commit-config.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,12 @@ repos:
77
args: [--exit-non-zero-on-fix]
88
- id: ruff-format
99
name: Run Ruff (format)
10-
args: [--check]
1110

1211
- repo: https://github.com/pre-commit/pre-commit-hooks
1312
rev: v4.5.0
1413
hooks:
1514
- id: check-case-conflict
1615
- id: check-merge-conflict
17-
- id: check-json
1816
- id: check-yaml
1917
- id: debug-statements
2018
- id: end-of-file-fixer

_tools/generate_release_cycle.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import csv
88
import datetime as dt
99
import json
10+
from urllib.request import urlopen
1011

1112
import jinja2
1213

@@ -41,8 +42,8 @@ class Versions:
4142
"""For converting JSON to CSV and SVG."""
4243

4344
def __init__(self, *, limit_to_active=False, special_py27=False) -> None:
44-
with open("include/release-cycle.json", encoding="UTF-8") as in_file:
45-
self.versions = json.load(in_file)
45+
with urlopen("https://peps.python.org/api/release-cycle.json") as in_file:
46+
self.versions = json.loads(in_file.read().decode("utf-8"))
4647

4748
# Generate a few additional fields
4849
for key, version in self.versions.items():

conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import json
2+
from urllib.request import urlopen
23

34
extensions = [
45
'notfound.extension',
@@ -178,8 +179,8 @@
178179

179180
# Dynamically expose the Python version associated with the "main" branch.
180181
# Exactly one entry in ``release-cycle.json`` should have ``"branch": "main"``.
181-
with open("include/release-cycle.json", encoding="UTF-8") as _f:
182-
_cycle = json.load(_f)
182+
with urlopen("https://peps.python.org/api/release-cycle.json") as _f:
183+
_cycle = json.loads(_f.read().decode("utf-8"))
183184

184185
_main_version = next(
185186
version for version, data in _cycle.items() if data.get("branch") == "main"

include/release-cycle.json

Lines changed: 0 additions & 146 deletions
This file was deleted.

0 commit comments

Comments
 (0)