Message 404380 - Python tracker
sys.version returns '3.10.0 (default, Oct 5 2021, 23:49:26) [GCC 10.2.1 20210110]' 'default' is supposed to represent the name of the branch, and it's been there since the HG days: https://github.com/python/cpython/blob/fc64c351c7757f0ebdb7da65cb74871e494a2add/Modules/getbuildinfo.c#L44 When the code was updated for Git in #27593, the default remained the same: https://github.com/python/cpython/blob/bb3e0c240bc60fe08d332ff5955d54197f79751c/Modules/getbuildinfo.c#L44 The default should be updated to 'main'. Note that _Py_gitidentifier is supposed to return meaningful values while building from within a git checkout -- when it fails to do so the default value is used. This can also be tested through sys._git (which returns ('CPython', '', '')), but at the moment I can't build from a git checkout and verify that _Py_gitidentifier returns the correct branch. If not, a separate issue should be created.