summaryrefslogtreecommitdiff
path: root/django/db
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2014-03-21 07:45:38 -0400
committerTim Graham <timograham@gmail.com>2014-03-21 07:47:25 -0400
commitbcc15e2b21217c280afd613b1beff238e23fce75 (patch)
treeeb10a8ee6e2890a04f4b446d46b4f3ed1fb9a921 /django/db
parent11e22129d50c00e50e3e7521b6e08004d32d070e (diff)
Removed backward compatible shims to rename get_query_set and similar queryset methods.
Also removed the backward compatible shims introduced to rename the attributes ChangeList.root_query_set and ChangeList.query_set.
Diffstat (limited to 'django/db')
-rw-r--r--django/db/models/fields/related.py12
-rw-r--r--django/db/models/manager.py10
2 files changed, 3 insertions, 19 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 2443bbf5c8..148b979ad3 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -14,7 +14,6 @@ from django.db.models.query import QuerySet
from django.db.models.sql.datastructures import Col
from django.utils.encoding import smart_text
from django.utils import six
-from django.utils.deprecation import RenameMethodsBase, RemovedInDjango18Warning
from django.utils.translation import ugettext_lazy as _
from django.utils.functional import curry, cached_property
from django.core import exceptions
@@ -344,14 +343,7 @@ class RelatedField(Field):
return self.rel.related_query_name or self.rel.related_name or self.opts.model_name
-class RenameRelatedObjectDescriptorMethods(RenameMethodsBase):
- renamed_methods = (
- ('get_query_set', 'get_queryset', RemovedInDjango18Warning),
- ('get_prefetch_query_set', 'get_prefetch_queryset', RemovedInDjango18Warning),
- )
-
-
-class SingleRelatedObjectDescriptor(six.with_metaclass(RenameRelatedObjectDescriptorMethods)):
+class SingleRelatedObjectDescriptor(object):
# This class provides the functionality that makes the related-object
# managers available as attributes on a model class, for fields that have
# a single "remote" value, on the class pointed to by a related field.
@@ -479,7 +471,7 @@ class SingleRelatedObjectDescriptor(six.with_metaclass(RenameRelatedObjectDescri
setattr(value, self.related.field.get_cache_name(), instance)
-class ReverseSingleRelatedObjectDescriptor(six.with_metaclass(RenameRelatedObjectDescriptorMethods)):
+class ReverseSingleRelatedObjectDescriptor(object):
# This class provides the functionality that makes the related-object
# managers available as attributes on a model class, for fields that have
# a single "remote" value, on the class that defines the related field.
diff --git a/django/db/models/manager.py b/django/db/models/manager.py
index 4f28253de9..2e4f15f892 100644
--- a/django/db/models/manager.py
+++ b/django/db/models/manager.py
@@ -6,7 +6,6 @@ from django.db.models.query import QuerySet
from django.db.models import signals
from django.db.models.fields import FieldDoesNotExist
from django.utils import six
-from django.utils.deprecation import RenameMethodsBase, RemovedInDjango18Warning
from django.utils.encoding import python_2_unicode_compatible
@@ -52,15 +51,8 @@ def ensure_default_manager(sender, **kwargs):
signals.class_prepared.connect(ensure_default_manager)
-class RenameManagerMethods(RenameMethodsBase):
- renamed_methods = (
- ('get_query_set', 'get_queryset', RemovedInDjango18Warning),
- ('get_prefetch_query_set', 'get_prefetch_queryset', RemovedInDjango18Warning),
- )
-
-
@python_2_unicode_compatible
-class BaseManager(six.with_metaclass(RenameManagerMethods)):
+class BaseManager(object):
# Tracks each time a Manager instance is created. Used to retain order.
creation_counter = 0