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 lars.gustaebel
Recipients karstenw, lars.gustaebel
Date 2010-12-12.12:17:27
SpamBayes Score 4.4145003e-05
Marked as misclassified No
Message-id <1292156249.21.0.00590607311534.issue10261@psf.upfronthosting.co.za>
In-reply-to
Content
There is no trivial or backwards-compatible solution to this problem. The way it is now, there is no alternative to storing all TarInfo objects: there is no central table of contents in an archive we could use, so we must create our own. In other words, tarfile does not "burn" memory without a reason.

The problem you encounter is somehow a corner case, fortunately with a simple workaround:

for tarinfo in tar:
    ...
    tar.members = []

There are two things that I will clearly refuse to do. One thing is to add yet another option to the TarFile class to switch off caching as this would make many TarFile methods dysfunctional without the user knowing why. The other thing is to add an extra non-caching Iterator class.

Sorry, that I have nothing more to offer. Maybe, someone else comes up with a brilliant idea.
History
Date User Action Args
2010-12-12 12:17:29lars.gustaebelsetrecipients: + lars.gustaebel, karstenw
2010-12-12 12:17:29lars.gustaebelsetmessageid: <1292156249.21.0.00590607311534.issue10261@psf.upfronthosting.co.za>
2010-12-12 12:17:27lars.gustaebellinkissue10261 messages
2010-12-12 12:17:27lars.gustaebelcreate