[issue6759] zipfile.ZipExtFile.read() is missing universal newline support

Art Gillespie report at bugs.python.org
Wed Aug 26 19:08:16 CEST 2009


Art Gillespie <agillesp at gmail.com> added the comment:

Hi Ryan,

Thanks for the feedback.

I've attached a new patch that fixes the read(nbytes) behavior--It will
now always return the requested number of bytes regardless of newline
replacement.  There's now a unit test for this as well.

I also added the newlines attribute per PEP 278 and a corresponding test.

I'm not sure I understood David's comment that read_test needed to be
turned into a unit test:  it's called by several of the unit tests
(test_read_stored, test_read_deflated, et. al.) in that class.

----------
Added file: http://bugs.python.org/file14784/issue6759_2.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6759>
_______________________________________


More information about the Python-bugs-list mailing list