Skip to content

Commit c065f2c

Browse files
committed
fix urlparse monkeypatches for python 2.7.4. closes scrapy#144
1 parent 7bbeadb commit c065f2c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

scrapy/xlib/urlparse_monkeypatches.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1-
from urlparse import urlparse, uses_netloc, uses_query
1+
from urlparse import urlparse
22

3-
# workaround for http://bugs.python.org/issue7904
3+
# workaround for http://bugs.python.org/issue7904 - Python < 2.7
44
if urlparse('s3://bucket/key').netloc != 'bucket':
5+
from urlparse import uses_netloc
56
uses_netloc.append('s3')
7+
8+
# workaround for http://bugs.python.org/issue9374 - Python < 2.7.4
69
if urlparse('s3://bucket/key?key=value').query != 'key=value':
10+
from urlparse import uses_query
711
uses_query.append('s3')

0 commit comments

Comments
 (0)