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
on Android _bootlocale on startup relies on too many library modules #72782
Comments
Android does not have langinfo.h and this results in _bootlocale importing locale on startup (see bpo-26928). IMHO it is not acceptable to fallback to locale.py if CODESET is not available (in answer to Victor question in msg199367), because there are now two code paths to investigate weird bugs such as the one described by Antoine in bpo-9548. Also note that Android platforms have a slow processor and limited RAM size, so they would strongly benefit from a startup sequence avoiding the imports made by the locale module. Since there is already a _bootlocale module, what are now the objections to implement the patch Antoine has proposed in bpo-9548 ? Nosying people from bpo-9548. |
Version 2 - use sys.implementation._multiarch to determine whether it's Android or not |
I created the issue bpo-28740: Add sys.getandroidapilevel(). |
Patch version 3, using sys.getandroidapilevel() |
Thanks Victor. Here's new patch, which uses hasattr |
android-locale-utf8.patch LGTM, but I added minor comments on the review. I would prefer to let Xavier merges this one, since he can test it. |
This is a performance issue. I will look at it shortly. |
Patch version 5, updated comments. Thanks for all of those feedbacks :) |
New changeset 1756beed417c by Xavier de Gaye in branch 'default': |
Closing the issue. Thanks for the patch Chi Hsuan Yen. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: