[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-11-02 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-11-02 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:


New changeset 723e21a8e79815ae77474d1f21b9847b9c9bdbeb by Lysandros Nikolaou in 
branch '3.9':
bpo-42224: Fix test_format when locale does not expect number grouping 
(GH-23067)
https://github.com/python/cpython/commit/723e21a8e79815ae77474d1f21b9847b9c9bdbeb


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-11-02 Thread miss-islington


miss-islington  added the comment:


New changeset 1e96de9ed4b1ca96d345b7e309a8fe3802638f4a by Miss Skeleton (bot) 
in branch '3.8':
bpo-42224: Fix test_format when locale does not expect number grouping 
(GH-23067)
https://github.com/python/cpython/commit/1e96de9ed4b1ca96d345b7e309a8fe3802638f4a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-11-02 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
pull_requests: +22028
pull_request: https://github.com/python/cpython/pull/23111

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-11-02 Thread Lysandros Nikolaou


Lysandros Nikolaou  added the comment:


New changeset 301822859b3fc34801a06f1090d62f9f2ee5b092 by Lysandros Nikolaou in 
branch 'master':
bpo-42224: Fix test_format when locale does not expect number grouping 
(GH-23067)
https://github.com/python/cpython/commit/301822859b3fc34801a06f1090d62f9f2ee5b092


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-11-02 Thread miss-islington


Change by miss-islington :


--
nosy: +miss-islington
nosy_count: 1.0 -> 2.0
pull_requests: +22027
pull_request: https://github.com/python/cpython/pull/23110

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-10-31 Thread Lysandros Nikolaou


Change by Lysandros Nikolaou :


--
keywords: +patch
pull_requests: +21986
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/23067

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue42224] test_format:test_locale fails when locale does not set grouping in thousands

2020-10-31 Thread Lysandros Nikolaou

New submission from Lysandros Nikolaou :

test_format:test_locale tests for the existence of the thousands separator in a 
formatted number.

However, my locale does not expect/enforce (not sure what the correct term is) 
grouping the number in thousands, which leads to the test (and consequently the 
whole test suite) failing:

➜  cpython git:(test-format-locale-fix) ./python  
Python 3.10.0a1+ (heads/master:3bf0d02f28, Oct 31 2020, 22:42:09) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale(locale.LC_ALL, '')
'LC_CTYPE=en_US.UTF-8;LC_NUMERIC=el_GR.UTF-8;LC_TIME=el_GR.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=el_GR.UTF-8;LC_MESSAGES=en_US.UTF-8;LC_PAPER=el_GR.UTF-8;LC_NAME=el_GR.UTF-8;LC_ADDRESS=el_GR.UTF-8;LC_TELEPHONE=el_GR.UTF-8;LC_MEASUREMENT=el_GR.UTF-8;LC_IDENTIFICATION=el_GR.UTF-8'
>>> format(123456789, 'n')
'123456789'
>>> locale.localeconv()['grouping']
[]

I guess the fix here is to check whether grouping is empty or not in 
test_locale.

--
components: Tests
messages: 380104
nosy: lys.nikolaou
priority: normal
severity: normal
status: open
title: test_format:test_locale fails when locale does not set grouping in 
thousands
type: behavior
versions: Python 3.10

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com