@@ -19,10 +19,10 @@ def get_stable_from_versions(data: dict) -> list:
1919 return [k for k , v in data .items () if v ["status" ] in ["bugfix" , "security" ]]
2020
2121
22- def get_from_devguide () -> list :
22+ def get_from_peps () -> list :
2323 """
2424 Returns a list of bug-fix and security-fix releases from
25- a JSON file in devguide , which is used to generate info
25+ the PEPs JSON file, which is used to generate info
2626 on version.rst for https://devguide.python.org/versions/.
2727
2828 Returns:
@@ -31,8 +31,7 @@ def get_from_devguide() -> list:
3131 Raises:
3232 JSONDecodeError: If an error occurs when parsing the data as JSON.
3333 """
34- raw_root_url = "https://raw.githubusercontent.com/python/devguide/main"
35- url = f"{ raw_root_url } /include/release-cycle.json"
34+ url = "https://peps.python.org/api/release-cycle.json"
3635
3736 r = requests .get (url , allow_redirects = True )
3837 if r .status_code != 200 :
@@ -88,9 +87,9 @@ def get_latest_version() -> str:
8887def update_versions_file (versions_file : str ):
8988 """
9089 Writes Python versions in *versions_file* using info gathered by
91- the get_from_devguide () and get_latest_version() functions.
90+ the get_from_peps () and get_latest_version() functions.
9291 """
93- versions = get_from_devguide ()
92+ versions = get_from_peps ()
9493 latest = get_latest_version ()
9594 if latest :
9695 versions .insert (0 , latest )
0 commit comments