asdf icon indicating copy to clipboard operation
asdf copied to clipboard

Refactor seekable in `GenericFile`

Open WilliamJamieson opened this issue 4 years ago • 0 comments

The GenericFile class (and its subclasses) in asdf is intended to be a wrapper/handler for io.IOBase derived python objects, which are what python opens files into. These objects are either "seekable" or not, where in the base python object the .seekable() method returns True if it is seekable and False otherwise. Currently, GenericFile and its subclasses default to having .seekable() always be False even when wrapping python io objects which are seekable. This PR changes this behavior so that GenericFile.seekable() defaults to the value of .seekable() value provided by the underlying python object.

WilliamJamieson avatar Apr 05 '22 19:04 WilliamJamieson