Nikolaus Rath added the comment:

Thanks for the feedback! I have attached an updated patch.

I did not include any testcase because the patch did not create any new code 
paths, so I was assuming it'd be covered by the existing test case. But of 
course I was wrong. In the revised patch, I added a testcase based on your 
example of a more complex memoryview.

(Note, however, that even with the previous implementation using nbytes = 
PySequence_Size(input_chunk) this test does not fail, because nbytes is used 
only to estimate the size of the text string).

----------
Added file: http://bugs.python.org/file34690/issue21057.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21057>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to