Content-Length: 279543 | pFad | https://github.com/python/cpython/issues/100388

C7 platform._sys_version() raises exception when __DATE__ is undefined at build-time · Issue #100388 · python/cpython · GitHub
Skip to content

platform._sys_version() raises exception when __DATE__ is undefined at build-time #100388

@fosslinux

Description

@fosslinux

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

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/100388

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy