Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue26937

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:the chown() method of the tarfile.TarFile class fails on Android
Type:behaviorStage:resolved
Components:Library (Lib)Versions:Python 3.7, Python 3.6
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To: xdegayeNosy List: Alex.Willmer, lars.gustaebel, python-dev, xdegaye
Priority:normalKeywords:patch

Created on2016-05-03 15:14 byxdegaye, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.

Files
File nameUploadedDescriptionEdit
pwd_grp.patchxdegaye,2016-05-14 11:16review
pwd_grp_2.patchxdegaye,2016-10-30 19:32review
Pull Requests
URLStatusLinkedEdit
PR 552closeddstufft,2017-03-31 16:36
Messages (4)
msg264738 -(view)Author: Xavier de Gaye (xdegaye)*(Python triager)Date: 2016-05-03 15:14
test_tarfile fails on an android emulator running an x86 system image at API level 21.======================================================================                      [0/9481]FAIL: test_extract_with_numeric_owner (test.test_tarfile.NumericOwnerTest)----------------------------------------------------------------------Traceback (most recent call last):  File "/sdcard/org.bitbucket.pyona/lib/python3.6/unittest/mock.py", line 1175, in patched    return func(*args, **keywargs)  File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/test_tarfile.py", line 2483, in test_extract_with_numeric_owner    any_order=True)  File "/sdcard/org.bitbucket.pyona/lib/python3.6/unittest/mock.py", line 856, in assert_has_calls    ) from causeAssertionError: (call('/data/local/tmp/test_python_2938/@test_2938_tmp-tardir/numeric-owner-testfile', 99, 98), call('/data/local/tmp/test_python_2938/@test_2938_tmp-tardir/dir/numeric-owner-testfile', 88, 87)) not all found in call list======================================================================FAIL: test_extractall_with_numeric_owner (test.test_tarfile.NumericOwnerTest)----------------------------------------------------------------------Traceback (most recent call last):  File "/sdcard/org.bitbucket.pyona/lib/python3.6/unittest/mock.py", line 1175, in patched    return func(*args, **keywargs)  File "/sdcard/org.bitbucket.pyona/lib/python3.6/test/test_tarfile.py", line 2503, in test_extractall_with_numeric_owner    any_order=True)  File "/sdcard/org.bitbucket.pyona/lib/python3.6/unittest/mock.py", line 856, in assert_has_calls    ) from causeAssertionError: (call('/data/local/tmp/test_python_2938/@test_2938_tmp-tardir/numeric-owner-testfile', 99, 98), call('/data/local/tmp/test_python_2938/@test_2938_tmp-tardir/dir', 77, 76), call('/data/local/tmp/test_python_2938/@test_2938_tmp-tardir/dir/numeric-owner-testfile', 88, 87)) not all found in call list----------------------------------------------------------------------Ran 426 tests in 5.549sFAILED (failures=2, skipped=80)test test_tarfile failed1 test failed:    test_tarfileTotal duration: 0:00:06
msg265520 -(view)Author: Xavier de Gaye (xdegaye)*(Python triager)Date: 2016-05-14 11:16
On the android-21-x86 emulator:>>> import grpTraceback (most recent call last):File "<stdin>", line 1, in <module>ImportError: dlopen failed: cannot locate symbol "setgrent" referenced by "grp.cpython-36m-i386-linux-gnu.so"...The attached patch fixes the tarfile module to handle the case where the pwd module can be imported and the grp module cannot. With this fix test_tarfile runs without any failure.
msg279744 -(view)Author: Xavier de Gaye (xdegaye)*(Python triager)Date: 2016-10-30 19:32
The chown() method of the tarfile.TarFile class does not attempt to do a chown when pwd is None, even when numeric_owner is True, and although an attempt is made to fall back to tarinfo.gid when getgrnam() fails, or to tarinfo.uid when getgrnam() fails, nothing is done if only one of the grp or pwd modules fails on import.This new patch is similar to the previous one and is more explicit.
msg282770 -(view)Author: Roundup Robot (python-dev)(Python triager)Date: 2016-12-09 08:36
New changesete4e7bc640865 by Xavier de Gaye in branch '3.6':Issue#26937: The chown() method of the tarfile.TarFile class does not fail nowhttps://hg.python.org/cpython/rev/e4e7bc640865New changesetda510d1aa683 by Xavier de Gaye in branch 'default':Issue#26937: Merge 3.6.https://hg.python.org/cpython/rev/da510d1aa683
History
DateUserActionArgs
2022-04-11 14:58:30adminsetgithub: 71124
2017-03-31 16:36:12dstufftsetpull_requests: +pull_request874
2016-12-09 09:14:36xdegayesetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2016-12-09 08:36:23python-devsetnosy: +python-dev
messages: +msg282770
2016-10-30 19:32:39xdegayesetfiles: +pwd_grp_2.patch

assignee:xdegaye
components: - Cross-Build
title: android: test_tarfile fails -> the chown() method of the tarfile.TarFile class fails on Android
versions: + Python 3.7
messages: +msg279744
stage: patch review
2016-05-21 07:06:39xdegayelinkissue26865 dependencies
2016-05-14 11:16:32xdegayesetfiles: +pwd_grp.patch
keywords: +patch
messages: +msg265520
2016-05-03 15:14:27xdegayecreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp