Description of problem: After switching the monetary locale to en_GB, python then raises an exception when calling locale.localeconv() Version-Release number of selected component (if applicable): 3.5.2-4.fc25 How reproducible: Every time Steps to Reproduce: 1. Write a python3 script or open the interactive interpreter with "python3" 2. Enter the following import locale locale.setlocale(locale.LC_MONETARY, 'en_GB') locale.localeconv() 3. Observe that python raises an encoding exception Actual results: Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/lib64/python3.5/locale.py", line 110, in localeconv d = _localeconv() UnicodeDecodeError: 'locale' codec can't decode byte 0xa3 in position 0: Invalid or incomplete multibyte or wide character Expected results: A dictionary of locale data similar to (for en_US): {'mon_thousands_sep': ',', 'currency_symbol': '$', 'negative_sign': '-', 'p_sep_by_space': 0, 'frac_digits': 2, 'int_frac_digits': 2, 'decimal_point': '.', 'mon_decimal_point': '.', 'positive_sign': '', 'p_cs_precedes': 1, 'p_sign_posn': 1, 'mon_grouping': [3, 3, 0], 'n_cs_precedes': 1, 'n_sign_posn': 1, 'grouping': [3, 3, 0], 'thousands_sep': ',', 'int_curr_symbol': 'USD ', 'n_sep_by_space': 0}
Happens also on Fedora 23 and Python 3.4.
Note that I managed to reproduce this on Linux Mint 18, so I suspect it's a bug with python itself rather than Fedora's packaging.
I compiled python from source and reproduced the issue as well from the latest 3.6 beta branch, so I believe this should be reported upstream.
(In reply to Charalampos Stratakis from comment #3) > I compiled python from source and reproduced the issue as well from the > latest 3.6 beta branch, so I believe this should be reported upstream. Do you mean that you will report it upstream, or should I do this?
(In reply to Guillaume Pasquet from comment #4) > (In reply to Charalampos Stratakis from comment #3) > > I compiled python from source and reproduced the issue as well from the > > latest 3.6 beta branch, so I believe this should be reported upstream. > > Do you mean that you will report it upstream, or should I do this? Please do it if possible at http://bugs.python.org/ and provide the reproducer there. I did a quick search and didn't find something similar, but it might be system related as well.
(In reply to Charalampos Stratakis from comment #5) > (In reply to Guillaume Pasquet from comment #4) > > (In reply to Charalampos Stratakis from comment #3) > > > I compiled python from source and reproduced the issue as well from the > > > latest 3.6 beta branch, so I believe this should be reported upstream. > > > > Do you mean that you will report it upstream, or should I do this? > > Please do it if possible at http://bugs.python.org/ and provide the > reproducer there. I did a quick search and didn't find something similar, > but it might be system related as well. I have reported the issue on Python's bug tracker: http://bugs.python.org/issue28604
This message is a reminder that Fedora 25 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 25. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '25'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 25 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Still valid. Possible fix upstream waiting to be merged: https://github.com/python/cpython/pull/4174 Will need to test a build with the fix to verify it.
The PR was merged. Probably we should backport it.
This bug appears to have been reported against 'rawhide' during the Fedora 28 development cycle. Changing version to '28'.
(In reply to Miro Hrončok from comment #9) > The PR was merged. Probably we should backport it. Already done [0] but it doesn't fix that particular issue. [0] https://src.fedoraproject.org/rpms/python3/c/40bb48b58479cf1b301b2e5a073d9d07f9c32420?branch=master
This issue seems similar but different than fixed https://bugs.python.org/issue31900 Here the LC_MONETARY locale is different than the LC_CTYPE locale, whereas the fixed bug was when the LC_NUMERIC locale is different than the LC_CTYPE locale. It seems like the bug should be extended for the LC_MONETARY locale. You should open a different issue upstream if you want to see this specific corner case handled properly. Note: The workaround is to use the same locale for LC_MONETARY and LC_CTYPE.
This is fixed in 3.7.2 and 3.6.8, so it should be fixed with the next releases.
python3-3.6.8-1.fc28 python3-docs-3.6.8-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2019-541a12b809
python3-3.6.8-1.fc28, python3-docs-3.6.8-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.