[issue10142] Support for SEEK_HOLE/SEEK_DATA

Jesús Cea Avión report at bugs.python.org
Fri Apr 20 19:30:43 CEST 2012


Jesús Cea Avión <jcea at jcea.es> added the comment:

Terry, yes, skiping the test in the code will raise an error anyway when doing the real "seek()" OS syscall.

> Is there a reason to say (several times) 'can support' instead of
> just 'support'? Do the OSes in question just optionally support
> rather than always support?

Sometimes depends of the concrete filesystem used, or the concrete OS version.

> The first version added: change 'depend of' to 'depend on'.

Done in my repository. Thanks.

> Could import of io create set of valid_whences for system?
> Then check would be "if whence not in valid_whences:" (or C
> equivalent).

This is far from trivial and I don't see the point if OS "seek()" is going to give an error anyway. The only point would to provide a maybe more useful error message.

> In 3.3, unittest has new mock submodule. Perhaps that would help
> testing.

This is a very thin layer over the OS.

Thanks for the feedback.

----------

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


More information about the Python-bugs-list mailing list