summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Lib/ctypes/util.py2
-rw-r--r--Misc/NEWS3
2 files changed, 4 insertions, 1 deletions
diff --git a/Lib/ctypes/util.py b/Lib/ctypes/util.py
index dca4ec371e..1cde0e3a85 100644
--- a/Lib/ctypes/util.py
+++ b/Lib/ctypes/util.py
@@ -205,7 +205,7 @@ elif os.name == "posix":
# XXX assuming GLIBC's ldconfig (with option -p)
expr = r'(\S+)\s+\((%s(?:, OS ABI:[^\)]*)?)\)[^/]*(/[^\(\)\s]*lib%s\.[^\(\)\s]*)' \
% (abi_type, re.escape(name))
- with contextlib.closing(os.popen('/sbin/ldconfig -p 2>/dev/null')) as f:
+ with contextlib.closing(os.popen('LANG=C /sbin/ldconfig -p 2>/dev/null')) as f:
data = f.read()
res = re.search(expr, data)
if not res:
diff --git a/Misc/NEWS b/Misc/NEWS
index d92cb54ea6..eade42cb69 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -283,6 +283,9 @@ C-API
Library
-------
+- Issue #7356: ctypes.util: Make parsing of ldconfig output independent of
+ the locale.
+
- The internals of the subprocess module on POSIX systems have been replaced
by an extension module (_posixsubprocess) so that the fork()+exec() can be
done safely without the possibility of deadlock in multithreaded applications.