Removed obsolete force_text_recursive
@@ -454,8 +454,6 @@ class ModelState:
options[name] = set(normalize_together(it))
else:
options[name] = model._meta.original_attrs[name]
- # Force-convert all options to str (#23226)
- options = cls.force_text_recursive(options)
# If we're ignoring relationships, remove all field-listing model
# options (that option basically just means "make a stub model")
if exclude_rels:
@@ -533,21 +531,6 @@ class ModelState:
managers,
)
- @classmethod
- def force_text_recursive(cls, value):
- if isinstance(value, list):
- return [cls.force_text_recursive(x) for x in value]
- elif isinstance(value, tuple):
- return tuple(cls.force_text_recursive(x) for x in value)
- elif isinstance(value, set):
- return set(cls.force_text_recursive(x) for x in value)
- elif isinstance(value, dict):
- return {
- cls.force_text_recursive(k): cls.force_text_recursive(v)
- for k, v in value.items()
- }
- return value
-
def construct_managers(self):
"Deep-clone the managers using deconstruction"
# Sort all managers by their creation counter
