From ea8e7fd989095c1444528c8b9808076985d5ea0a Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Mon, 5 Oct 2015 08:07:27 -0400 Subject: [PATCH] Removed obsolete (since Python 2.3) __safe_for_unpickling__ attribute. --- django/db/models/query_utils.py | 5 ----- django/utils/functional.py | 1 - 2 files changed, 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