[issue22322] Zip files created by `git archive` result in a SyntaxError (due to comment?)

2014-09-01 Thread R. David Murray

R. David Murray added the comment:

You are correct. zipimport does not support zip files with comments.  There is 
already an open issue (issue 5950) for adding support for this.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Make zipimport work with zipfile containing comments

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue22322] Zip files created by `git archive` result in a SyntaxError (due to comment?)

2014-09-01 Thread Peter Wu

New submission from Peter Wu:

Files created by `git archive` are not understood by the Python interpreter. 
This could be caused by the additional comment (for the commit hash) in the 
file.

echo 'print(1)' > __main__.py
git init && git add __main__.py && git commit -m init
git archive --format=zip HEAD > y.zip
python y.zip

Packing it with `zip x.zip __main__.py && python x.zip` works.

--
components: Extension Modules
messages: 226230
nosy: lekensteyn
priority: normal
severity: normal
status: open
title: Zip files created by `git archive` result in a SyntaxError (due to 
comment?)
type: behavior
versions: Python 2.7, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com