From 64ba81e8fa4779fb92baa960039eba4b3f879bf0 Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Tue, 8 Aug 2023 10:05:10 -0700 Subject: [PATCH] tests: Update unicode test to remove deprecated resetlocale locale.resetlocale will be removed in Python 3.13, so replace it with a call to setlocale instead. --- tests/handle_unicode.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/handle_unicode.py b/tests/handle_unicode.py index 1889c004..820c8181 100644 --- a/tests/handle_unicode.py +++ b/tests/handle_unicode.py @@ -23,7 +23,7 @@ def runTest(self): # pylint: disable=environment-modify # Make sure the locale is reset so that the traceback could happen del os.environ["LANG"] - locale.resetlocale() + locale.setlocale(locale.LC_ALL, "") # parser should parse string including non-ascii characters self.parser.readKickstartFromString(self.ks)