Skip to content

Commit 31c3394

Browse files
committed
Remove --security-release so this only adds --ssh-key
1 parent f7e1b8d commit 31c3394

File tree

3 files changed

+9
-50
lines changed

3 files changed

+9
-50
lines changed

release.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,6 @@ def get(
6868
@overload
6969
def get(self, key: Literal["sign_gpg"], default: bool | None = None) -> bool: ...
7070

71-
@overload
72-
def get(
73-
self, key: Literal["security_release"], default: bool | None = None
74-
) -> bool: ...
75-
7671
@overload
7772
def get(self, key: Literal["release"], default: Tag | None = None) -> Tag: ...
7873

@@ -100,9 +95,6 @@ def __getitem__(self, key: Literal["ssh_key"]) -> str | None: ...
10095
@overload
10196
def __getitem__(self, key: Literal["sign_gpg"]) -> bool: ...
10297

103-
@overload
104-
def __getitem__(self, key: Literal["security_release"]) -> bool: ...
105-
10698
@overload
10799
def __getitem__(self, key: Literal["release"]) -> Tag: ...
108100

@@ -132,9 +124,6 @@ def __setitem__(self, key: Literal["ssh_key"], value: str | None) -> None: ...
132124
@overload
133125
def __setitem__(self, key: Literal["sign_gpg"], value: bool) -> None: ...
134126

135-
@overload
136-
def __setitem__(self, key: Literal["security_release"], value: bool) -> None: ...
137-
138127
@overload
139128
def __setitem__(self, key: Literal["release"], value: Tag) -> None: ...
140129

run_release.py

Lines changed: 8 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,6 @@ def __init__(
194194
ssh_user: str,
195195
sign_gpg: bool,
196196
ssh_key: str | None = None,
197-
security_release: bool = False,
198197
first_state: Task | None = None,
199198
) -> None:
200199
self.tasks = tasks
@@ -221,8 +220,6 @@ def __init__(
221220
self.db["ssh_key"] = ssh_key
222221
if not self.db.get("sign_gpg"):
223222
self.db["sign_gpg"] = sign_gpg
224-
if not self.db.get("security_release"):
225-
self.db["security_release"] = security_release
226223

227224
if not self.db.get("release"):
228225
self.db["release"] = release_tag
@@ -236,7 +233,6 @@ def __init__(
236233
print(f"- SSH key: {self.db['ssh_key'] or 'Default'}")
237234
print(f"- python.org API key: {self.db['auth_info']}")
238235
print(f"- Sign with GPG: {self.db['sign_gpg']}")
239-
print(f"- Security release: {self.db['security_release']}")
240236
print()
241237

242238
def checkpoint(self) -> None:
@@ -412,9 +408,6 @@ def check_cpython_repo_is_clean(db: ReleaseShelf) -> None:
412408

413409
def check_magic_number(db: ReleaseShelf) -> None:
414410
release_tag = db["release"]
415-
if release_tag.major == 3 and release_tag.minor <= 13:
416-
return
417-
418411
if release_tag.is_final or release_tag.is_release_candidate:
419412

420413
def out(msg: str) -> None:
@@ -946,34 +939,19 @@ def wait_until_all_files_are_in_folder(db: ReleaseShelf) -> None:
946939
are_windows_files_there = f"python-{release}.exe" in all_files
947940
are_macos_files_there = f"python-{release}-macos11.pkg" in all_files
948941
are_linux_files_there = f"Python-{release}.tgz" in all_files
949-
950-
if db["security_release"]:
951-
# For security releases, only check Linux files
952-
are_all_files_there = are_linux_files_there
953-
else:
954-
# For regular releases, check all platforms
955-
are_all_files_there = (
956-
are_linux_files_there
957-
and are_windows_files_there
958-
and are_macos_files_there
959-
)
942+
are_all_files_there = (
943+
are_linux_files_there and are_windows_files_there and are_macos_files_there
944+
)
960945

961946
if not are_all_files_there:
962947
linux_tick = "✅" if are_linux_files_there else "❌"
963948
windows_tick = "✅" if are_windows_files_there else "❌"
964949
macos_tick = "✅" if are_macos_files_there else "❌"
965-
if db["security_release"]:
966-
print(
967-
f"\rWaiting for files: Linux {linux_tick} (security release mode - only checking Linux) ",
968-
flush=True,
969-
end="",
970-
)
971-
else:
972-
print(
973-
f"\rWaiting for files: Linux {linux_tick} Windows {windows_tick} Mac {macos_tick} ",
974-
flush=True,
975-
end="",
976-
)
950+
print(
951+
f"\rWaiting for files: Linux {linux_tick} Windows {windows_tick} Mac {macos_tick} ",
952+
flush=True,
953+
end="",
954+
)
977955
time.sleep(1)
978956
print()
979957

@@ -1307,13 +1285,6 @@ def _api_key(api_key: str) -> str:
13071285
help="Path to the SSH key file to use for authentication",
13081286
type=str,
13091287
)
1310-
parser.add_argument(
1311-
"--security-release",
1312-
dest="security_release",
1313-
action="store_true",
1314-
default=False,
1315-
help="Indicate this is a security release (only checks for Linux files)",
1316-
)
13171288
args = parser.parse_args()
13181289

13191290
auth_key = args.auth_key or os.getenv("AUTH_INFO")
@@ -1409,7 +1380,6 @@ def _api_key(api_key: str) -> str:
14091380
ssh_user=args.ssh_user,
14101381
sign_gpg=not no_gpg,
14111382
ssh_key=args.ssh_key,
1412-
security_release=args.security_release,
14131383
tasks=tasks,
14141384
)
14151385
automata.run()

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.14.0rc1"),
37+
"release": Tag("3.13.0rc1"),
3838
"git_repo": str(Path(__file__).parent / "magicdata"),
3939
}
4040
with pytest.raises(

0 commit comments

Comments
 (0)