• Victor Stinner's avatar
    bpo-35389: platform.libc_ver() uses os.confstr() (GH-10891) · 476b113e
    Victor Stinner authored
    platform.libc_ver() now uses os.confstr('CS_GNU_LIBC_VERSION') if
    available and the *executable* parameter is not set. The default
    value of the libc_ver() *executable* parameter becomes None.
    
    Quick benchmark on Fedora 29:
    
    python3 -m perf command ./python -S -c 'import platform; platform.libc_ver()'
    94.9 ms +- 4.3 ms -> 33.2 ms +- 1.4 ms: 2.86x faster (-65%)
    476b113e
platform.py 39 KB