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 sbromberger
Recipients josh.r, ncoghlan, pmoody, sbromberger
Date 2014-12-23.13:52:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1419342734.31.0.498385362884.issue23103@psf.upfronthosting.co.za>
In-reply-to
Content
>What is your proposal? WeakValueDictionary mapping raw bytes object to single instance of ipaddress that is queried from ipaddress's __new__? No built-in has quite that extensive a level of caching and aggressive deduplication to my knowledge.

I was thinking along those lines, but since v4 addresses are just UInt32 and v6 are UInt128, somehow mapping just the "address" information if we can do that via weakref dicts. Right now these objects can't really be used to represent addresses parsed from logs with tens of millions of entries generated by a couple thousand machines. It would be nice to have a memory-efficient way of doing that without having to duplicate the concept in a third-party package.

There are a few other changes I'd like to see/make as well - this package is too focused on external functions for manipulating/creating addresses, when standard object/method structure would serve it better and be more intuitive. There is also no discernible need to modify an IP address' value. They should be thought of as immutables to the extent we can enforce that policy.
History
Date User Action Args
2014-12-23 13:52:14sbrombergersetrecipients: + sbromberger, ncoghlan, pmoody, josh.r
2014-12-23 13:52:14sbrombergersetmessageid: <1419342734.31.0.498385362884.issue23103@psf.upfronthosting.co.za>
2014-12-23 13:52:14sbrombergerlinkissue23103 messages
2014-12-23 13:52:13sbrombergercreate