[issue35163] locale: setlocale(..., 'eo') sets non-existing locale

2020-01-07 Thread Carmen Bianca Bakker


Change by Carmen Bianca Bakker :


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

___
Python tracker 

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



[issue35163] locale: setlocale(..., 'eo') sets non-existing locale

2018-11-04 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +lemburg

___
Python tracker 

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



[issue35163] locale: setlocale(..., 'eo') sets non-existing locale

2018-11-04 Thread Carmen Bianca Bakker


New submission from Carmen Bianca Bakker :

See the following script:

>>> import locale
>>> locale.setlocale(locale.LC_ALL, 'eo')
'eo'
>>> my_locale = locale.getlocale()
>>> my_locale
('eo_XX', 'ISO8859-3')
>>> locale.setlocale(locale.LC_ALL, my_locale)
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib64/python3.7/locale.py", line 604, in setlocale
return _setlocale(category, locale)
locale.Error: unsupported locale setting


'eo_XX.ISO8859-3' does not exist on Fedora 29 or Debian Stretch. The only 
Esperanto locales that exists are 'eo' and 'eo.utf8'.  Even so, locale.py 
defines the Esperanto locales as follows:

'eo':   'eo_XX.ISO8859-3',
'eo.utf8':  'eo.UTF-8',
'eo_eo':'eo_EO.ISO8859-3',
'eo_us.utf8':   'eo_US.UTF-8',
'eo_xx':'eo_XX.ISO8859-3',

eo_EO used to exist on Debian in the early 2000s, and eo_XX on some other 
distributions.  Since glibc 2.24 upstreamed Esperanto, however, it has been 
'eo[.utf8]'.

I'm not sure whether 'eo_eo', 'eo_us' and/or 'eo_xx' should be removed as keys, 
but 'eo' should have 'eo.UTF-8' as value.

--
components: Library (Lib)
messages: 329235
nosy: carmenbianca
priority: normal
severity: normal
status: open
title: locale: setlocale(..., 'eo') sets non-existing locale
versions: Python 3.7

___
Python tracker 

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