Lars Gustäbel <l...@gustaebel.de> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10261>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to