Skip to content

Commit e62bbf0

Browse files
committed
PY3 top-level shortcuts work
1 parent ee21eaa commit e62bbf0

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

scrapy/__init__.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,9 @@
5252
optional_features.add('http11')
5353

5454
# Declare top-level shortcuts
55-
if sys.version_info[0] == 2:
56-
# Top-level shortcuts are not ready for Python 3 (like most of Scrapy);
57-
# skip them here to make at least some parts of Scrapy
58-
# importable in Python 3.
59-
from scrapy.spider import Spider
60-
from scrapy.http import Request, FormRequest
61-
from scrapy.selector import Selector
62-
from scrapy.item import Item, Field
55+
from scrapy.spider import Spider
56+
from scrapy.http import Request, FormRequest
57+
from scrapy.selector import Selector
58+
from scrapy.item import Item, Field
6359

6460
del sys

tests/py3-ignores.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ tests/test_spidermanager/test_spiders/spider4.py
5151
tests/test_spidermiddleware_httperror.py
5252
tests/test_spidermiddleware_referer.py
5353
tests/test_spider.py
54-
tests/test_toplevel.py
5554
tests/test_utils_defer.py
5655
tests/test_utils_iterators.py
5756
tests/test_utils_jsonrpc.py

0 commit comments

Comments
 (0)