mirror of https://github.com/scrapy/scrapy.git
PY3 top-level shortcuts work
This commit is contained in:
parent
ee21eaa6f3
commit
e62bbf0766
|
|
@ -52,13 +52,9 @@ if twisted_version >= (11, 1, 0):
|
|||
optional_features.add('http11')
|
||||
|
||||
# Declare top-level shortcuts
|
||||
if sys.version_info[0] == 2:
|
||||
# Top-level shortcuts are not ready for Python 3 (like most of Scrapy);
|
||||
# skip them here to make at least some parts of Scrapy
|
||||
# importable in Python 3.
|
||||
from scrapy.spider import Spider
|
||||
from scrapy.http import Request, FormRequest
|
||||
from scrapy.selector import Selector
|
||||
from scrapy.item import Item, Field
|
||||
from scrapy.spider import Spider
|
||||
from scrapy.http import Request, FormRequest
|
||||
from scrapy.selector import Selector
|
||||
from scrapy.item import Item, Field
|
||||
|
||||
del sys
|
||||
|
|
|
|||
|
|
@ -51,7 +51,6 @@ tests/test_spidermanager/test_spiders/spider4.py
|
|||
tests/test_spidermiddleware_httperror.py
|
||||
tests/test_spidermiddleware_referer.py
|
||||
tests/test_spider.py
|
||||
tests/test_toplevel.py
|
||||
tests/test_utils_defer.py
|
||||
tests/test_utils_iterators.py
|
||||
tests/test_utils_jsonrpc.py
|
||||
|
|
|
|||
Loading…
Reference in New Issue