Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Make Python 3.10 support official (#5265)

Eugenio Lacuestacfff79cee6a9
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 6bdfcb5dc..80df9469d 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -8,10 +8,10 @@ jobs:
fail-fast: false
matrix:
include:
- - python-version: 3.9
+ - python-version: "3.10"
env:
TOXENV: security
- - python-version: 3.9
+ - python-version: "3.10"
env:
TOXENV: flake8
# Pylint requires installing reppy, which does not support Python 3.9
@@ -20,10 +20,10 @@ jobs:
env:
TOXENV: pylint
TOX_PIP_VERSION: 20.3.3
- - python-version: 3.9
+ - python-version: 3.6
env:
TOXENV: typing
- - python-version: 3.8 # Keep in sync with .readthedocs.yml
+ - python-version: "3.10" # Keep in sync with .readthedocs.yml
env:
TOXENV: docs
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index b48066ea4..44b682830 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -9,10 +9,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- - name: Set up Python 3.9
+ - name: Set up Python
uses: actions/setup-python@v2
with:
- python-version: 3.9
+ python-version: "3.10"
- name: Check Tag
id: check-release-tag
diff --git a/.github/workflows/tests-macos.yml b/.github/workflows/tests-macos.yml
index 095ca1013..3aaf688c7 100644
--- a/.github/workflows/tests-macos.yml
+++ b/.github/workflows/tests-macos.yml
@@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- python-version: [3.6, 3.7, 3.8, 3.9]
+ python-version: ["3.6", "3.7", "3.8", "3.9", "3.10"]
steps:
- uses: actions/checkout@v2
diff --git a/.github/workflows/tests-ubuntu.yml b/.github/workflows/tests-ubuntu.yml
index ef1c8362f..5ea50e644 100644
--- a/.github/workflows/tests-ubuntu.yml
+++ b/.github/workflows/tests-ubuntu.yml
@@ -17,6 +17,12 @@ jobs:
- python-version: 3.9
env:
TOXENV: py
+ - python-version: "3.10"
+ env:
+ TOXENV: py
+ - python-version: "3.10"
+ env:
+ TOXENV: asyncio
- python-version: pypy3
env:
TOXENV: pypy3
@@ -42,14 +48,6 @@ jobs:
TOXENV: extra-deps
TOX_PIP_VERSION: 20.3.3
- # 3.10-pre
- - python-version: "3.10.0-beta.4"
- env:
- TOXENV: py
- - python-version: "3.10.0-beta.4"
- env:
- TOXENV: asyncio
-
steps:
- uses: actions/checkout@v2
diff --git a/.readthedocs.yml b/.readthedocs.yml
index 80a1cd036..390be3749 100644
--- a/.readthedocs.yml
+++ b/.readthedocs.yml
@@ -5,12 +5,13 @@ sphinx:
fail_on_warning: true
build:
- image: latest
+ os: ubuntu-20.04
+ tools:
+ # For available versions, see:
+ # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python
+ python: "3.10" # Keep in sync with .github/workflows/checks.yml
python:
- # For available versions, see:
- # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-image
- version: 3.8 # Keep in sync with .github/workflows/checks.yml
install:
- requirements: docs/requirements.txt
- path: .
diff --git a/setup.py b/setup.py
index ed2b6e347..3a6ff2836 100644
--- a/setup.py
+++ b/setup.py
@@ -87,6 +87,7 @@ setup(
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
+ 'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Topic :: Internet :: WWW/HTTP',
diff --git a/tox.ini b/tox.ini
index 07552ba8d..021dd9988 100644
--- a/tox.ini
+++ b/tox.ini
@@ -41,6 +41,7 @@ deps =
types-pyOpenSSL==20.0.3
types-setuptools==57.0.0
commands =
+ pip install types-dataclasses # remove once py36 support is dropped
mypy --show-error-codes {posargs: scrapy tests}
[testenv:security]