Skip to content

Commit

Permalink
PY3 top-level shortcuts work
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Aug 1, 2014
1 parent ee21eaa commit e62bbf0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
12 changes: 4 additions & 8 deletions scrapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,9 @@
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
1 change: 0 additions & 1 deletion tests/py3-ignores.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e62bbf0

Please sign in to comment.