You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Zip files created by git archive result in a SyntaxError (due to comment?) #66518
bpo-5950: Make zipimport work with zipfile containing comments
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2014-09-01.16:26:14.359>created_at=<Date2014-09-01.15:11:58.076>labels= ['extension-modules', 'type-bug']
title='Zip files created by `git archive` result in a SyntaxError (due to comment?)'updated_at=<Date2014-09-01.16:26:14.357>user='https://github.com/Lekensteyn'
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.
Activity
Lekensteyn commentedon Sep 1, 2014
Files created by
git archiveare 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.zipworks.bitdancer commentedon Sep 1, 2014
You are correct. zipimport does not support zip files with comments. There is already an open issue (bpo-5950) for adding support for this.