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.

Author dmi.baranov
Recipients dmi.baranov, serhiy.storchaka
Date 2013-05-29.12:07:23
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1369829244.36.0.74889642075.issue17681@psf.upfronthosting.co.za>
In-reply-to
Content
I'll be glad to do it, but having some questions for discussing.

First about FEXTRA format - it consists of a series of subfields [1] and current Lib/test/test_gzip.py :: test_read_with_extra having a bit incorrect extra field - sure, if somebody using format from RFC1952. You having a real samples with extra field?.
Should we parse subfields here (I have already asked Jean-Loup Gailly, maintainer of registry of subfield IDs, for current registry values and waiting reply) or will just provide extra header as byte string?

Next about GzipFile's public interface - GzipFile(...).extra look ugly. Should I extend this ticket to support all metadata headers? FNAME, FCOMMENT, FHCRC, etc - correctly reading now, but no ways to get it outside (and no ways to create a file with FCOMMENT and FHCRC now).

Eg, something to like this:
GzipFile(...).metadata.FNAME == 'sample.gz'
GzipFile(..., extra=b'AP6Test', comment='comment')


[1] http://tools.ietf.org/html/rfc1952#section-2.3.1.1
History
Date User Action Args
2013-05-29 12:07:24dmi.baranovsetrecipients: + dmi.baranov, serhiy.storchaka
2013-05-29 12:07:24dmi.baranovsetmessageid: <1369829244.36.0.74889642075.issue17681@psf.upfronthosting.co.za>
2013-05-29 12:07:24dmi.baranovlinkissue17681 messages
2013-05-29 12:07:23dmi.baranovcreate