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

2017-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Support of the 'U' mode is removed in 3.6 (issue27029). -- resolution: -> out of date stage: needs patch -> resolved status: open -> closed ___ Python tracker ___

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

2014-08-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Mode 'U' is deprecated now (issue15204). -- ___ Python tracker ___ ___ Python-bugs-list mailing lis

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

2014-02-03 Thread Mark Lawrence
Changes by Mark Lawrence : -- nosy: -BreamoreBoy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

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

2012-05-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I know how to remove universal newline support, I know how after this correct these functions (with issue14371 they partially corrected), but I don't know how to deprecate universal newline support. What should be done? Can you initiate a discussion in Python-

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

2012-04-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > It may be worth to deprecate PEP 278? Oh, only ten years have passed > since 2.3, but it seems it was so long ago. Well, I don't know if PEPs ever get deprecated. In this case, PEP 3116 is probably the superseder. -- ___

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

2012-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > This would be fine with me. It may be worth to deprecate PEP 278? Oh, only ten years have passed since 2.3, but it seems it was so long ago. -- ___ Python tracker ___

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

2012-04-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Deprecate universal newline support in zipfile. zipfile.ZipExtFile > should always work with non-modified bytes, and who need the text, let > wraps zipfile.ZipExtFile with io.TextIOWrapper. This would be fine with me. -- nosy: +pitrou stage: patch r

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

2012-04-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Support lines in zipfile looks contradictory and buggy. This complicates the code and makes the behavior of zipfile.ZipExtFile incompatible with the interface of other file-like objects. For example, the behavior of the read, read1 and peek differ from one

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

2010-07-24 Thread R. David Murray
R. David Murray added the comment: Well, you could try applying the patch and see if it applies cleanly and passes the tests. But it would be helpful to have it reworked for py3k, since we now commit first to py3k and then backport to 2.7. I have not reviewed the updated patch. --

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

2010-07-24 Thread Mark Lawrence
Mark Lawrence added the comment: @Art: @David: A lot of changes have been made to test_zipfile since the last patch was produced. I'm unsure as to whether the patch could be applied to 2.7 as is, or it would be simpler to rework the patch for 2.7 and the py3k branches. Could one of you take

[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 return the rem

[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 ___ ___

[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 that when the fi

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

2009-08-26 Thread R. David Murray
R. David Murray added the comment: Thanks for working on this. Comments on patch: (1) I think you should retain the full "ugly check" comment explaining how the \r\n spanning a buffer is handled. I think that's a helpful explanation for a non-obvious piece of code. (2) Your code for setting

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

2009-08-26 Thread R. David Murray
R. David Murray added the comment: My apologies, I misread the patch. -- stage: test needed -> patch review ___ Python tracker ___ ___

[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 the newlines at

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

2009-08-26 Thread R. David Murray
R. David Murray added the comment: The python version of the io module does (_pyio.py). I've set the stage to 'test needed' because the test needs to be turned into a unit test. -- nosy: +r.david.murray priority: -> normal stage: -> test needed versions: +Python 2.7, Python 3.1, Pyth

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

2009-08-25 Thread Ryan Leslie
Ryan Leslie added the comment: Hi Art, Thanks for working on this. I've taken a look at the patch. The fix to read_test looks correct. Of course, I would consider a more descriptive variable name than 'b'. The changes to read() are an improvement, but I think we need to be careful when we rep

[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: ->

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

2009-08-21 Thread Ryan Leslie
New submission from Ryan Leslie : The zipfile.ZipFile.open() behavior with mode 'U' or 'rU' is not quite as advertised in http://docs.python.org/library/zipfile.html#zipfile.ZipFile.open Here is an example: $ echo -ne "This is an example\r\nWhich demonstrates a problem\r\nwith ZipFile.open(...