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月19日 01:04 by zaz600, last changed 2022年04月11日 14:58 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| attach.zip | zaz600, 2016年05月19日 01:04 | bad and good zips | ||
| Messages (2) | |||
|---|---|---|---|
| msg265839 - (view) | Author: zaz600 (zaz600) | Date: 2016年05月19日 01:04 | |
python fails to run zipapp when zip contains comments
when zip archive downloaded from github it contains tip hash in comment.
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32
example:
```
import zipfile
if __name__ == '__main__':
with open('__main__.py', "w") as m:
m.write("print('hello')")
zipf = zipfile.ZipFile('zipapp_bad.zip', 'w', zipfile.ZIP_DEFLATED)
#add zip comment
zipf.comment=b"123321"
zipf.write("__main__.py")
zipf.close()
zipf = zipfile.ZipFile('zipapp_good.zip', 'w', zipfile.ZIP_DEFLATED)
zipf.write("__main__.py")
zipf.close()
```
D:\pywork\zip>python zipapp_good.zip
hello
D:\pywork\zip>python zipapp_bad.zip
File "zipapp_bad.zip", line 1
PK♥♦¶
^
SyntaxError: invalid syntax
|
|||
| msg265848 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2016年05月19日 05:53 | |
This is a duplicate of issue5950. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:58:31 | admin | set | github: 71242 |
| 2016年05月19日 05:53:05 | serhiy.storchaka | set | status: open -> closed superseder: Make zipimport work with zipfile containing comments nosy: + serhiy.storchaka messages: + msg265848 resolution: duplicate stage: resolved |
| 2016年05月19日 01:04:24 | zaz600 | create | |