Skip to content

Commit

Permalink
Re-enable uvloop tests on 3.12 (#6098)
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed Oct 17, 2023
1 parent 5807970 commit 991121f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.11"
- python-version: "3.12"
env:
TOXENV: pylint
- python-version: 3.8
Expand All @@ -21,7 +21,7 @@ jobs:
- python-version: "3.11" # Keep in sync with .readthedocs.yml
env:
TOXENV: docs
- python-version: "3.11"
- python-version: "3.12"
env:
TOXENV: twinecheck

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.11
python-version: 3.12
- run: |
pip install --upgrade build twine
python -m build
Expand Down
5 changes: 0 additions & 5 deletions .github/workflows/tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ jobs:
env:
TOXENV: botocore

# keep until uvloop supports 3.12
- python-version: "3.11"
env:
TOXENV: asyncio

steps:
- uses: actions/checkout@v4

Expand Down
6 changes: 4 additions & 2 deletions scrapy/contracts/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def wrapper(response, **cb_kwargs):
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

Expand All @@ -68,7 +70,7 @@ def wrapper(response, **cb_kwargs):
else:
results.addSuccess(self.testcase_post)
finally:
return output
return output # pylint: disable=return-in-finally

request.callback = wrapper

Expand Down
3 changes: 1 addition & 2 deletions tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ pytest-cov==4.0.0
pytest-xdist
sybil >= 1.3.0 # https://github.com/cjw296/sybil/issues/20#issuecomment-605433422
testfixtures
# 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 tests
brotli; implementation_name != 'pypy' # optional for HTTP compress downloader middleware tests
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ commands =
basepython = python3
deps =
{[testenv:extra-deps]deps}
pylint==2.17.5
pylint==3.0.1
commands =
pylint conftest.py docs extras scrapy setup.py tests

Expand Down

0 comments on commit 991121f

Please sign in to comment.