bpo-45532: Replace 'default' with 'main' as default in sys.version (GH-29100)

(cherry picked from commit d2cd5eef0c3fc0431bfe3fc24b4c020ebfcf8aad)

Co-authored-by: Jeong YunWon <69878+youknowone@users.noreply.github.com>
diff --git a/Misc/NEWS.d/next/Build/2021-10-20-16-07-39.bpo-45532.kyhvis.rst b/Misc/NEWS.d/next/Build/2021-10-20-16-07-39.bpo-45532.kyhvis.rst
new file mode 100644
index 0000000..575e2fb
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2021-10-20-16-07-39.bpo-45532.kyhvis.rst
@@ -0,0 +1,2 @@
+Update :data:`sys.version` to use ``main`` as fallback information.
+Patch by Jeong YunWon.
diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c
index 5f941a2..7cb7397 100644
--- a/Modules/getbuildinfo.c
+++ b/Modules/getbuildinfo.c
@@ -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);