From cae59a0da7ff424a84fa4e7ccb4e9b4d244eff68 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 27 Jun 2019 01:40:38 +0200 Subject: [PATCH] bpo-35389: platform.platform() calls libc_ver() without executable 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. --- Lib/platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/platform.py b/Lib/platform.py index 6fbb7b08c598e3..ed41edc98fe087 100755 --- a/Lib/platform.py +++ b/Lib/platform.py @@ -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)