This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: gzip.py seek and tell methods are counter-productive (and seek is broken anyway)
Type: Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: donut
Priority: normal Keywords:

Created on 2001-03-17 17:17 by donut, last changed 2022-04-10 16:03 by admin. This issue is now closed.

Messages (2)
msg3931 - (view) Author: Matthew Mueller (donut) Date: 2001-03-17 17:17
gzip.open returns an object that emulates a file type.  However, it does
not support seeking or telling.  That is not the problem, what is the
problem is that even though it does not support them, it has the methods
there anyway.  This means user code can not easily do a try: ... except:
AttributeError, to test if the object supports these methods.  Instead
it would have to except on IOError, and have no way of knowing if it was
a real file error. (other than the kludge of examing the error string)

Therefore, I believe it would be more correct if these methods were
removed entirely, or at least replace the exception with AttributeError
instead of IOError.

Oh, and if they aren't removed, the seek method should at least accept
an arg since as it is now it will never raise its desired exception
anyway.

msg3932 - (view) Author: Matthew Mueller (donut) Date: 2001-03-17 17:21
Logged In: YES 
user_id=65253

Arrg.. freaking sourceforge and its reloading=resubmitting thing.. sigh.  Why can't they just do the "thank you for submitting page that then redirects you back to the previous location" like everyone else? 
History
Date User Action Args
2022-04-10 16:03:52adminsetgithub: 34180
2001-03-17 17:17:42donutcreate