This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ezio.melotti
Recipients ezio.melotti
Date 2021-10-19.23:40:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-10-19 23:40:13ezio.melottisetrecipients: + ezio.melotti
2021-10-19 23:40:13ezio.melottisetmessageid: <1634686813.85.0.311990959144.issue45532@roundup.psfhosted.org>
2021-10-19 23:40:13ezio.melottilinkissue45532 messages
2021-10-19 23:40:13ezio.melotticreate