Kevin Hendricks added the comment:
Thanks for letting me know this was expected behaviour. I see the same "issue"
holds true while using:
for c in b'0123456789':
print(ord(c))
I ended up using slices nearly everyplace. Still ran into iterator issues.
Horrible hack
New submission from Kevin Hendricks:
Hi,
I am working on porting my ebook code from Python 2.7 to work with both Python
2.7 and Python 3.4 and have found the following inconsistency I think is a bug
...
KevinsiMac:~ kbhend$ python3
Python 3.4.1 (v3.4.1:c0e311e010fc, May 18 2014, 00:54:21
Kevin Hendricks added the comment:
Been programming on unix/vax and then linux since the mid 80s and on punch
cards in the late 70s. Grew my first beard writing 8080 and Z80 assembler.
All of that was over 30 years ago.
All I want to do is report a damn bug!
Then I get nudged for a test
Kevin Hendricks added the comment:
I have not looked at how other tools handle this. They could simply ignore
what comes after a valid endrecdata is found, they could strip it out (truncate
it) or make it into a final comment. I guess for simply unpacking a zip
archive, all of these are
Kevin Hendricks added the comment:
Final patches against the trees make no sense as no developer has decided which
way they want to actually handle the problem.
My patch is only one way and I note it may not be the way the owners of the
code want.
Also, this patch is very straight forward
Kevin Hendricks added the comment:
Same problem exists in Python 3.1.3 and in later versions as well.
Same patch should also work.
--
versions: +Python 3.1, Python 3.2
___
Python tracker
<http://bugs.python.org/issue10
Changes by Kevin Hendricks :
--
keywords: +patch
versions: +Python 2.5, Python 2.6
Added file: http://bugs.python.org/file20040/more_robust.diff
___
Python tracker
<http://bugs.python.org/issue10
Kevin Hendricks added the comment:
Here is one potential patch. It simply incorporates and non-comment extraneous
data into a final comment so that nothing is lost. Another solution that might
be safer, would be to truncate the zip archive immediately after the endrec is
found if the
Kevin Hendricks added the comment:
If you read the bug report it explains how to generate a testcase (i.e. append
any data to the end of a zip archive)
Here it is as a step by step process
1. simply take any working zip and call it testcase.zip
2. do the following:
echo "
New submission from Kevin Hendricks :
The current version of zipfile.py is not robust to slight errors at the end of
zip archives. Many file servers **improperly** append a new line to the end of
files that do not have a new line when they are uploaded from a browser. This
bug ends up
10 matches
Mail list logo