mirror of https://github.com/python/cpython.git
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
(cherry picked from commit d2cd5eef0c
)
Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
This commit is contained in:
parent
65de808811
commit
696a89fef8
|
@ -0,0 +1,2 @@
|
||||||
|
Update :data:`sys.version` to use ``main`` as fallback information.
|
||||||
|
Patch by Jeong YunWon.
|
|
@ -40,8 +40,9 @@ Py_GetBuildInfo(void)
|
||||||
const char *revision = _Py_gitversion();
|
const char *revision = _Py_gitversion();
|
||||||
const char *sep = *revision ? ":" : "";
|
const char *sep = *revision ? ":" : "";
|
||||||
const char *gitid = _Py_gitidentifier();
|
const char *gitid = _Py_gitidentifier();
|
||||||
if (!(*gitid))
|
if (!(*gitid)) {
|
||||||
gitid = "default";
|
gitid = "main";
|
||||||
|
}
|
||||||
PyOS_snprintf(buildinfo, sizeof(buildinfo),
|
PyOS_snprintf(buildinfo, sizeof(buildinfo),
|
||||||
"%s%s%s, %.20s, %.9s", gitid, sep, revision,
|
"%s%s%s, %.20s, %.9s", gitid, sep, revision,
|
||||||
DATE, TIME);
|
DATE, TIME);
|
||||||
|
|
Loading…
Reference in New Issue