[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-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)])) 407

[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 ___ Pyth

[issue23133] Pickling of ipaddress classes

2015-01-18 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch looks fine to me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: -> serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 ___ ___

[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 ___

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file37728/ipaddress_pickle_3.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file37726/ipaddress_pickle_3.patch ___ Python tracker ___ ___ Python-bugs-l

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file37727/ipaddress_pickle_2.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file37725/ipaddress_lightweight_2.patch ___ Python tracker ___ ___ Python-b

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file37726/ipaddress_pickle_3.patch ___ Python tracker ___ ___ Python-bugs-lis

[issue23133] Pickling of ipaddress classes

2015-01-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Yes, pickling (and especially unpickling) ints is more efficient, but the code will more complex. Interfaces should be pickled as strings for backward compatibility, and interfaces are subclasses of addresses. Here are microbenchmarks: ./python -m timeit -s

[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 ___

[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 keywor