From: Ezio Melotti Date: Sun, 2 Nov 2014 17:08:35 +0000 (+0200) Subject: #22751: fix test___all__ warning about modified environment in the tests. Patch... X-Git-Tag: v3.4.3rc1~370^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8b23f5cc7acd815a3c1d7d36143e6b3bf6347a18;p=thirdparty%2FPython%2Fcpython.git #22751: fix test___all__ warning about modified environment in the tests. Patch by Michael Cetrulo. --- diff --git a/Lib/test/test___all__.py b/Lib/test/test___all__.py index 8cc285f70a5c..e94d984f2b94 100644 --- a/Lib/test/test___all__.py +++ b/Lib/test/test___all__.py @@ -72,13 +72,14 @@ class AllTest(unittest.TestCase): # 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 - import locale except ImportError: pass - else: - locale.setlocale(locale.LC_CTYPE, 'C') + finally: + locale.setlocale(locale.LC_CTYPE, locale_tuple) ignored = [] failed_imports = [] diff --git a/Misc/ACKS b/Misc/ACKS index 1efdab479d4f..f0950ebb0271 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -222,6 +222,7 @@ Per Cederqvist Matej Cepl Carl Cerecke Octavian Cerna +Michael Cetrulo Dave Chambers Pascal Chambon John Chandler