Skip to content

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.

3 participants