From cd5bd88ffac17df18a4208fe532c5266e906f323 Mon Sep 17 00:00:00 2001
From: Simon Charette <charette.s@gmail.com>
Date: Mon, 7 Jan 2013 23:41:59 -0500
Subject: [PATCH] Fixed #19576 -- Use `six.with_metaclass` uniformously
accross code base.
---
django/db/models/base.py | 2 +-
django/db/models/query.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/django/db/models/base.py b/django/db/models/base.py
index bd638e2..38afc60 100644
a
|
b
|
class ModelState(object):
|
311 | 311 | self.adding = True |
312 | 312 | |
313 | 313 | |
314 | | class Model(six.with_metaclass(ModelBase, object)): |
| 314 | class Model(six.with_metaclass(ModelBase)): |
315 | 315 | _deferred = False |
316 | 316 | |
317 | 317 | def __init__(self, *args, **kwargs): |
diff --git a/django/db/models/query.py b/django/db/models/query.py
index edc8cc9..bdb6d48 100644
a
|
b
|
class InstanceCheckMeta(type):
|
990 | 990 | def __instancecheck__(self, instance): |
991 | 991 | return instance.query.is_empty() |
992 | 992 | |
993 | | class EmptyQuerySet(six.with_metaclass(InstanceCheckMeta), object): |
| 993 | class EmptyQuerySet(six.with_metaclass(InstanceCheckMeta)): |
994 | 994 | """ |
995 | 995 | Marker class usable for checking if a queryset is empty by .none(): |
996 | 996 | isinstance(qs.none(), EmptyQuerySet) -> True |