Skip to content

Commit

Permalink
bpo-45532: Replace 'default' with 'main' as default in sys.version (G…
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowone committed Oct 20, 2021
1 parent dff0b71 commit d2cd5ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update :data:`sys.version` to use ``main`` as fallback information.
Patch by Jeong YunWon.
5 changes: 3 additions & 2 deletions Modules/getbuildinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,9 @@ Py_GetBuildInfo(void)
const char *revision = _Py_gitversion();
const char *sep = *revision ? ":" : "";
const char *gitid = _Py_gitidentifier();
if (!(*gitid))
gitid = "default";
if (!(*gitid)) {
gitid = "main";
}
PyOS_snprintf(buildinfo, sizeof(buildinfo),
"%s%s%s, %.20s, %.9s", gitid, sep, revision,
DATE, TIME);
Expand Down

0 comments on commit d2cd5ee

Please sign in to comment.