Skip to content

Commit fc7867c

Browse files
authored
Prevent collections.abc.Sequence warning (#607)
Fixes #606.
1 parent 6d1c33a commit fc7867c

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

HISTORY.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
History
44
=======
55

6+
Pending
7+
-------
8+
9+
* Prevent ``collections.abc.Sequence`` warning.
10+
611
3.3.0 (2019-12-10)
712
------------------
813

src/django_mysql/models/lookups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import collections
21
import json
2+
from collections.abc import Sequence
33

44
import django
55
from django.db.models import CharField, Lookup, Transform
@@ -123,7 +123,7 @@ def as_sql(self, qn, connection):
123123

124124
class JSONSequencesMixin(object):
125125
def get_prep_lookup(self):
126-
if not isinstance(self.rhs, collections.Sequence):
126+
if not isinstance(self.rhs, Sequence):
127127
raise ValueError(
128128
"JSONField's '{}' lookup only works with Sequences".format(
129129
self.lookup_name

0 commit comments

Comments
 (0)