[issue32529] Call readinto in shutil.copyfileobj

2018-01-17 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> rejected ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue32529] Call readinto in shutil.copyfileobj

2018-01-17 Thread YoSTEALTH
Change by YoSTEALTH : -- stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
YoSTEALTH added the comment: here is the links to benchmark: https://repl.it/@altendky/timeit-of-proposed-shutilfileobjcopy https://gist.github.com/altendky/ff5ccee2baf9822dce69ae8aa66a0fdf https://paste.pound-python.org/show/urORPXztcbDlqXKTORAj/ # time ./file.py the problem is th

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread Christian Heimes
Christian Heimes added the comment: I already blocked the PR with a request for benchmarks and proper tests. -- nosy: +christian.heimes ___ Python tracker ___ _

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Please provide benchmark results to demonstrate the benefits of this change. -- nosy: +serhiy.storchaka ___ Python tracker ___ _

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
Change by YoSTEALTH : -- pull_requests: +5014 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
YoSTEALTH added the comment: Ok, updated the patch to account for: - improved memory usage for bytes io using readinto - still supporting negative length - potential encoding mismatch bug fix while using text io did i miss anything? -- ___ Python tr

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
Change by YoSTEALTH : -- pull_requests: -5004 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
Change by YoSTEALTH : -- keywords: +patch pull_requests: +5013 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue32529] Call readinto in shutil.copyfileobj

2018-01-11 Thread YoSTEALTH
YoSTEALTH added the comment: Martin, your points got me thinking... to make a proper copy of a file, it should be done using bytes! Text IO could easily lead to corrupting your file. for example (current function): with open(old_path, 'r', encoding='latin-1') as fsrc: with open(new

[issue32529] Call readinto in shutil.copyfileobj

2018-01-10 Thread Martin Panter
Martin Panter added the comment: Looks like you want to use a "readinto" method to reduce data copying. One problem is that it is not specified exactly what kind of object "copyfileobj" supports reading from. The documentation only says "file-like". According to the glossary, this means io.Ra