[issue5148] gzip.open breaks with 'U' flag

2009-08-27 Thread Art Gillespie
Art Gillespie added the comment: The problem appears to be that the gzip module simply doesn't support universal newlines yet. I'm currently working on the zipfile module's universal newline support (issue6759) so if nobody else is working on this, I'll do it. I'm

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

2009-08-26 Thread Art Gillespie
Art Gillespie added the comment: Latest patch attached. * Fixed the code that populates the newlines attribute. I think I've covered all the cases... * Found another deviation from file object behavior in this module: Calling read with a negative size parameter does not always retur

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

2009-08-26 Thread Art Gillespie
Art Gillespie added the comment: Just found another bug in the code that sets the newlines attribute. Please disregard issue6759_3.diff -- ___ Python tracker <http://bugs.python.org/issue6

[issue6518] Enable 'with' statement in ossaudiodev module

2009-08-26 Thread Art Gillespie
Art Gillespie added the comment: Hi Victor, I copied both the return NULL behavior in oss_exit and the oss_self naming from Objects/fileobject.c: http://paste.pocoo.org/show/136451/ Should they be changed there as well? -- ___ Python tracker

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

2009-08-26 Thread Art Gillespie
Art Gillespie added the comment: Hi David, Thanks for the review. Patch attached. (1) I've moved that comment to the check's new location. (2) Fixed the bug and added tests for only one separator. Also added test data and tests for mixed eol files. (3) I changed this so tha

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

2009-08-26 Thread Art Gillespie
Art Gillespie 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 th

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

2009-08-22 Thread Art Gillespie
Art Gillespie added the comment: Patch for both zipfile.py and test_zipfile.py attached. * The universal newline logic is now in read instead of readline. * UniversalNewlineTests.read_test changed to check for \n rather than unchanged eol. -- keywords: +patch nosy: +agillesp type

[issue6518] Enable 'with' statement in ossaudiodev module

2009-08-21 Thread Art Gillespie
Art Gillespie added the comment: Diff attached * Added the __enter__ and __exit__ methods to the ossaudio object. * Updated tests so they pass (attempt to access ossaudio.closed throws AttributeError instead of TypeError) My first patch. Please let me know if I did anything terrifically