]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 22 Sep 2018 01:29:34 +0000 (18:29 -0700)
committerGitHub <noreply@github.com>
Sat, 22 Sep 2018 01:29:34 +0000 (18:29 -0700)
commite5fde1f992e94f166415ab96d874ed1d2e0c8004
tree7e74ff8ff468209a69972962fe0276c72a068885
parente45662c28bfc84aa3674463a2995e45da4d63793
bpo-34537: Fix test_gdb:test_strings with LC_ALL=C (GH-9483)

We cannot simply call locale.getpreferredencoding() here,
as GDB might have been linked against a different version
of Python with a different encoding and coercion policy
with respect to PEP 538 and PEP 540.

Thanks to Victor Stinner for a hint on how to fix this.
(cherry picked from commit 7279b5125e7c5d84a473d250b27d353cb7f6628e)

Co-authored-by: Elvis Pranskevichus <elvis@magic.io>
Lib/test/test_gdb.py
Misc/NEWS.d/next/Tests/2018-09-21-17-33-41.bpo-34537.GImYtZ.rst [new file with mode: 0644]