-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
bpo-31900: Fix decimal for LC_NUMERIC != LC_CTYPE #5191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@skrah: So, what do you think? |
skrah
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The patched version introduces errors in deccheck.py. The formatting code is tricky, which is why I wasn't too enthusiastic about the patch to begin with.
I'd prefer to do nothing here.
|
When you're done making the requested changes, leave the comment: |
Fix decimal.Decimal formatter when the LC_NUMERIC locale encoding is different than the LC_CTYPE encoding: reuse _Py_GetLocaleconvNumeric() to decode localeconv() correctly, set tempoarily setlocale() if needed. Add mpd_spec_t.locale field.
Oh. My type == 'n' test doesn't work, libmpdec replaces 'n' with 'g'. I don't know how I missed this. I modified my PR to add a new mpd_spec_t.locale field. |
|
I have made the requested changes; please review again. |
|
Thanks for making the requested changes! @skrah: please review the changes made to this pull request. |
|
@skrah: I fixed my obvious mistake. Would you mind to look again to my change? Is it now ok to merge it? |
|
@vstinner I'll look at it when I have time. I still think this is nice-to-have, but very low priority. |
Fix decimal.Decimal formatter when the LC_NUMERIC locale encoding is
different than the LC_CTYPE encoding: reuse
_Py_GetLocaleconvNumeric() to decode localeconv() correctly, set
tempoarily setlocale() if needed.
https://bugs.python.org/issue31900