Skip to content
Snippets Groups Projects
Commit 61a966cd3943 authored by Bob Ippolito's avatar Bob Ippolito
Browse files

ensure cached encoder is only used when all settings are default

parent fc047df63b20
No related branches found
No related tags found
No related merge requests found
......@@ -243,8 +243,11 @@
cls is None and indent is None and separators is None and
encoding == 'utf-8' and default is None and use_decimal
and namedtuple_as_object and tuple_as_array
and not bigint_as_string and int_as_string_bitcount is None
and not item_sort_key and not for_json and not ignore_nan and not kw):
and not bigint_as_string and not sort_keys
and not item_sort_key and not for_json
and not ignore_nan and int_as_string_bitcount is None
and not kw
):
iterable = _default_encoder.iterencode(obj)
else:
if cls is None:
......@@ -359,9 +362,10 @@
cls is None and indent is None and separators is None and
encoding == 'utf-8' and default is None and use_decimal
and namedtuple_as_object and tuple_as_array
and not bigint_as_string and int_as_string_bitcount is None
and not sort_keys and not item_sort_key and not for_json
and not ignore_nan and not kw
and not bigint_as_string and not sort_keys
and not item_sort_key and not for_json
and not ignore_nan and int_as_string_bitcount is None
and not kw
):
return _default_encoder.encode(obj)
if cls is None:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment