homepage

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.

Author zaz600
Recipients zaz600
Date 2016年05月19日.01:04:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1463619864.57.0.781907137117.issue27055@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2016年05月19日 01:04:24zaz600setrecipients: + zaz600
2016年05月19日 01:04:24zaz600setmessageid: <1463619864.57.0.781907137117.issue27055@psf.upfronthosting.co.za>
2016年05月19日 01:04:24zaz600linkissue27055 messages
2016年05月19日 01:04:23zaz600create

AltStyle によって変換されたページ (->オリジナル) /