Skip to content

Commit 6781ea3

Browse files
committed
Show deprecation warning only after using A() queries
1 parent 352cf9c commit 6781ea3

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

django_mongodb_engine/query.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
from warnings import warn
2-
warn("A() queries are deprecated as of 0.5 and will be removed in 0.6.",
3-
DeprecationWarning)
4-
52

63
from djangotoolbox.fields import RawField, AbstractIterableField, \
74
EmbeddedModelField
@@ -16,6 +13,8 @@
1613
class A(object):
1714

1815
def __init__(self, op, value):
16+
warn("A() queries are deprecated as of 0.5 and will be removed in 0.6.", DeprecationWarning)
17+
1918
self.op = op
2019
self.val = value
2120

0 commit comments

Comments
 (0)