[issue10016] shutil.copyfile -- allow sparse copying

R. David Murray report at bugs.python.org
Sat Oct 2 17:21:10 CEST 2010


R. David Murray <rdmurray at bitdance.com> added the comment:

You are right that this needs to be tested on other platforms.  In order to so test it (and in any case!), the patch will need unit tests.  It also needs doc updates.

In general patch itself looks good to me, modulo the concern you raise about truncate.  You could move the '\0'*buflen constant outside the loop.  Also, the py3k IO module doesn't define constants for 'seek', the docs just refer to the integers, so it might be best not to use the os constants even though they are equivalent (the new io module is not a wrapper around os functions the way the old file implementation was).

FYI, patches should (currently, pending the hg migration) be against the py3k trunk, and whoever commits it would backport it if appropriate.  In this case, however, it is a new feature and so can only go into py3k trunk.

----------
nosy: +r.david.murray, tarek
versions:  -Python 2.6, Python 2.7

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


More information about the Python-bugs-list mailing list