bpo-35389: platform.platform() calls libc_ver() without executable (GH-14418)

When libc_ver() is called with an executable, the
os.confstr('CS_GNU_LIBC_VERSION') fast-path cannot be taken. Modify
platform.platform() to call libc_ver() without executable, instead of
calling libc_ver(sys.executable), since sys.executable is already the
default value.
This commit is contained in:
Victor Stinner 2019-06-27 09:04:28 +02:00 committed by GitHub
parent 4c26abd14f
commit a719c8f4bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1202,7 +1202,7 @@ def platform(aliased=0, terse=0):
elif system in ('Linux',):
# check for libc vs. glibc
libcname, libcversion = libc_ver(sys.executable)
libcname, libcversion = libc_ver()
platform = _platform(system, release, machine, processor,
'with',
libcname+libcversion)