Skip to content

Commit a719c8f

Browse files
authored
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.
1 parent 4c26abd commit a719c8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/platform.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1202,7 +1202,7 @@ def platform(aliased=0, terse=0):
12021202

12031203
elif system in ('Linux',):
12041204
# check for libc vs. glibc
1205-
libcname, libcversion = libc_ver(sys.executable)
1205+
libcname, libcversion = libc_ver()
12061206
platform = _platform(system, release, machine, processor,
12071207
'with',
12081208
libcname+libcversion)

0 commit comments

Comments
 (0)