mirror of
https://github.com/django/django.git
synced 2025-09-26 20:19:16 +00:00
Refs #23919 -- Stopped inheriting from object to define new style classes.
This commit is contained in:
parent
a556396339
commit
cecc079168
293 changed files with 512 additions and 514 deletions
|
@ -32,7 +32,7 @@ REPR_OUTPUT_SIZE = 20
|
|||
EmptyResultSet = sql.EmptyResultSet
|
||||
|
||||
|
||||
class BaseIterable(object):
|
||||
class BaseIterable:
|
||||
def __init__(self, queryset, chunked_fetch=False):
|
||||
self.queryset = queryset
|
||||
self.chunked_fetch = chunked_fetch
|
||||
|
@ -152,7 +152,7 @@ class FlatValuesListIterable(BaseIterable):
|
|||
yield row[0]
|
||||
|
||||
|
||||
class QuerySet(object):
|
||||
class QuerySet:
|
||||
"""
|
||||
Represents a lazy database lookup for a set of objects.
|
||||
"""
|
||||
|
@ -1180,7 +1180,7 @@ class EmptyQuerySet(metaclass=InstanceCheckMeta):
|
|||
raise TypeError("EmptyQuerySet can't be instantiated")
|
||||
|
||||
|
||||
class RawQuerySet(object):
|
||||
class RawQuerySet:
|
||||
"""
|
||||
Provides an iterator which converts the results of raw SQL queries into
|
||||
annotated model instances.
|
||||
|
@ -1298,7 +1298,7 @@ class RawQuerySet(object):
|
|||
return model_fields
|
||||
|
||||
|
||||
class Prefetch(object):
|
||||
class Prefetch:
|
||||
def __init__(self, lookup, queryset=None, to_attr=None):
|
||||
# `prefetch_through` is the path we traverse to perform the prefetch.
|
||||
self.prefetch_through = lookup
|
||||
|
@ -1623,7 +1623,7 @@ def prefetch_one_level(instances, prefetcher, lookup, level):
|
|||
return all_related_objects, additional_lookups
|
||||
|
||||
|
||||
class RelatedPopulator(object):
|
||||
class RelatedPopulator:
|
||||
"""
|
||||
RelatedPopulator is used for select_related() object instantiation.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue