summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2026-04-18 18:54:08 -0400
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2026-04-19 08:06:28 +0200
commitd33364c7ba330a349e38449c98494323a4ed7c8d (patch)
tree66a93ae7ed07442bc040cf81dbe19f0054ede362 /django
parent179aa21b6dfeb9a0560a8c2bbfcf056301fc619f (diff)
Removed OrderedDict representer from PyYAML serializer.
Added in 5bc3123479bd97dc9d8a36fa9a3421a71063d1da (refs #24558), it was obsoleted when OrderedDict usage was removed in 24b82cd201e21060fbc02117dc16d1702877a1f3 (refs #30159).
Diffstat (limited to 'django')
-rw-r--r--django/core/serializers/pyyaml.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/django/core/serializers/pyyaml.py b/django/core/serializers/pyyaml.py
index 02e56bdd52..b7bfa9d54e 100644
--- a/django/core/serializers/pyyaml.py
+++ b/django/core/serializers/pyyaml.py
@@ -4,7 +4,6 @@ YAML serializer.
Requires PyYaml (https://pyyaml.org/), but that's checked for in __init__.
"""
-import collections
import datetime
import decimal
@@ -28,9 +27,6 @@ class DjangoSafeDumper(SafeDumper):
def represent_decimal(self, data):
return self.represent_scalar("tag:yaml.org,2002:str", str(data))
- def represent_ordered_dict(self, data):
- return self.represent_mapping("tag:yaml.org,2002:map", data.items())
-
def represent_time(self, data):
# Base YAML doesn't support serialization of time types (as opposed to
# dates or datetimes, which it does support). Converting them to
@@ -40,9 +36,6 @@ class DjangoSafeDumper(SafeDumper):
DjangoSafeDumper.add_representer(decimal.Decimal, DjangoSafeDumper.represent_decimal)
-DjangoSafeDumper.add_representer(
- collections.OrderedDict, DjangoSafeDumper.represent_ordered_dict
-)
DjangoSafeDumper.add_representer(datetime.time, DjangoSafeDumper.represent_time)