Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14888 closed (fixed)

Remove duplicated code in serializers.

Reported by: eric.fortin2@… Owned by: nobody
Component: Core (Serialization) Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Removed some code duplicated in json and yaml end_serialization methods. Generic parameters passed in options are already stored in self variables waiting in subclass to pop them from dict is useless.

Moreover, if we want to subclass python serializer for a custom format, we needed(not actually needed but nice to behave like the other two) to copy these lines again. Another example would be to subclass json serializer to override the encoder. We would have to copy those lines again.

Attachments (1)

rem_code_dup.diff (1.8 KB ) - added by eric.fortin2@… 14 years ago.
patch

Download all attachments as: .zip

Change History (4)

by eric.fortin2@…, 14 years ago

Attachment: rem_code_dup.diff added

patch

comment:1 by Russell Keith-Magee, 14 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Andrew Godwin, 14 years ago

Resolution: fixed
Status: newclosed

(In [15163]) Fixed #14888 -- Removing duplicated code in serialisers. Thanks to eric.fortin.

comment:3 by Andrew Godwin, 14 years ago

(In [15164]) [1.2.X] Fixed #14888 -- Removing duplicated code in serialisers. Thanks to eric.fortin.

Backport of [15163] from trunk

Note: See TracTickets for help on using tickets.
Back to Top