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.

classification
Title: tarfile __slots__ addition
Type: Stage:
Components: Library (Lib) Versions: Python 2.5
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: lars.gustaebel Nosy List: brett.cannon, ferringb, lars.gustaebel, loewis
Priority: normal Keywords: patch

Created on 2006-08-15 04:47 by ferringb, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
patch ferringb, 2006-08-15 04:47 tarfile-slots.patch
Messages (5)
msg50880 - (view) Author: Ferringb (ferringb) * Date: 2006-08-15 04:47
Quicky mod, use __slots__ for TarInfo objects in
tarfile module; lot of slots, but reduces memory by
around 33% in testing.

Pardon the delay in submitting; would like to see it in
2.5, but also well aware it's pushing it time wise.
msg50881 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-08-15 06:55
Logged In: YES 
user_id=21627

It definitely can't get into 2.5.
msg50882 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2006-08-16 13:28
Logged In: YES 
user_id=642936

If you had run the test suite you would have noticed that
there are still some names missing: buf, sparse and
_link_target. Please adjust the patch.

I cannot really estimate the implications of this patch. I
think in terms of memory use it is reasonable to add
__slots__ to Tarinfo objects because they can appear in
hordes of thousands sometimes. But it could break some code,
too.

OTOH it is easy to reverse ;-)

msg50883 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2006-08-24 22:55
Logged In: YES 
user_id=357491

I have backwards-compatibility issues with this.  Adding
slots to an already existing object can cause problems if
people are arbitrarily adding attributes to an instance.
msg59475 - (view) Author: Lars Gustäbel (lars.gustaebel) * (Python committer) Date: 2008-01-07 18:48
I close this issue as there has been no progress over the last 1.5 year.
History
Date User Action Args
2022-04-11 14:56:19adminsetgithub: 43821
2008-01-07 18:48:04lars.gustaebelsetstatus: open -> closed
resolution: rejected
messages: + msg59475
2006-08-15 04:47:16ferringbcreate