Skip to content

Commit 97e6f14

Browse files
hugovkAA-Turner
andauthored
Apply suggestions from code review
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
1 parent a1b2a4f commit 97e6f14

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

release.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,11 +447,11 @@ def tweak_patchlevel(
447447

448448
@cache
449449
def get_pep_number(version: str) -> str:
450-
"""Fetch PEP number for a Python version from the devguide.
450+
"""Fetch PEP number for a Python version from peps.python.org.
451451
452452
Returns the PEP number as a string, or "TODO" if not found.
453453
"""
454-
url = "https://raw.githubusercontent.com/python/devguide/main/include/release-cycle.json"
454+
url = "https://peps.python.org/api/release-cycle.json"
455455
with urllib.request.urlopen(url, timeout=10) as response:
456456
data = json.loads(response.read().decode())
457457
if version in data:
@@ -468,7 +468,7 @@ def tweak_readme(tag: Tag, filename: str = "README.rst") -> None:
468468
# Update first line: "This is Python version 3.14.0 alpha 7"
469469
# and update length of underline in second line to match.
470470
content = readme.read_text()
471-
lines = content.splitlines()
471+
lines = content.split("\n")
472472
this_is = f"This is Python version {tag.long_name}"
473473
underline = "=" * len(this_is)
474474
lines[0] = this_is

0 commit comments

Comments
 (0)