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年05月03日 09:18 by xdegaye, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| retrofit_osx.patch | xdegaye, 2016年05月13日 09:07 | review | ||
| retrofit_osx_2.patch | xdegaye, 2016年05月13日 11:11 | test description changed | review | |
| retrofit_osx_3.patch | xdegaye, 2016年05月20日 09:08 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft, 2017年03月31日 16:36 | |
| Messages (10) | |||
|---|---|---|---|
| msg264703 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年05月03日 09:18 | |
test_cmd_line fails on an android emulator running an x86 system image at API level 21. ====================================================================== FAIL: test_non_ascii (test.test_cmd_line.CmdLineTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/test_cmd_line.py", line 141, in test_non_ascii assert_python_ok('-c', command) File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/support/script_helper.py", line 135, in assert_python_ok return _assert_python(True, *args, **env_vars) File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/support/script_helper.py", line 121, in _assert_python err)) AssertionError: Process return code is 1 command line: ['/data/local/tmp/python/bin/python', '-X', 'faulthandler', '-I', '-c', "assert(ord('\xe6') == 230)"] stdout: --- --- stderr: --- Unable to decode the command from the command line: UnicodeEncodeError: 'utf-8' codec can't encode characters in position 12-13: surrogates not allowed --- ---------------------------------------------------------------------- Ran 33 tests in 1.943s FAILED (failures=1, skipped=1) test test_cmd_line failed 1 test failed: test_cmd_line Total duration: 0:00:03 |
|||
| msg264800 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年05月04日 10:07 | |
There is a related issue #4388 although different, and issue #22747 may also be related. |
|||
| msg265458 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年05月13日 09:07 | |
This patch follows Victor suggestion in msg230407 and brings the changes made in issue #4388 and issue #16416 to the Android platform. As a consequence, it adds a new test for Android in test_cmd_line named test_osx_android_utf8 (was previously test_osx_utf8). The platform.android_ver() function is defined by issue #26855: "add platform.android_ver() for android". With this patch test_cmd_line does not have any failure. |
|||
| msg265462 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年05月13日 11:11 | |
Patch updated after vadmium review. |
|||
| msg265550 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2016年05月14日 22:50 | |
I commented retrofit_osx_2.patch on the review. |
|||
| msg265916 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年05月20日 09:08 | |
This new patch adds a dependency to issue #27027. |
|||
| msg279803 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年10月31日 16:43 | |
An interactive session confirms that the problem is indeed with the command line arguments of python invoked by subprocess (and the problem is fixed by the patch):
>>> from test.support import FS_NONASCII
>>> cmd = "assert(ord(%r) == %s)" % (FS_NONASCII, ord(FS_NONASCII))
>>> exec(cmd)
>>> import subprocess, sys
>>> subprocess.run([sys.executable, '-c', cmd])
Unable to decode the command from the command line:
UnicodeEncodeError: 'utf-8' codec can't encode characters in position 12-13: surrogates not allowed
CompletedProcess(args=['/data/data/org.bitbucket.pyona/python/bin/python', '-c', "assert(ord('\xe6') == 230)"], returncode=1)
|
|||
| msg283340 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年12月15日 19:41 | |
The patch fixes also the following errors in test_warnings: ====================================================================== FAIL: test_nonascii (test.test_warnings.CEnvironmentVariableTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_warnings/__init__.py", line 1072, in test_nonascii "['ignore:Deprecaci\xf3nWarning']".encode('utf-8')) AssertionError: b"['ignore:Deprecaci\\udcc3\\udcb3nWarning']" != b"['ignore:Deprecaci\xc3\xb3nWarning']" ====================================================================== FAIL: test_nonascii (test.test_warnings.PyEnvironmentVariableTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/sdcard/org.bitbucket.pyona/lib/python3.7/test/test_warnings/__init__.py", line 1072, in test_nonascii "['ignore:Deprecaci\xf3nWarning']".encode('utf-8')) AssertionError: b"['ignore:Deprecaci\\udcc3\\udcb3nWarning']" != b"['ignore:Deprecaci\xc3\xb3nWarning']" ---------------------------------------------------------------------- |
|||
| msg283341 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年12月15日 20:02 | |
New changeset e5360d413ce4 by Xavier de Gaye in branch '3.6': Issue #26919: On Android, operating system data is now always encoded/decoded https://hg.python.org/cpython/rev/e5360d413ce4 |
|||
| msg283342 - (view) | Author: Xavier de Gaye (xdegaye) * (Python triager) | Date: 2016年12月15日 20:09 | |
Forgot the issue number in the commit message for the default branch, the corresponding changeset is 80a041d39c20. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:30 | admin | set | github: 71106 |
| 2017年03月31日 16:36:20 | dstufft | set | pull_requests: + pull_request937 |
| 2016年12月15日 20:37:29 | xdegaye | set | status: open -> closed resolution: fixed stage: commit review -> resolved |
| 2016年12月15日 20:09:59 | xdegaye | set | messages: + msg283342 |
| 2016年12月15日 20:02:34 | python-dev | set | nosy:
+ python-dev messages: + msg283341 |
| 2016年12月15日 19:41:26 | xdegaye | set | messages: + msg283340 |
| 2016年10月31日 16:54:40 | xdegaye | set | title: android: test_cmd_line fails -> on Android python fails to decode/encode command line arguments |
| 2016年10月31日 16:45:25 | xdegaye | set | assignee: xdegaye stage: commit review components: + Interpreter Core, - Library (Lib), Cross-Build versions: + Python 3.7 |
| 2016年10月31日 16:43:59 | xdegaye | set | messages: + msg279803 |
| 2016年05月21日 07:06:39 | xdegaye | link | issue26865 dependencies |
| 2016年05月21日 06:55:00 | xdegaye | set | dependencies: + add the 'is_android' attribute to test.support |
| 2016年05月20日 09:08:50 | xdegaye | set | files:
+ retrofit_osx_3.patch messages: + msg265916 |
| 2016年05月14日 22:50:57 | vstinner | set | messages: + msg265550 |
| 2016年05月13日 11:11:54 | xdegaye | set | files:
+ retrofit_osx_2.patch messages: + msg265462 |
| 2016年05月13日 09:07:35 | xdegaye | set | files:
+ retrofit_osx.patch keywords: + patch messages: + msg265458 |
| 2016年05月04日 10:07:06 | xdegaye | set | nosy:
+ vstinner messages: + msg264800 |
| 2016年05月03日 09:18:35 | xdegaye | create | |