FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12099) by miss-islington · Pull Request #12108 · python/cpython · GitHub

Repository navigation

[3.7] bpo-29571: Fix test_re.test_locale_flag() (GH-12099) - #12108

Closed
miss-islington wants to merge 1 commit into
python:3.7from
miss-islington:backport-ab71f8b-3.7
Closed

miss-islington wants to merge 1 commit into
python:3.7from
miss-islington:backport-ab71f8b-3.7

Conversation

miss-islington commented Feb 28, 2019 •
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Use locale.getpreferredencoding() rather than locale.getlocale() to
get the locale encoding. With some locales, locale.getlocale()
returns the wrong encoding.

For example, on Fedora 29, locale.getlocale() returns ISO-8859-1
encoding for the "en_IN" locale, whereas
locale.getpreferredencoding() reports the correct encoding: UTF-8.
(cherry picked from commit ab71f8b)

Co-authored-by: Victor Stinner vstinner@redhat.com

https://bugs.python.org/issue29571

Use locale.getpreferredencoding() rather than locale.getlocale() to
get the locale encoding. With some locales, locale.getlocale()
returns the wrong encoding.

For example, on Fedora 29, locale.getlocale() returns ISO-8859-1
encoding for the "en_IN" locale, whereas
locale.getpreferredencoding() reports the correct encoding: UTF-8.
(cherry picked from commit ab71f8b)

Co-authored-by: Victor Stinner <vstinner@redhat.com>

Copy link
Copy Markdown
Member

Please don't merge this backport yet. Please wait until the modified test_re is run on Windows buildbot workers to ensure that it works as expected.

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a failure ❌ .

1 similar comment

Copy link
Copy Markdown
Contributor Author

@vstinner: Status check is done, and it's a failure ❌ .

vstinner commented Mar 5, 2019

Copy link
Copy Markdown
Member

A trivial backport doesn't work. I wrote PR #12178 to implement the proper fix.

vstinner closed this Mar 5, 2019
miss-islington deleted the backport-ab71f8b-3.7 branch March 5, 2019 12:45
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review tests Tests in the Lib/test dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL