Skip to content
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

[3.7] bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) #10619

Merged
merged 1 commit into from Nov 20, 2018
Merged

[3.7] bpo-28604: Fix localeconv() for different LC_MONETARY (GH-10606) #10619

merged 1 commit into from Nov 20, 2018

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Nov 20, 2018

locale.localeconv() now sets temporarily the LC_CTYPE locale to the
LC_MONETARY locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.

Changes:

  • locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
    monetary fields.
  • Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
    since it can be replaced anytime if a different thread calls
    localeconv().

https://bugs.python.org/issue28604

locale.localeconv() now sets temporarily the LC_CTYPE locale to the
LC_MONETARY locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.

Changes:

* locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
  monetary fields.
* Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
  since it can be replaced anytime if a different thread calls
  localeconv().

(cherry picked from commit 02e6bf7)
@vstinner vstinner merged commit 6eff6b8 into python:3.7 Nov 20, 2018
@vstinner vstinner deleted the lc_monetary37 branch November 20, 2018 21:06
vstinner added a commit that referenced this pull request Nov 20, 2018
…10619) (GH-10621)

locale.localeconv() now sets temporarily the LC_CTYPE locale to the
LC_MONETARY locale if the two locales are different and monetary
strings are non-ASCII. This temporary change affects other threads.

Changes:

* locale.localeconv() can now set LC_CTYPE to LC_MONETARY to decode
  monetary fields.
* Add LocaleInfo.grouping_buffer: copy localeconv() grouping string
  since it can be replaced anytime if a different thread calls
  localeconv().

(cherry picked from commit 02e6bf7)
(cherry picked from commit 6eff6b8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants