[ 
https://issues.apache.org/jira/browse/BEAM-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15943269#comment-15943269
 ] 

Tibor Kiss commented on BEAM-778:
---------------------------------

[~katsia...@google.com]: Thanks for the explanation! BZ2 has certainly mislead 
me: fileobj support is only available in Python 3.x. 
It is not possible to implement fileobj support by extending the class under 
Python 2.7 as BZ2 is written as a C module and uses FILE* inside.

Therefore I'll stick with the original design and implement seek() on top of 
that.

> Make fileio._CompressedFile seekable.
> -------------------------------------
>
>                 Key: BEAM-778
>                 URL: https://issues.apache.org/jira/browse/BEAM-778
>             Project: Beam
>          Issue Type: Improvement
>          Components: sdk-py
>            Reporter: Chamikara Jayalath
>            Assignee: Tibor Kiss
>             Fix For: Not applicable
>
>
> We have a TODO to make fileio._CompressedFile seekable.
> https://github.com/apache/incubator-beam/blob/python-sdk/sdks/python/apache_beam/io/fileio.py#L692
> Without this, compressed file objects produce for FileBasedSource 
> implementations may not be able to use libraries that utilize methods seek() 
> and tell().
> For example tarfile.open().



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to