Issue32866
Created on 2018-02-18 02:49 by barry, last changed 2022-04-11 14:58 by admin. This issue is now closed.
| Messages (3) | |||
|---|---|---|---|
| msg312296 - (view) | Author: Barry A. Warsaw (barry) * ![]() |
Date: 2018-02-18 02:49 | |
Over in https://gitlab.com/python-devs/importlib_resources/issues/48 we have a report of a FileNotFoundError when trying to read a resource from a zip file. Upon further debugging, I found that zipimport's loader.get_data() raises an unexpected OSError. Interestingly, if the path to the zip file is absolute, everything works as expected, but if the path is relative, then it fails. There's probably a missing abspath() in there somewhere, but as zipimport is written in C, I really didn't spend much time digging around in gdb. |
|||
| msg325727 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * ![]() |
Date: 2018-09-19 07:36 | |
zipimport has been rewritten in pure Python (issue25711). |
|||
| msg333893 - (view) | Author: Barry A. Warsaw (barry) * ![]() |
Date: 2019-01-17 18:39 | |
I believe this bug does not affect Python 3.8: (Using a Python 3.8 virtualenv): % python demo.pyz Reading: resource.txt Length: 19 % python `pwd`/demo.pyz Reading: resource.txt Length: 19 I think it's too risky (and too much work, given it would have to be ported to the C implementation of zipimport) to change this in earlier Pythons. So, closing. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:57 | admin | set | github: 77047 |
| 2019-01-17 18:40:01 | nnja | set | nosy:
+ nnja |
| 2019-01-17 18:39:23 | barry | set | status: open -> closed versions: - Python 3.6, Python 3.7 messages: + msg333893 resolution: works for me |
| 2018-09-19 07:36:02 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg325727 |
| 2018-02-18 02:49:21 | barry | create | |
