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 flying sheep
Recipients David.Nesting, docs@python, flying sheep, lars.gustaebel, martin.panter, wichert
Date 2017-05-09.13:08:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1494335331.91.0.950567600608.issue10436@psf.upfronthosting.co.za>
In-reply-to
Content
well, we should just allow

extractall(members=['foo', 'bar'])

currently members only accepts TarInfo objects, not filenames, but it’s easy to accept both.

https://github.com/python/cpython/blob/74683fc6247c522ae955a6e7308b8ff51def35d8/Lib/tarfile.py#L1991-L1999

sth like:

filenames = set()
for member in members:
    if isinstance(member, TarInfo):
        # do what’s done now
    else:
        filenames.add(member)

for tarinfo in self:
    if tarinfo.name in filenames:
        self.extract(tarinfo)
History
Date User Action Args
2017-05-09 13:08:51flying sheepsetrecipients: + flying sheep, lars.gustaebel, wichert, docs@python, David.Nesting, martin.panter
2017-05-09 13:08:51flying sheepsetmessageid: <1494335331.91.0.950567600608.issue10436@psf.upfronthosting.co.za>
2017-05-09 13:08:51flying sheeplinkissue10436 messages
2017-05-09 13:08:51flying sheepcreate