From 431447e8665647d3639f81ffb9abdad838ce4975 Mon Sep 17 00:00:00 2001 From: Savannah Ostrowski Date: Tue, 13 Oct 2026 14:08:43 -0700 Subject: [PATCH] Feature Windows manifest for Python 3.16 and later --- add_to_pydotorg.py | 2 +- tests/test_add_to_pydotorg.py | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/add_to_pydotorg.py b/add_to_pydotorg.py index 8d7d59b2..f86d571f 100755 --- a/add_to_pydotorg.py +++ b/add_to_pydotorg.py @@ -126,7 +126,7 @@ def get_file_descriptions( ( "Windows release manifest", "windows", - False, + v >= (3, 16), f"Install with 'py install {v[0]}.{v[1]}'", ), ), diff --git a/tests/test_add_to_pydotorg.py b/tests/test_add_to_pydotorg.py index ad622fc0..6bbefeec 100644 --- a/tests/test_add_to_pydotorg.py +++ b/tests/test_add_to_pydotorg.py @@ -284,3 +284,28 @@ def test_list_files(fs: FakeFilesystem) -> None: "Install with 'py install 3.14'", ), ] + + +@pytest.mark.parametrize( + ("release", "expected_download_button"), + [ + ("3.15.0a1", False), + ("3.16.0a1", True), + ], +) +def test_windows_manifest_download_button( + fs: FakeFilesystem, release: str, expected_download_button: bool +) -> None: + ftp_root = "/fake_ftp_root" + filename = f"windows-{release}.json" + fs.create_file(Path(ftp_root) / add_to_pydotorg.base_version(release) / filename) + + assert list(add_to_pydotorg.list_files(ftp_root, release)) == [ + ( + filename, + "Windows release manifest", + "windows", + expected_download_button, + f"Install with 'py install {add_to_pydotorg.minor_version(release)}'", + ) + ]