This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2016年11月03日 09:48 by xdegaye, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| android-locale-utf8.patch | yan12125, 2016年11月18日 15:51 | review | ||
| android-locale-utf8.patch | yan12125, 2016年11月18日 17:47 | Patch version 2 | review | |
| android-locale-utf8.patch | yan12125, 2016年12月04日 13:35 | Patch version 3 | review | |
| android-locale-utf8.patch | yan12125, 2016年12月05日 06:17 | Patch version 4 | review | |
| android-locale-utf8.patch | yan12125, 2016年12月07日 11:07 | Patch version 5 | review | |
| Messages (11) | |||
|---|---|---|---|
| msg279981 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年11月03日 09:48 | |
Android does not have langinfo.h and this results in _bootlocale importing locale on startup (see issue 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 issue 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 issue 9548 ? Nosying people from issue 9548. |
|||
| msg281131 - (view) | Author: (yan12125) * | Date: 2016年11月18日 15:51 | |
Here's my try: force UTF-8 on Android as explained in msg281110. sys.getfilesystemencoding() is already UTF-8 since issue22747. Testing: 1. Starting up time 0.18~0.19s => 0.11~0.12s, on Android 6.0, ASUS ZE500KL (Qualcomm MSM8916 QuadCore 1.2GHz) 2. test_site passes |
|||
| msg281153 - (view) | Author: (yan12125) * | Date: 2016年11月18日 17:47 | |
Version 2 - use sys.implementation._multiarch to determine whether it's Android or not |
|||
| msg281170 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年11月18日 21:27 | |
I created the issue #28740: Add sys.getandroidapilevel(). |
|||
| msg282339 - (view) | Author: (yan12125) * | Date: 2016年12月04日 13:35 | |
Patch version 3, using sys.getandroidapilevel() |
|||
| msg282386 - (view) | Author: (yan12125) * | Date: 2016年12月05日 06:17 | |
Thanks Victor. Here's new patch, which uses hasattr |
|||
| msg282481 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年12月05日 22:54 | |
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. |
|||
| msg282505 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年12月06日 07:41 | |
This is a performance issue. I will look at it shortly. |
|||
| msg282616 - (view) | Author: (yan12125) * | Date: 2016年12月07日 11:07 | |
Patch version 5, updated comments. Thanks for all of those feedbacks :) |
|||
| msg283472 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年12月17日 08:20 | |
New changeset 1756beed417c by Xavier de Gaye in branch 'default': Issue #28596: The preferred encoding is UTF-8 on Android. https://hg.python.org/cpython/rev/1756beed417c |
|||
| msg283475 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年12月17日 08:38 | |
Closing the issue. Thanks for the patch Chi Hsuan Yen. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:39 | admin | set | github: 72782 |
| 2017年03月31日 23:33:26 | admin | set | pull_requests: - pull_request1113 |
| 2017年03月31日 23:33:06 | ezio.melotti | set | pull_requests: + pull_request1113 |
| 2017年03月31日 23:23:42 | ezio.melotti | set | pull_requests: - pull_request1113 |
| 2017年03月31日 23:12:21 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2017年03月31日 16:36:39 | dstufft | set | pull_requests: + pull_request1113 |
| 2016年12月17日 08:39:00 | xdegaye | set | status: open -> closed resolution: fixed messages: + msg283475 stage: patch review -> resolved |
| 2016年12月17日 08:20:06 | python-dev | set | messages: + msg283472 |
| 2016年12月07日 11:07:39 | yan12125 | set | files:
+ android-locale-utf8.patch messages: + msg282616 |
| 2016年12月06日 07:41:22 | xdegaye | set | messages: + msg282505 |
| 2016年12月05日 22:54:32 | vstinner | set | messages: + msg282481 |
| 2016年12月05日 06:17:47 | yan12125 | set | files:
+ android-locale-utf8.patch messages: + msg282386 |
| 2016年12月04日 13:35:00 | yan12125 | set | files:
+ android-locale-utf8.patch messages: + msg282339 |
| 2016年12月03日 16:42:30 | xdegaye | set | assignee: xdegaye stage: needs patch -> patch review type: behavior -> performance versions: - Python 3.6 |
| 2016年11月18日 21:27:03 | vstinner | set | messages: + msg281170 |
| 2016年11月18日 17:59:49 | pitrou | set | nosy:
- pitrou |
| 2016年11月18日 17:47:32 | yan12125 | set | files:
+ android-locale-utf8.patch messages: + msg281153 |
| 2016年11月18日 15:51:44 | yan12125 | set | files:
+ android-locale-utf8.patch nosy: + yan12125 messages: + msg281131 keywords: + patch |
| 2016年11月03日 09:59:10 | xdegaye | link | issue26865 dependencies |
| 2016年11月03日 09:48:40 | xdegaye | create | |