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 2015年03月18日 00:58 by vstinner, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| zipimporterror_oserror.patch | vstinner, 2015年03月18日 00:58 | review | ||
| Messages (3) | |||
|---|---|---|---|
| msg238368 - (view) | Author: STINNER Victor (vstinner) * (Python committer) | Date: 2015年03月18日 00:58 | |
To work on the issue #23694, I refactored the C function _Py_fopen_obj() to raise an exception on error. I noticed the that zipimport replaces the current exception with ZipImportError. Attached patch chains the ZipImportError to the OSError to provide more context on error. For example, you can see in the unit test that ZipImportError was caused by a permission error. Is it ok to require ZipImport.__context__ to be an OSError in the unit test? Can it be added to "zipimport spec"? If not, the test may be splitted to only check __context__ in a test decorated with @cpython_only. |
|||
| msg238632 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年03月20日 09:52 | |
New changeset 597a87099713 by Victor Stinner in branch 'default': Issue #23696: Chain ZipImportError to the OSError https://hg.python.org/cpython/rev/597a87099713 |
|||
| msg238660 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2015年03月20日 12:52 | |
New changeset 022d64b503b8 by Victor Stinner in branch 'default': Issue #23696: Remove test on ZipImportError.__context__ because the context is https://hg.python.org/cpython/rev/022d64b503b8 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:14 | admin | set | github: 67884 |
| 2015年03月20日 12:52:20 | python-dev | set | messages: + msg238660 |
| 2015年03月20日 09:58:49 | vstinner | set | status: open -> closed resolution: fixed |
| 2015年03月20日 09:52:34 | python-dev | set | nosy:
+ python-dev messages: + msg238632 |
| 2015年03月18日 13:51:18 | brett.cannon | set | nosy:
+ twouters |
| 2015年03月18日 00:58:16 | vstinner | create | |