﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
37405	Using sort_keys kwarg no longer possible with YAML serializer	Jacob Walls	Jacob Walls	"The YAML serializer takes a `sort_keys` option, but since we neglected to use `setdefault` when ""defaulting"" this argument in 7142667340f78403cbbcaa8f33703c494282b7b7, any existing uses could raise `TypeError`:

Test case for `YamlSerializerTestCase`:
{{{#!py
    def test_explicit_sort_keys(self):
        serial_str = serializers.serialize(
            ""yaml"", Author.objects.all(), sort_keys=False
        )
        self.assertTrue(self._validate_output(serial_str))
}}}
{{{#!py
  File ""/Users/jwalls/django/tests/serializers/test_yaml.py"", line 159, in test_explicit_sort_keys
    serial_str = serializers.serialize(""yaml"", Author.objects.all(), sort_keys=False)
    ^^^^^^^^^^^^^^^
  File ""/Users/jwalls/django/django/core/serializers/__init__.py"", line 134, in serialize
    s.serialize(queryset, **options)
      ^^^^^^^^^^^^^^^^^
  File ""/Users/jwalls/django/django/core/serializers/base.py"", line 149, in serialize
    self.end_serialization()
    ^^^^^^^^^^^^^^^
  File ""/Users/jwalls/django/django/core/serializers/pyyaml.py"", line 49, in end_serialization
    yaml.dump(
TypeError: yaml.dump() got multiple values for keyword argument 'sort_keys'
}}}"	Bug	assigned	Core (Serialization)	6.1	Release blocker				Ready for checkin	1	0	0	0	1	0
