| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
… a string again This is a follow up of pythonGH-124974. Only Glibc needed a fix. Now the returned value is a string consisting of semicolon-separated symbols on all Posix platforms.
|
@kulikjak, could you please test that the modified test is passed on Solaris? |
Sorry, something went wrong.
|
Hi @serhiy-storchaka, thanks! I tested the patch, and locale.nl_langinfo(locale.ALT_DIGITS) returns the same thing as before (which was the goal), and the tests now pass. 0:00:00 load avg: 1.98 [1/1] test__locale test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) ... test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='ja_JP') ... skipped "ALT_DIGITS is not set for locale 'ja_JP' on this platform" test_alt_digits_nl_langinfo (test.test__locale._LocaleTests.test_alt_digits_nl_langinfo) (locale='or_IN') ... skipped "ALT_DIGITS is not set for locale 'or_IN' on this platform" test_float_parsing (test.test__locale._LocaleTests.test_float_parsing) ... ok test_lc_numeric_basic (test.test__locale._LocaleTests.test_lc_numeric_basic) ... ok test_lc_numeric_localeconv (test.test__locale._LocaleTests.test_lc_numeric_localeconv) ... ok test_lc_numeric_nl_langinfo (test.test__locale._LocaleTests.test_lc_numeric_nl_langinfo) ... ok There is currently no locale in known_alt_digits that has ALT_DIGITS set on Solaris, so I added the following two: 'ar_AE.UTF-8': (100, {0: '\u0660', 10: '\u0661\u0660', 99: '\u0669\u0669'}),
'bn_IN.UTF-8': (100, {0: '\u09e6', 10: '\u09e7\u09e6', 99: '\u09ef\u09ef'}),
(and adjusted those two in candidate_locales to include the *.UTF-8 suffix). |
Sorry, something went wrong.
|
Is not ar_AE equivalent to ar_AE.UTF-8? |
Sorry, something went wrong.
Unfortunately not. Mostly due to historical reasons, default locales on Solaris are not UTF-8. And I guess that for similar reasons, only the UTF-8 variants of these two include ALT_DIGITS. |
Sorry, something went wrong.
|
Uh, so with this second change I found that 'ja_JP.PCK' on Solaris returns 101 symbols. At least those three tested match, which is nice. The standard allows max 100, but considering that the last value is a new symbol (and not just a concatenation of those before), I can see why it is there. That said, I propose removing 'ja_JP.PCK' from tested locales (I don't think PCK is available on other platforms anyway). |
Sorry, something went wrong.
|
Thank you for your help @kulikjak. |
Sorry, something went wrong.
|
Thanks @serhiy-storchaka for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
Sorry, something went wrong.
… a string again (pythonGH-125774) This is a follow up of pythonGH-124974. Only Glibc needed a fix. Now the returned value is a string consisting of semicolon-separated symbols on all Posix platforms. (cherry picked from commit dcc4fb2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
… a string again (pythonGH-125774) This is a follow up of pythonGH-124974. Only Glibc needed a fix. Now the returned value is a string consisting of semicolon-separated symbols on all Posix platforms. (cherry picked from commit dcc4fb2) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
|
GH-125804 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
|
GH-125805 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
… a string again (pythonGH-125774) This is a follow up of pythonGH-124974. Only Glibc needed a fix. Now the returned value is a string consisting of semicolon-separated symbols on all Posix platforms.
| Back | FazBrowse Home | New Git URL |
This is a follow up of GH-124974. Only Glibc needed a fix. Now the returned value is a string consisting of semicolon-separated symbols on all Posix platforms.
📚 Documentation preview 📚: https://cpython-previews--125774.org.readthedocs.build/