Scrapy, a fast high-level web crawling & scraping framework for Python.
Re-enable uvloop tests on 3.12 (#6098)
Andrey Rakhmatullin5e4fb0bc5fc0
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.ymlindex ee0cb4b1e..f91055ba5 100644--- a/.github/workflows/checks.yml+++ b/.github/workflows/checks.yml@@ -8,7 +8,7 @@ jobs:fail-fast: falsematrix:include:- - python-version: "3.11"+ - python-version: "3.12"env:TOXENV: pylint- python-version: 3.8@@ -17,7 +17,7 @@ jobs:- python-version: "3.11" # Keep in sync with .readthedocs.ymlenv:TOXENV: docs- - python-version: "3.11"+ - python-version: "3.12"env:TOXENV: twinecheckdiff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex 22b8996b6..095793299 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -11,7 +11,7 @@ jobs:- uses: actions/checkout@v3- uses: actions/setup-python@v4with:- python-version: 3.11+ python-version: 3.12- run: |pip install --upgrade build twinepython -m builddiff --git a/.github/workflows/tests-ubuntu.yml b/.github/workflows/tests-ubuntu.ymlindex 62b5f123a..c883f958c 100644--- a/.github/workflows/tests-ubuntu.yml+++ b/.github/workflows/tests-ubuntu.yml@@ -51,11 +51,6 @@ jobs:env:TOXENV: botocore- # keep until uvloop supports 3.12- - python-version: "3.11"- env:- TOXENV: asyncio-steps:- uses: actions/checkout@v3diff --git a/scrapy/contracts/__init__.py b/scrapy/contracts/__init__.pyindex 1ec2a0234..2d9ddd89a 100644--- a/scrapy/contracts/__init__.py+++ b/scrapy/contracts/__init__.py@@ -41,7 +41,9 @@ class Contract:cb_result = cb(response, **cb_kwargs)if isinstance(cb_result, (AsyncGenerator, CoroutineType)):raise TypeError("Contracts don't support async callbacks")- return list(iterate_spider_output(cb_result))+ return list( # pylint: disable=return-in-finally+ iterate_spider_output(cb_result)+ )request.callback = wrapper@@ -68,7 +70,7 @@ class Contract:else:results.addSuccess(self.testcase_post)finally:- return output+ return output # pylint: disable=return-in-finallyrequest.callback = wrapperdiff --git a/tests/requirements.txt b/tests/requirements.txtindex d4bfead40..5b75674f5 100644--- a/tests/requirements.txt+++ b/tests/requirements.txt@@ -7,8 +7,7 @@ pytest-cov==4.0.0pytest-xdistsybil >= 1.3.0 # https://github.com/cjw296/sybil/issues/20#issuecomment-605433422testfixtures-# uvloop currently doesn't build on 3.12-uvloop; platform_system != "Windows" and python_version < "3.12"+uvloop; platform_system != "Windows"bpython # optional for shell wrapper testsbrotli; implementation_name != 'pypy' # optional for HTTP compress downloader middleware testsdiff --git a/tox.ini b/tox.iniindex 9c2522a43..381da9773 100644--- a/tox.ini+++ b/tox.ini@@ -57,7 +57,7 @@ commands =basepython = python3deps ={[testenv:extra-deps]deps}- pylint==2.17.5+ pylint==3.0.1commands =pylint conftest.py docs extras scrapy setup.py tests