Skip to content

Commit 1249ce7

Browse files
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
(cherry picked from commit d2cd5ee) Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
1 parent 9192683 commit 1249ce7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Update :data:`sys.version` to use ``main`` as fallback information.
2+
Patch by Jeong YunWon.

Modules/getbuildinfo.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ Py_GetBuildInfo(void)
4040
const char *revision = _Py_gitversion();
4141
const char *sep = *revision ? ":" : "";
4242
const char *gitid = _Py_gitidentifier();
43-
if (!(*gitid))
44-
gitid = "default";
43+
if (!(*gitid)) {
44+
gitid = "main";
45+
}
4546
PyOS_snprintf(buildinfo, sizeof(buildinfo),
4647
"%s%s%s, %.20s, %.9s", gitid, sep, revision,
4748
DATE, TIME);

0 commit comments

Comments
 (0)