Skip to content

Commit 4c12c87

Browse files
hugovkpablogsal
andauthored
Only check magic number for 3.14+ (#302)
Co-authored-by: Pablo Galindo <[email protected]>
1 parent c0f574f commit 4c12c87

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

run_release.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,6 +1410,7 @@ def _api_key(api_key: str) -> str:
14101410
)
14111411

14121412
release_tag = release_mod.Tag(args.release)
1413+
magic = release_tag.as_tuple() >= (3, 14)
14131414
no_gpg = release_tag.as_tuple() >= (3, 14) # see PEP 761
14141415
tasks = [
14151416
Task(check_git, "Checking Git is available"),
@@ -1426,7 +1427,11 @@ def _api_key(api_key: str) -> str:
14261427
Task(check_sigstore_client, "Checking Sigstore CLI"),
14271428
Task(check_buildbots, "Check buildbots are good"),
14281429
Task(check_cpython_repo_is_clean, "Checking Git repository is clean"),
1429-
Task(check_magic_number, "Checking the magic number is up-to-date"),
1430+
*(
1431+
[Task(check_magic_number, "Checking the magic number is up-to-date")]
1432+
if magic
1433+
else []
1434+
),
14301435
Task(prepare_temporary_branch, "Checking out a temporary release branch"),
14311436
Task(run_blurb_release, "Run blurb release"),
14321437
Task(check_cpython_repo_is_clean, "Checking Git repository is clean"),

tests/test_run_release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def test_invalid_extract_github_owner() -> None:
3434

3535
def test_check_magic_number() -> None:
3636
db = {
37-
"release": Tag("3.13.0rc1"),
37+
"release": Tag("3.14.0rc1"),
3838
"git_repo": str(Path(__file__).parent / "magicdata"),
3939
}
4040
with pytest.raises(

0 commit comments

Comments
 (0)