From 8c65a4f1749d2a4ba81884aa7e6874822ed02e45 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Fri, 26 Mar 2021 07:27:41 -0300 Subject: [PATCH 1/4] Configure support for Python 3.10 --- .github/workflows/main.yml | 15 +++++++++++++++ tox.ini | 1 + 2 files changed, 16 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7872f978ae1..98e32512f7a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,6 +27,8 @@ jobs: "windows-py37", "windows-py37-pluggy", "windows-py38", + "windows-py39", + "windows-py310", "ubuntu-py36", "ubuntu-py37", @@ -34,6 +36,7 @@ jobs: "ubuntu-py37-freeze", "ubuntu-py38", "ubuntu-py39", + "ubuntu-py310", "ubuntu-pypy3", "macos-py37", @@ -62,6 +65,14 @@ jobs: os: windows-latest tox_env: "py38-unittestextras" use_coverage: true + - name: "windows-py39" + python: "3.9" + os: windows-latest + tox_env: "py39-xdist" + - name: "windows-py310" + python: "3.10-dev" + os: windows-latest + tox_env: "py310-xdist" - name: "ubuntu-py36" python: "3.6" @@ -88,6 +99,10 @@ jobs: python: "3.9" os: ubuntu-latest tox_env: "py39-xdist" + - name: "ubuntu-py310" + python: "3.10-dev" + os: ubuntu-latest + tox_env: "py310-xdist" - name: "ubuntu-pypy3" python: "pypy-3.7" os: ubuntu-latest diff --git a/tox.ini b/tox.ini index da5a634de8b..b64608adcf9 100644 --- a/tox.ini +++ b/tox.ini @@ -8,6 +8,7 @@ envlist = py37 py38 py39 + py310 pypy3 py37-{pexpect,xdist,unittestextras,numpy,pluggymain} doctesting From b2954e85d6448d449da5ff1c861b40d218ed5b1d Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 27 Mar 2021 10:33:48 -0300 Subject: [PATCH 2/4] Adjust message for Python 3.10 Now the message includes the class name ("Skip.__init__() got multiple..."). --- testing/test_skipping.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/testing/test_skipping.py b/testing/test_skipping.py index bba36421ace..878b1549fe8 100644 --- a/testing/test_skipping.py +++ b/testing/test_skipping.py @@ -876,7 +876,8 @@ def test_hello(): result = pytester.runpytest() result.stdout.fnmatch_lines( [ - "*TypeError: __init__() got multiple values for argument 'reason' - maybe you meant pytest.mark.skipif?" + "*TypeError: *__init__() got multiple values for argument 'reason'" + " - maybe you meant pytest.mark.skipif?" ] ) From 913cffa45f9230087f589140604ec1eb5f199a83 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 27 Mar 2021 10:37:34 -0300 Subject: [PATCH 3/4] Add warnings filter for disutils deprecation Deprecated in 3.10, scheduled for removal in 3.12 --- pyproject.toml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index dd4be6c22d5..dc26b4d8ddf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,6 +26,8 @@ filterwarnings = [ # produced by older pyparsing<=2.2.0. "default:Using or importing the ABCs:DeprecationWarning:pyparsing.*", "default:the imp module is deprecated in favour of importlib:DeprecationWarning:nose.*", + # distutils is deprecated in 3.10, scheduled for removal in 3.12 + "ignore:The distutils package is deprecated:DeprecationWarning", # produced by python3.6/site.py itself (3.6.7 on Travis, could not trigger it with 3.6.8)." "ignore:.*U.*mode is deprecated:DeprecationWarning:(?!(pytest|_pytest))", # produced by pytest-xdist From a7416a535af4ca5ab3c1a77af2c19e7729212760 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Sat, 27 Mar 2021 11:04:26 -0300 Subject: [PATCH 4/4] Add classifier for Python 3.10 and CHANGELOG entry --- .pre-commit-config.yaml | 1 + changelog/8494.feature.rst | 1 + setup.cfg | 1 + 3 files changed, 3 insertions(+) create mode 100644 changelog/8494.feature.rst diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c33ae9012d..e78bab46271 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -42,6 +42,7 @@ repos: rev: v1.17.0 hooks: - id: setup-cfg-fmt + args: [--max-py-version=3.10] - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.8.0 hooks: diff --git a/changelog/8494.feature.rst b/changelog/8494.feature.rst new file mode 100644 index 00000000000..eca51d0deb9 --- /dev/null +++ b/changelog/8494.feature.rst @@ -0,0 +1 @@ +Python 3.10 is now supported. diff --git a/setup.cfg b/setup.cfg index bf8d2c85040..e9b8e597fb7 100644 --- a/setup.cfg +++ b/setup.cfg @@ -21,6 +21,7 @@ classifiers = Programming Language :: Python :: 3.7 Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 + Programming Language :: Python :: 3.10 Topic :: Software Development :: Libraries Topic :: Software Development :: Testing Topic :: Utilities