Patches item #1355023, was opened at 2005-11-12 11:55 Message generated for change (Comment added) made by loewis You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1355023&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Modules Group: None >Status: Closed >Resolution: Accepted Priority: 5 Private: No Submitted By: Fredrik Lundh (effbot) Assigned to: Fredrik Lundh (effbot) Summary: support whence argument for GzipFile.seek (bug #1316069) Initial Comment: This adds support for whence=0 and whence=1 to the GzipFile seek method. See www.python.org/sf/1316069 for background. Open questions: Q: can/should whence=2 be supported? Q: if not, should whence=2 give an IOError or a ValueError Q: can patches be attached to bug reports? </F> ---------------------------------------------------------------------- >Comment By: Martin v. Löwis (loewis) Date: 2006-11-12 11:42 Message: Logged In: YES user_id=21627 Thanks for the patch. Committed as r52737. ---------------------------------------------------------------------- Comment By: Georg Brandl (gbrandl) Date: 2006-04-29 15:33 Message: Logged In: YES user_id=849994 Can this be checked in before 2.5a3? ---------------------------------------------------------------------- Comment By: Fredrik Lundh (effbot) Date: 2005-11-13 12:36 Message: Logged In: YES user_id=38376 I'll add a test case and check it in. From what I can tell, no documentation is affected by this change (maybe the gzip documentation should include a full description of what exactly "simulates most of the methods of a file object" really means, but that's a separate issue). ---------------------------------------------------------------------- Comment By: Martin v. Löwis (loewis) Date: 2005-11-13 11:57 Message: Logged In: YES user_id=21627 I think whence=2 can be supported, but shouldn't be. For reading, only negative offsets would be meaningful, and they can be supported the same way as they currently are (i.e. read all over). For writing, whence=2 would have no effect. seek apparently always gives a value error (e.g. also file.seek, for whence=10), so it should do so also here. Patches can be attached to bug reports if you are a patch admin. The patch lacks documentation and test case changes. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1355023&group_id=5470 _______________________________________________ Patches mailing list Patches@python.org http://mail.python.org/mailman/listinfo/patches