homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients vstinner
Date 2019年09月30日.13:14:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1569849277.36.0.00648751871696.issue38324@roundup.psfhosted.org>
In-reply-to
Content
On Windows 10 version 1903, 3 locale tests fail:
vstinner@WIN C:\vstinner\python3円.8>python -m test -v test_locale test__locale
======================================================================
ERROR: test_getsetlocale_issue1813 (test.test_locale.TestMiscellaneous)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "C:\vstinner\python3円.8\lib\test\test_locale.py", line 567, in test_getsetlocale_issue1813
 locale.setlocale(locale.LC_CTYPE, loc)
 File "C:\vstinner\python3円.8\lib\locale.py", line 608, in setlocale
 return _setlocale(category, locale)
locale.Error: unsupported locale setting
======================================================================
ERROR: test_float_parsing (test.test__locale._LocaleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "C:\vstinner\python3円.8\lib\test\test__locale.py", line 184, in test_float_parsing
 if localeconv()['decimal_point'] != '.':
UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: decoding error
======================================================================
ERROR: test_lc_numeric_localeconv (test.test__locale._LocaleTests)
----------------------------------------------------------------------
Traceback (most recent call last):
 File "C:\vstinner\python3円.8\lib\test\test__locale.py", line 130, in test_lc_numeric_localeconv
 formatting = localeconv()
UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: decoding error
test_float_parsing() fails for locales:
* "ka_GE"
* "fr_FR.UTF-8"
test_lc_numeric_localeconv() fails for locales:
* 'ka_GE'
* 'fr_FR.UTF-8'
* 'ps_AF'
test_getsetlocale_issue1813() fails with:
 testing with ('tr_TR', 'ISO8859-9')
Example:
vstinner@WIN C:\vstinner\python3円.8>python
Running Release|x64 interpreter...
Python 3.8.0b4+ (heads/pr/16490:8a204fd07c, Sep 30 2019, 14:29:53) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_CTYPE, 'tr_TR')
'tr_TR'
>>> loc=locale.getlocale(locale.LC_CTYPE) 
>>> loc
('tr_TR', 'ISO8859-9')
>>> locale.setlocale(locale.LC_CTYPE, loc) 
Traceback (most recent call last):
 File "<stdin>", line 1, in <module>
 File "C:\vstinner\python3円.8\lib\locale.py", line 608, in setlocale
 return _setlocale(category, locale)
locale.Error: unsupported locale setting
# It works using the low-level _locale module
# which doesn't parse setlocale() output
>>> import _locale 
>>> _locale.setlocale(_locale.LC_CTYPE, None) 
'tr_TR'
>>> locale.setlocale(locale.LC_CTYPE, "tr_TR") 
'tr_TR'
History
Date User Action Args
2019年09月30日 13:14:37vstinnersetrecipients: + vstinner
2019年09月30日 13:14:37vstinnersetmessageid: <1569849277.36.0.00648751871696.issue38324@roundup.psfhosted.org>
2019年09月30日 13:14:37vstinnerlinkissue38324 messages
2019年09月30日 13:14:37vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /