diff options
| author | Adam Chainz <me@adamj.eu> | 2016-11-20 23:22:13 +0000 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2016-11-20 18:22:13 -0500 |
| commit | 9d4246419ca5b913a7a9b05f18e695f10a9fd0fb (patch) | |
| tree | c529e03cc880920f0e3dddd0a4de02f23d5c1a9d | |
| parent | cc1f6f26b68223bb5b332c774422173d7800bf80 (diff) | |
Refs #26207 -- Removed obsolete comments about deferred model classes.
| -rw-r--r-- | django/apps/config.py | 1 | ||||
| -rw-r--r-- | django/apps/registry.py | 1 | ||||
| -rw-r--r-- | django/db/models/base.py | 6 | ||||
| -rw-r--r-- | tests/update_only_fields/tests.py | 3 |
4 files changed, 1 insertions, 10 deletions
diff --git a/django/apps/config.py b/django/apps/config.py index 14925cd1ce..edb1146afc 100644 --- a/django/apps/config.py +++ b/django/apps/config.py @@ -179,7 +179,6 @@ class AppConfig(object): - auto-created models for many-to-many relations without an explicit intermediate table, - - models created to satisfy deferred attribute queries, - models that have been swapped out. Set the corresponding keyword argument to True to include such models. diff --git a/django/apps/registry.py b/django/apps/registry.py index 0ac495df1e..453e4d42f6 100644 --- a/django/apps/registry.py +++ b/django/apps/registry.py @@ -165,7 +165,6 @@ class Apps(object): - auto-created models for many-to-many relations without an explicit intermediate table, - - models created to satisfy deferred attribute queries, - models that have been swapped out. Set the corresponding keyword argument to True to include such models. diff --git a/django/db/models/base.py b/django/db/models/base.py index 219a1b1aa2..9364afb278 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -605,12 +605,6 @@ class Model(six.with_metaclass(ModelBase)): return hash(self._get_pk_val()) def __reduce__(self): - """ - Provides pickling support. Normally, this just dispatches to Python's - standard handling. However, for models with deferred field loading, we - need to do things manually, as they're dynamically created classes and - only module-level classes can be pickled by the default path. - """ data = self.__dict__ data[DJANGO_VERSION_PICKLE_KEY] = get_version() class_id = self._meta.app_label, self._meta.object_name diff --git a/tests/update_only_fields/tests.py b/tests/update_only_fields/tests.py index c2b809b328..7627bcd378 100644 --- a/tests/update_only_fields/tests.py +++ b/tests/update_only_fields/tests.py @@ -72,8 +72,7 @@ class UpdateOnlyFieldsTests(TestCase): s1.gender = 'M' with self.assertNumQueries(1): s1.save() - # The deferred class does not remember that gender was - # set, instead the instance should remember this. + # save() should not fetch deferred fields s1 = Person.objects.only('name').get(pk=s.pk) with self.assertNumQueries(1): s1.save() |
