Encode datetime as Timestamp in msgpack
Closed
requested to merge generated-differential-D4690-source into generated-differential-D4690-target
decoding custom format is still supported for backward compat. Note that revision modify the exception type raised when attempting to encode a naive datetime object for both formats (json amd msgpack): it now raises a TypeError instead of a ValueError.
The ENCODERS/DECODERS constants have also been split to make clear which codecs are specific to the json format.
Migrated from D4690 (view on Phabricator)
Merge request reports
Activity
Build is green
Patch application report for D4690 (id=16642)
Rebasing onto 6492e617...
Current branch diff-target is up to date.
Changes applied before test
commit 39abbfd34a057c262b3aebc653235e69c23c6864 Author: David Douard <david.douard@sdfa3.org> Date: Tue Dec 8 16:49:59 2020 +0100 Encode datetime as Timestamp in msgpack decoding custom format is still supported for backward compat. Note that revision modify the exception type raised when attempting to encode a naive datetime object for both formats (json amd msgpack): it now raises a TypeError instead of a ValueError. The ENCODERS/DECODERS constants have also been split to make clear which codecs are specific to the json format.
See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/177/ for more details.
Build is green
Patch application report for D4690 (id=16715)
Rebasing onto 6492e617...
Current branch diff-target is up to date.
Changes applied before test
commit 777ea186fa8d31a972ccc15abb7c42297e0a399f Author: David Douard <david.douard@sdfa3.org> Date: Fri Dec 11 09:33:29 2020 +0100 Encode datetime as Timestamp in msgpack decoding custom format is still supported for backward compat. Note that this revision modifies the exception type raised when attempting to encode a naive datetime object for both formats (json amd msgpack): it now raises a TypeError instead of a ValueError. commit e722afbf82e32e2b51594d760b91c87ed22883dd Author: David Douard <david.douard@sdfa3.org> Date: Fri Dec 11 09:31:52 2020 +0100 Split serializers ENCODERS/DECODERS to extract JSON specific ones to make it clear which codecs are specific to the json format. commit 10b997ac1c86b1997b58d1445a8fd7ec55870919 Author: David Douard <david.douard@sdfa3.org> Date: Fri Dec 11 09:27:12 2020 +0100 Use json_dumps/loads in test_serializers.py instead of json.dumps(..., cls=SWHJSONEncoder) and so. This simplify a bit the code and make sure the json_dumps/loads functions are actually tested.
See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/178/ for more details.
mentioned in merge request swh-deposit!316 (closed)
Please register or sign in to reply