[issue23133] Pickling of ipaddress classes

2015-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Then I'll remove it. Could you please make a review of optimized patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 781b54f7bccc by Serhiy Storchaka in branch 'default': Issue #23133: Pickling of ipaddress objects now produces more compact and https://hg.python.org/cpython/rev/781b54f7bccc -- nosy: +python-dev ___

[issue23133] Pickling of ipaddress classes

2015-01-18 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Antoine. And here is comparison of pickle size. Unpatched: len(pickle.dumps([ipaddress.ip_address('192.0.2.%s'%i) for i in range(1, 101)])) 2971 len(pickle.dumps([ipaddress.ip_address('2001:db8::%x'%i) for i in range(1, 101)])) 4071

[issue23133] Pickling of ipaddress classes

2015-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks fine to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___ Python-bugs-list

[issue23133] Pickling of ipaddress classes

2015-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset 712ac77b772b by Serhiy Storchaka in branch 'default': Fixed tests for issue #23133 (pickling of IPv4Network was not tested). https://hg.python.org/cpython/rev/712ac77b772b -- ___ Python tracker

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Patch looks good to me. For further efficiency, addresses could be pickled as ints (but beware of interfaces and networks). -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37726/ipaddress_pickle_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file37725/ipaddress_lightweight_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Removed file: http://bugs.python.org/file37726/ipaddress_pickle_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37728/ipaddress_pickle_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file37727/ipaddress_pickle_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: ipaddress_pickle_3.patch breaks one test (testMissingAddressVersion). Is this test needed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't understand what the test is for. I think it's safe it's remove it. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- assignee: - serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23133 ___ ___

[issue23133] Pickling of ipaddress classes

2014-12-30 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: Currently ipaddress classes support pickling, but the pickling is not efficient and is implementation depened. Proposed patch makes pickling more compact and implementation agnostic. -- components: Library (Lib) files: ipaddress_pickle.patch