Skip to content

Commit

Permalink
Use OrderedSet as default set_class
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Mar 6, 2022
1 parent ec5c816 commit b25cb38
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/marshmallow/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ class AlbumSchema(Schema):

OPTIONS_CLASS = SchemaOpts # type: type

set_class = OrderedSet

# These get set by SchemaMeta
opts = None # type: SchemaOpts
_declared_fields = {} # type: typing.Dict[str, ma_fields.Field]
Expand Down Expand Up @@ -413,10 +415,6 @@ def __repr__(self) -> str:
def dict_class(self) -> type:
return OrderedDict if self.ordered else dict

@property
def set_class(self) -> type:
return OrderedSet if self.ordered else set

@classmethod
def from_dict(
cls,
Expand Down

0 comments on commit b25cb38

Please sign in to comment.