Skip to content

Commit e76f2b9

Browse files
committed
add compatibility with 2.10
1 parent d8b6ff6 commit e76f2b9

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.github/workflows/main.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
python-version: ["3.8", "3.9", "3.10", "3.11"]
17-
scrapy-version: ["2.11"]
17+
scrapy-version: ["2.11", "2.10"]
1818

1919
steps:
2020
- uses: actions/checkout@v2

scrapyrt/core.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,9 @@ def crawl(self, *args, **kwargs):
3939
self.crawling = True
4040
try:
4141
self.spider = self._create_spider(*args, **kwargs)
42-
self._apply_settings()
43-
self._update_root_log_handler()
42+
if hasattr(self, "_apply_settings"):
43+
self._apply_settings()
44+
self._update_root_log_handler()
4445
self.engine = self._create_engine()
4546
if self.start_requests:
4647
start_requests = iter(self.spider.start_requests())

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"Tracker": "https://github.com/scrapinghub/scrapyrt/issues"
4242
},
4343
install_requires=[
44-
'Scrapy>=2.11'
44+
'Scrapy>=2.10'
4545
],
4646
package_data={
4747
'scrapyrt': [

0 commit comments

Comments
 (0)