[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2018-07-29 Thread Mickaël S .

Change by Mickaël S. :


--
keywords: +patch
pull_requests: +8069
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2018-06-21 Thread Charmander


Change by Charmander <~@charmander.me>:


--
nosy: +charmander

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2017-07-31 Thread Yaron de Leeuw

Yaron de Leeuw added the comment:

_Stream provides seek, but only positive seeking is allowed. Is that considered 
seekable? Also, maybe _Stream should inherit from io.BaseIO. WDYT?

--
nosy: +jarondl

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2017-03-29 Thread Louie Lu

Louie Lu added the comment:

Actually, _Stream does provide seek method, should the seekable just return 
True?

--
nosy: +louielu

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2016-02-27 Thread Ned Deily

Changes by Ned Deily :


--
nosy: +lars.gustaebel

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2016-02-25 Thread Bill Lee

Bill Lee added the comment:

I posted an incomplete traceback by mistake. Here is the whole traceback.

Traceback
=
Traceback (most recent call last):
  File "seekable.py", line 5, in 
print(contentFile.seekable())
  File "/usr/local/lib/python3.5/tarfile.py", line 649, in seekable
return self.fileobj.seekable()
AttributeError: '_Stream' object has no attribute 'seekable'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue26440] tarfile._FileInFile.seekable is broken in stream mode

2016-02-25 Thread Bill Lee

New submission from Bill Lee:

Description
===
With a file object, retrieved by the `extractfile` method of a TarFile object 
opened in stream mode, calling its `seekable` method will raise an 
AttributeError.

How to Reproduce

cat > seekable.py << EOF
import sys
import tarfile
tar = tarfile.open(fileobj=sys.stdin.buffer, mode='r|')
contentFile = tar.extractfile(tar.next())
print(contentFile.seekable())
EOF

tar -cf test.tar seekable.py
python seekable.py < test.tar


Traceback
=
Traceback (most recent call last):
  File "seekable.py", line 5, in 
print(contentFile.seekable())
  File "/usr/local/lib/python3.5/tarfile.py", line 649, in seekable
return self.fileobj.seekable()

How to Fix
==
I think that adding a method seekable(), which always return False, to 
tarfile._Stream will works.

--
components: Library (Lib)
messages: 260866
nosy: Bill Lee
priority: normal
severity: normal
status: open
title: tarfile._FileInFile.seekable is broken in stream mode
type: behavior
versions: Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com