[issue18323] 'GzipFile' object has no attribute 'extrastart'

2018-07-11 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
type: crash -> behavior

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2015-05-17 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

As a workaround specify mode='r' for GzipFile.

--

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-08-25 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

We can add in readline() the check that GzipFile is opened in read mode. 
However it will slowdown readline(). See alse issue18003.

Note that the original example is not correct. zlib.compress() doesn't produce 
legal Gzip file.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-08-25 Thread Gökcen Eraslan

Changes by Gökcen Eraslan :


--
nosy: +gkcn

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread R. David Murray

R. David Murray added the comment:

On the other hand, it seems reasonable to be able to read if you've done a 
seek(0), so a more complicated fix may also be appropriate.

--

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread R. David Murray

R. David Murray added the comment:

Based on a quick glance at the code, the problem isn't that you are passing 
fileobj, it is that fileobj has been opened for writing, not reading, and you 
are attempting to read from it.  extrastart (and other attibutes) are only set 
if mode starts with 'r'.

There is certainly a bug here, but it might just be that a clearer error should 
be generated if you try to read a fileobj open for writing.

--
nosy: +r.david.murray

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +nadeem.vawda

___
Python tracker 

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



[issue18323] 'GzipFile' object has no attribute 'extrastart'

2013-06-28 Thread Laurent Gautier

New submission from Laurent Gautier:

When creating a `gzip.GzipFile` using the named parameter `fileobj`
rather than filename, iterating over it is broken:
```
AttributeError: 'GzipFile' object has no attribute 'extrastart'
```

The short example below is demonstrating the problem:

## ---

import gzip, tempfile
_data = (b'@WXOVW:25:85', b'ATACGCGGCT'+b'GATCGTAGCG',
 b'+',
 b'@@))BB'+b'???ECCEECC')

data = gzip.zlib.compress(b'\n'.join(_data))
foo = tempfile.NamedTemporaryFile()
foo.write(data)
foo.flush()
foo.seek(0)

gzf = gzip.GzipFile(fileobj=foo)

# this will trigger the AttributeError
for x in gzf:
print(x)

--
components: Library (Lib)
messages: 191989
nosy: Laurent.Gautier
priority: normal
severity: normal
status: open
title: 'GzipFile' object has no attribute 'extrastart'
type: crash
versions: Python 2.7

___
Python tracker 

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