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
Serhiy Storchaka added the comment:
Mode 'U' is deprecated now (issue15204).
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6759
___
___
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6759
___
___
Serhiy Storchaka storch...@gmail.com 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
Serhiy Storchaka storch...@gmail.com 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
Antoine Pitrou pit...@free.fr 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
Serhiy Storchaka storch...@gmail.com 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 rep...@bugs.python.org
Antoine Pitrou pit...@free.fr 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.
--
Mark Lawrence breamore...@yahoo.co.uk 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
R. David Murray rdmur...@bitdance.com 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
R. David Murray rdmur...@bitdance.com 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
Art Gillespie agill...@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
R. David Murray rdmur...@bitdance.com added the comment:
My apologies, I misread the patch.
--
stage: test needed - patch review
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6759
___
R. David Murray rdmur...@bitdance.com 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)
Art Gillespie agill...@gmail.com 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
Art Gillespie agill...@gmail.com added the comment:
Just found another bug in the code that sets the newlines attribute.
Please disregard issue6759_3.diff
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6759
Art Gillespie agill...@gmail.com 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
Ryan Leslie ryle...@gmail.com 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
New submission from Ryan Leslie ryle...@gmail.com:
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
Art Gillespie agill...@gmail.com 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:
20 matches
Mail list logo