chunk_size
for iter_lines()
versus iter_content()
#597
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Seriously, I think you should merge this one. The latest release and the
develop
branch still have the defaultchunk_size
"reversed" foriter_content()
anditer_lines()
contrarilly to what you mentioned here: https://github.com/kennethreitz/requests/pull/589#issuecomment-5567553This pull request may be canned by Travis CI again, but as I mentioned in the above pull request, the issue is located either in the test logic or the way lines ending in
\r\n
initer_lines()
depending how you interpret the issue... (I think the later is the real problem as even without changingchunk_size
,iter_lines()
could return different results for the same input depending on where the line-ending ends inside the buffer read byiter_content()
). Not knowing how you perceive the issue, I did not attempt to fix it.----- Original idea:
Following discussion about issue #539 Kenneth agreed that a default
chunk_size
of 1 foriter_lines()
would make more sense, butapparently changed
chunk_size
foriter_content()
by mistakeinstead, which did solve the
iter_lines()
issue but also changed thedefault
iter_content()
chunk to 1 bytes which is not desirable.