-
-
Notifications
You must be signed in to change notification settings - Fork 32.7k
Open
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
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.
Linked PRs
Metadata
Metadata
Assignees
Labels
stdlibPython modules in the Lib dirPython modules in the Lib dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error