[issue11608] GzipFile cannot be used for streaming

2011-03-20 Thread Ned Deily

Ned Deily  added the comment:

As Ray points out, this feature is now available in Python 3.2. It was not 
backported to Python 2.7 as only bug fixes are now being accepted for Python 
2.x, not new features.

--
nosy: +ned.deily
resolution:  -> duplicate
stage:  -> committed/rejected
status: open -> closed
superseder:  -> gzip.GzipFile to accept stream as fileobj.

___
Python tracker 

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



[issue11608] GzipFile cannot be used for streaming

2011-03-20 Thread Ray.Allen

Ray.Allen  added the comment:

Looks like a duplicate issue of #9664 and #914340. And has been fixed in patch 
of #914340.

--
nosy: +ysj.ray

___
Python tracker 

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



[issue11608] GzipFile cannot be used for streaming

2011-03-20 Thread Nadeem Vawda

Changes by Nadeem Vawda :


--
nosy: +nvawda

___
Python tracker 

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



[issue11608] GzipFile cannot be used for streaming

2011-03-19 Thread Daniel Stutzbach

Changes by Daniel Stutzbach :


--
nosy: +stutzbach

___
Python tracker 

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



[issue11608] GzipFile cannot be used for streaming

2011-03-19 Thread Enrico Zini

New submission from Enrico Zini :

Hello,

this snippet does not work, because GzipFile wants a file-like object that can 
do tell() and seek():

#!/usr/bin/python

import gzip
from urllib import urlopen

zfd = urlopen("http://ftp.debian.org/debian/dists/sid/Contents-udeb.gz";)
fd = gzip.GzipFile(fileobj=zfd, mode="r")
for line in fd:
foobar(line)

It must be possible to build a decompressing file-like object wrapper that can 
do without seeking, since it is obviously not a limitation of gzip 
decompression libraries. It would be extremely useful to have such a thing, as 
shown in the example snippet above.

Some more details (including a very annoying misrepresentation of the issue 
found in Dive Into Python) can be found at 
http://www.enricozini.org/2011/cazzeggio/python-gzip/ (I apologise about the 
ranting tone of the post).

--
components: Library (Lib)
messages: 131427
nosy: enrico
priority: normal
severity: normal
status: open
title: GzipFile cannot be used for streaming
type: behavior
versions: Python 2.5, Python 2.6, Python 3.1

___
Python tracker 

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