summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--django/db/models/query_utils.py5
-rw-r--r--django/utils/functional.py1
2 files changed, 0 insertions, 6 deletions
diff --git a/django/db/models/query_utils.py b/django/db/models/query_utils.py
index efc995b35f..d9040d0843 100644
--- a/django/db/models/query_utils.py
+++ b/django/db/models/query_utils.py
@@ -301,11 +301,6 @@ def deferred_class_factory(model, attrs):
return type(str(name), (model,), overrides)
-# The above function is also used to unpickle model instances with deferred
-# fields.
-deferred_class_factory.__safe_for_unpickling__ = True
-
-
def refs_aggregate(lookup_parts, aggregates):
"""
A helper method to check if the lookup_parts contains references
diff --git a/django/utils/functional.py b/django/utils/functional.py
index c487cd8517..978d152be2 100644
--- a/django/utils/functional.py
+++ b/django/utils/functional.py
@@ -314,7 +314,6 @@ def unpickle_lazyobject(wrapped):
wrapped object.
"""
return wrapped
-unpickle_lazyobject.__safe_for_unpickling__ = True
# Workaround for http://bugs.python.org/issue12370