# HG changeset patch # Parent eb6eafafdb4490d6cfdae3f09f548bfe4cbb8ec7 Issue #nnnnn: Remove unneeded workaround to restore locale The “readline” module already has a workaround using setlocale(LC_CTYPE, NULL). The code in test___all__ calls getlocale(), which can subtly alter the locale string and cause the test framework to complain. diff -r eb6eafafdb44 Lib/test/test___all__.py --- a/Lib/test/test___all__.py Sat Jan 14 06:30:37 2017 +0000 +++ b/Lib/test/test___all__.py Sat Jan 14 06:31:13 2017 +0000 @@ -72,17 +72,6 @@ # than an AttributeError somewhere deep in CGIHTTPServer. import _socket - # rlcompleter needs special consideration; it import readline which - # initializes GNU readline which calls setlocale(LC_CTYPE, "")... :-( - import locale - locale_tuple = locale.getlocale(locale.LC_CTYPE) - try: - import rlcompleter - except ImportError: - pass - finally: - locale.setlocale(locale.LC_CTYPE, locale_tuple) - ignored = [] failed_imports = [] lib_dir = os.path.dirname(os.path.dirname(__file__))