Skip to content

Commit 15e0b70

Browse files
authored
Merge pull request #13 from alosultan/master
Module `scrapy.spider` is deprecated. Used 'six.string_types' instead 'basestring'
2 parents c058f45 + 9d9c637 commit 15e0b70

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scrapy_jsonrpc/serialize.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@
33
import datetime
44
import decimal
55

6+
import six
67
from twisted.internet import defer
78

8-
from scrapy.spider import Spider
9+
from scrapy.spiders import Spider
910
from scrapy.http import Request, Response
1011
from scrapy.item import BaseItem
1112

@@ -58,7 +59,7 @@ def encode_references(self, obj):
5859

5960
def decode_references(self, obj):
6061
"""Look for spider references and replace them with Spider objects"""
61-
if isinstance(obj, basestring):
62+
if isinstance(obj, six.string_types):
6263
return self.get_spider_from_reference(obj)
6364
elif isinstance(obj, dict):
6465
d = {}

0 commit comments

Comments
 (0)