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年10月15日 09:07 by Silver Fox, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| tarfile_ignore_zeros_auto.patch | serhiy.storchaka, 2016年10月16日 17:16 | review | ||
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 552 | closed | dstufft, 2017年03月31日 16:36 | |
| Messages (4) | |||
|---|---|---|---|
| msg278711 - (view) | Author: Silver Fox (Silver Fox) | Date: 2016年10月15日 09:07 | |
Seems all `tarfile.open` will try all compress method(including `raw`) in random order, and `ignore_zeros` also hide the error during detecting compress method. So `raw` is used if tested before the rigth compress method, which is wrong. But there is no warning that the 2 args can not be used together in docs. |
|||
| msg278767 - (view) | Author: Roland Bogosi (RoliSoft) | Date: 2016年10月16日 12:36 | |
For anyone finding this bug through Google before it is fixed, a workaround could be to monkeypatch the OPEN_METH dict with an OrderedDict: tarfile.TarFile.OPEN_METH = OrderedDict() tarfile.TarFile.OPEN_METH['gz'] = 'gzopen' tarfile.TarFile.OPEN_METH['bz2'] = 'bz2open' tarfile.TarFile.OPEN_METH['xz'] = 'xzopen' tarfile.TarFile.OPEN_METH['tar'] = 'taropen' |
|||
| msg278773 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年10月16日 17:16 | |
Proposed patch fixes the issue. Existing test was passed by accident -- compressed tarfiles were too short for false detecting. |
|||
| msg279740 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2016年10月30日 18:59 | |
New changeset f108e063e299 by Serhiy Storchaka in branch '3.5': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/f108e063e299 New changeset e2dd0f48e643 by Serhiy Storchaka in branch '2.7': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/e2dd0f48e643 New changeset de8e83262644 by Serhiy Storchaka in branch '3.6': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/de8e83262644 New changeset 220c70519958 by Serhiy Storchaka in branch 'default': Issue #28449: tarfile.open() with mode "r" or "r:" now tries to open a tar https://hg.python.org/cpython/rev/220c70519958 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:38 | admin | set | github: 72635 |
| 2017年03月31日 16:36:31 | dstufft | set | pull_requests: + pull_request1046 |
| 2016年10月30日 18:59:50 | serhiy.storchaka | set | status: open -> closed assignee: serhiy.storchaka resolution: fixed stage: patch review -> resolved |
| 2016年10月30日 18:59:06 | python-dev | set | nosy:
+ python-dev messages: + msg279740 |
| 2016年10月16日 17:16:52 | serhiy.storchaka | set | files:
+ tarfile_ignore_zeros_auto.patch nosy: + serhiy.storchaka messages: + msg278773 keywords: + patch stage: patch review |
| 2016年10月16日 12:36:04 | RoliSoft | set | nosy:
+ RoliSoft messages: + msg278767 |
| 2016年10月15日 09:51:33 | serhiy.storchaka | set | nosy:
+ lars.gustaebel versions: + Python 2.7, Python 3.6, Python 3.7, - Python 3.4 |
| 2016年10月15日 09:07:44 | Silver Fox | create | |