-
-
Notifications
You must be signed in to change notification settings - Fork 37
Add new ssh key argument and don't check magic number in old versions #234
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
(I pushed a test and lint fix) |
@@ -398,6 +412,9 @@ def check_cpython_repo_is_clean(db: ReleaseShelf) -> None: | |||
|
|||
def check_magic_number(db: ReleaseShelf) -> None: | |||
release_tag = db["release"] | |||
if release_tag.major == 3 and release_tag.minor <= 13: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice to avoid hardcoding this, as it's another thing that needs adding to a longish list when a new version comes around.
Perhaps we can fetch the newest version from https://github.com/python/devguide/blob/main/include/release-cycle.json (and later from python/peps#4331)?
This can also be a followup PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is the first version that needed this feature. How fetching the newer version would be cleaner ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it always only the current feature release that this check will apply for? If so, perhaps expanding the security
Boolean to a branch status enum would be better, as then we could test if branch-status == feature here.
A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this particular check applies to all releases that are after we changed that file, that is, anything above or including 3.13
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, if the limit is always 3.13 and we don't need to change it, then a hardcoded version makes sense here.
Let's use a tuple so we don't need to worry about Python 4 :)
if release_tag.major == 3 and release_tag.minor <= 13: | |
if not release_tag.as_tuple() >= (3, 14): |
parser.add_argument( | ||
"--security-release", | ||
dest="security_release", | ||
action="store_true", | ||
default=False, | ||
help="Indicate this is a security release (only checks for Linux files)", | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And similarly, we could check the status in the JSON file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's a PR to check the status from the devguide, so the RM doesn't have to remember to pass --security
each time:
Merging that will update this PR.
No description provided.