Open
Description
Bug report
If __DATE__
is undefined at build time (eg, CPPFLAGS=-U__DATE__
), in the sys.version
string, the date portion is set to xx/xx/xx. However the __DATE__
string follows MMM DD YYYY format.
platform._sys_version()
does not know how to interpret xx/xx/xx, expecting MMM DD YYYY, so it raises an exception (ValueError: failed to parse CPython sys.version
).
Your environment
- CPython versions tested on: exists from at least 3.8
- Operating system and architecture: irrelevant, any compiler where you can undefine DATE or it is not defined.