Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#14888 closed (fixed)

Remove duplicated code in serializers.

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

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@… 4 years ago.
patch

Download all attachments as: .zip

Change History (4)

Changed 4 years ago by eric.fortin2@…

patch

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 4 years ago by andrewgodwin

  • Resolution set to fixed
  • Status changed from new to closed

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

comment:3 Changed 4 years ago by andrewgodwin

(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