[issue25156] shutil.copyfile should internally use os.sendfile when possible

Martin Panter report at bugs.python.org
Sat Oct 31 03:36:33 EDT 2015


Martin Panter added the comment:

I left a few comments. But it might be good if someone more familiar with the APIs could review this.

Have you seen the socket.sendfile() implementation? It’s a bit of a mess, and the circumstances are slightly different, but it may offer partial inspiration. It seems a shame to have two separate high-level sendfile() wrappers, but I guess the use cases are just a little too far apart to be worth sharing much code.

For the test case, it may be worth skipping the test if you run out of disk space. Similar to test_mmap and test_largefile.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue25156>
_______________________________________


More information about the Python-bugs-list mailing list