mirror of https://github.com/python/cpython
bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)
This commit is contained in:
parent
dff0b71343
commit
d2cd5eef0c
|
@ -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