-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
CLN: Clean up of locale testing #29883
Conversation
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.
these builds were added a few years ago to ensure that we run correctly in other locales. does this PR change this?
With this PR we still run with the same exact locales as before. Nothing less is being tested, I'm making sure the same works, but also that pandas works when not only the locale is different but also the encoding. |
ok looks fine, ping on green. |
I couldn't find a way to change the terminal encoding in Ubuntu to one different than UTF-8. Leaving this out out this PR. But I think this means that there are no tests in the CI to know if the option This PR seems to properly change the locale (I think the locale stuff currently in master is not actually doing anything). The failures in the CI are tests that only work with an English locale (the error messages are localized, and don't match the ones in tests):
If I'm not wrong, the exceptions come from other libraries (xlrd for example), that localize them. Not sure what's the best solution. @jreback any preference? |
@jreback got this working. This makes the locale builds actually test with different locales. Currently the locale builds don't really change the system locale. |
very nice @datapythonista |
There are couple of things I don't understand from the locale:
it_IT.UTF-8
) but pandas never uses the language (it_IT
) only the encoding (UTF-8
). So, not sure if testing with different locales is being useful.LOCALE_OVERRIDE
seems to add more complexity than value. UnlessLC_ALL
/LANG
are being set afterwards, but I don't think so.LOCALE_OVERRIDE
but doesn't seem to depend on the actual locale of the system. It probably makes more sense to parametrize and test all the locales we want, than use the variable value (when testing locally this test will be more useful).run_tests.sh
that is probably worth converting to an actual test.Addressing these things here, but I may be missing something here. Please let me know if that's the case.