From ecb863b29ecaa4cd48679a45e9f9455b1f717f8b Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 20 Jun 2011 22:07:06 +0200 Subject: [PATCH] Revert d370d609d09b as requested by Terry Jan Reedy: "#3067: locale.setlocale() accepts a Unicode locale." --- Lib/locale.py | 2 +- Misc/NEWS | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/Lib/locale.py b/Lib/locale.py index f204b564b9..bb4aa37b29 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -525,7 +525,7 @@ def setlocale(category, locale=None): category may be given as one of the LC_* values. """ - if locale and not isinstance(locale, basestring): + if locale and type(locale) is not type(""): # convert to string locale = normalize(_build_localename(locale)) return _setlocale(category, locale) diff --git a/Misc/NEWS b/Misc/NEWS index d45582894c..2e33e7f5b8 100644 --- a/Misc/NEWS +++ b/Misc/NEWS @@ -16,8 +16,6 @@ Core and Builtins Library ------- -- Issue #3067: locale.setlocale() accepts a Unicode locale. - - Issue #11700: mailbox proxy object close methods can now be called multiple times without error, and _ProxyFile now closes the wrapped file. -- 2.50.1