summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-02-19 04:33:50 (GMT)
committerGitHub <noreply@github.com>2017-02-19 04:33:50 (GMT)
commit760f596b6a4b5514afe35e521621f484aef35413 (patch)
tree22157aeb52da970f0dbb7fddfe84ee9730647771 /Misc
parent5e04dfecec478db13031fa507d6b2e21adbce035 (diff)
downloadcpython-760f596b6a4b5514afe35e521621f484aef35413.zip
cpython-760f596b6a4b5514afe35e521621f484aef35413.tar.gz
cpython-760f596b6a4b5514afe35e521621f484aef35413.tar.bz2
[3.5] bpo-29571: Use correct locale encoding in test_re (#149) (#154)
``local.getlocale(locale.LC_CTYPE)`` and ``locale.getpreferredencoding(False)`` may give different answers in some cases (such as the ``en_IN`` locale). ``re.LOCALE`` uses the latter, so update the test case to match.
Diffstat (limited to 'Misc')
-rw-r--r--Misc/NEWS8
1 files changed, 8 insertions, 0 deletions
diff --git a/Misc/NEWS b/Misc/NEWS
index fe50135..c750d5c 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -87,6 +87,14 @@ Documentation
- Issue #29349: Fix Python 2 syntax in code for building the documentation.
+Tests
+-----
+
+- Issue #29571: to match the behaviour of the ``re.LOCALE`` flag,
+ test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to
+ determine the candidate encoding for the test regex (allowing it to correctly
+ skip the test when the default locale encoding is a multi-byte encoding)
+
What's New in Python 3.5.3?
===========================