[issue9051] Improve pickle format for timezone aware datetime instances

2017-03-06 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> rejected stage: patch review -> resolved status: pending -> closed ___ Python tracker ___

[issue9051] Improve pickle format for timezone aware datetime instances

2017-03-06 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- status: open -> pending ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:/

[issue9051] Improve pickle format for timezone aware datetime instances

2015-11-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: >>> import pickle, pickletools, datetime >>> len(pickle.dumps([datetime.datetime.utcfromtimestamp(i) for i in >>> range(1)], 3)) / 1 30.9283 >>> len(pickle.dumps([datetime.datetime.fromtimestamp(i, datetime.timezone.utc) >>> for i in range(1)], 3)

[issue9051] Improve pickle format for timezone aware datetime instances

2015-11-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset e48da8f01316 by Serhiy Storchaka in branch '3.4': Issue #9051: Added tests for pickling and copying the timezone objects. https://hg.python.org/cpython/rev/e48da8f01316 New changeset 634905e9628d by Serhiy Storchaka in branch '3.5': Issue #9051: Add

[issue9051] Improve pickle format for timezone aware datetime instances

2015-10-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Following patch adds tests for timezone pickling and copying. Note, that timezone.utc identity is preserved. -- stage: needs patch -> patch review Added file: http://bugs.python.org/file40852/timezone_test_pickle.patch ___

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > I think we will still need to maintain _utc global indefinitely to keep the > old pickles readable. We have no need to maintain _utc global indefinitely if don't add it. > On the other hand, it looks like support for qualnames is only available with > pic

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > there is a risk that the "_utc" variable can be renamed > and this will break pickle compatibility. I think we will still need to maintain _utc global indefinitely to keep the old pickles readable. On the other hand, it looks like support for qualnames

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- nosy: +tim.peters ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-26 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For now "_utc" is not a part of API. When use it in pickling, you implicitly make it a part of API, and should support it forever (and force other Python implementations to support it). As far as it looks as implementation detail, there is a risk that the "_

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-26 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > For stability it is better to use public name 'timezone.utc' instead of > '_utc'. Can you elaborate on the "stability" consideration? I would like to revisit this issue since we will have some changes made to datetime pickles in the context of PEP 495

[issue9051] Improve pickle format for timezone aware datetime instances

2015-09-22 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: For stability it is better to use public name 'timezone.utc' instead of '_utc'. Dotted names now are supported with all protocols. > but there is still room for improvement: Don't worry about this. When you pickle a number of datetime objects with the same

[issue9051] Improve pickle format for timezone aware datetime instances

2014-06-30 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- title: Improve pickle format for aware datetime instances -> Improve pickle format for timezone aware datetime instances ___ Python tracker ___