[issue23103] Reduce memory usage for ipaddress object instances

2015-03-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: -1 on dropping weakref support. It's a feature, and it costs almost nothing. -- ___ Python tracker ___ _

[issue23103] Reduce memory usage for ipaddress object instances

2015-03-08 Thread Nick Coghlan
Nick Coghlan added the comment: For the record, I don't think the weakref support is likely to be particularly useful either, and if we'd used __slots__ from the beginning, I expect we would have left it out. It's specifically the idea of *taking weakref support away* when weakrefs currently

[issue23103] Reduce memory usage for ipaddress object instances

2015-03-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue23103] Reduce memory usage for ipaddress object instances

2015-03-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved ___ Python tracker ___ ___ Python-bugs-list mai

[issue23103] Reduce memory usage for ipaddress object instances

2015-03-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 88a5c1698ca4 by Serhiy Storchaka in branch 'default': Issue #23103: Reduced the memory consumption of IPv4Address and IPv6Address. https://hg.python.org/cpython/rev/88a5c1698ca4 -- nosy: +python-dev ___ P

[issue23103] Reduce memory usage for ipaddress object instances

2015-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: OK. But I hesitate that weakref support is useful for IP addresses. -- assignee: -> serhiy.storchaka ___ Python tracker ___ _

[issue23103] Reduce memory usage for ipaddress object instances

2015-03-07 Thread Nick Coghlan
Nick Coghlan added the comment: +1 from me, although since we're committing to preserving the weakref support for compatibility reasons now, I'm wondering if we should also add a test for it. -- ___ Python tracker

[issue23103] Reduce memory usage for ipaddress object instances

2015-03-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Nick, what is your thoughts about the patch? -- ___ Python tracker ___ ___ Python-bugs-list mailin

[issue23103] Reduce memory usage for ipaddress object instances

2015-02-08 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Synchronized with tip. -- Added file: http://bugs.python.org/file38047/ipaddress_lightweight_4.patch ___ Python tracker ___ __

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: As far as adding __slots__ breaks pickling with protocols < 2, issue23133 can be considered as a dependency. -- dependencies: +Pickling of ipaddress classes ___ Python tracker _

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch preserves weak references support. -- Added file: http://bugs.python.org/file37563/ipaddress_lightweight_3.patch ___ Python tracker

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't think that IP addresses need weak references more than base types as > integers or strings. People may already be taking weak references, so it's a matter of compatibility. (and weakrefs can actually help implement an interning scheme as proposed her

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I believe you need to add a bunch of __slots__ = () to various base classes > in the module, even though they lack member variables. Done. Here is updated patch. I don't think that IP addresses need weak references more than base types as integers or stri

[issue23103] Reduce memory usage for ipaddress object instances

2014-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: I've retitled this issue to be specifically about reducing the memory consumption of the existing types in the IP Address module, as that's a change that isn't easily implemented externally, and shouldn't have any negative side effects under intended usage (alth