From a71ed619faac1876f02f8c260e022bd46e7e2c65 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 9 Oct 2021 20:26:08 +0300 Subject: [PATCH 1/5] Add support for Python 3.10 --- .github/workflows/test.yml | 2 +- README.rst | 2 +- setup.py | 1 + tox.ini | 6 +++++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a43d194f..8808fb78 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: strategy: matrix: os: [macos-latest, ubuntu-latest, windows-latest] - 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/README.rst b/README.rst index 2ebac43d..0d7ce6c7 100644 --- a/README.rst +++ b/README.rst @@ -32,7 +32,7 @@ docstring conventions. `PEP 257 `_ out of the box, but it should not be considered a reference implementation. -**pydocstyle** supports Python 3.6, 3.7, 3.8 and 3.9. +**pydocstyle** supports Python 3.6+. Quick Start diff --git a/setup.py b/setup.py index 3c810d0b..a9c5df1c 100644 --- a/setup.py +++ b/setup.py @@ -30,6 +30,7 @@ 'Programming Language :: Python :: 3.7', 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Programming Language :: Python :: 3 :: Only', 'Operating System :: OS Independent', 'License :: OSI Approved :: MIT License', diff --git a/tox.ini b/tox.ini index 4ff6d2bf..72bd70fb 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # install tox" and then run "tox" from this directory. [tox] -envlist = {py36,py37,py38,py39}-{tests,install},docs,install,py36-docs +envlist = py{36,37,38,39,310}-{tests,install},docs,install,py36-docs [testenv] download = true @@ -61,6 +61,10 @@ commands = {[testenv:install]commands} skip_install = {[testenv:install]skip_install} commands = {[testenv:install]commands} +[testenv:py310-install] +skip_install = {[testenv:install]skip_install} +commands = {[testenv:install]commands} + [pytest] pep8ignore = test.py E701 E704 From 7d34c8c6b063de23251d6e49f906fa6266a2fcd0 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 9 Oct 2021 20:30:54 +0300 Subject: [PATCH 2/5] Python 3.10 requires pytest 6.2+ --- requirements/tests.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements/tests.txt b/requirements/tests.txt index 947eea4a..430de033 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,4 +1,5 @@ -pytest==3.0.2 +pytest==3.0.2; python_version <= '3.9' +pytest==6.2.5; python_version >= '3.10' pytest-pep8==1.0.6 mypy==0.782 black==20.8b1 From c181b38124e39f4044a77793fb5432400ad75333 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 9 Oct 2021 21:06:09 +0300 Subject: [PATCH 3/5] Don't use unmaintained pytest-pep8, doesn't support pytest 6.2 needed for Python 3.10 --- requirements/tests.txt | 4 +--- tox.ini | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/requirements/tests.txt b/requirements/tests.txt index 430de033..42538dd4 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,6 +1,4 @@ -pytest==3.0.2; python_version <= '3.9' -pytest==6.2.5; python_version >= '3.10' -pytest-pep8==1.0.6 +pytest==6.2.5 mypy==0.782 black==20.8b1 isort==5.4.2 diff --git a/tox.ini b/tox.ini index 72bd70fb..828a7b2b 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ setenv = LANG=en_US.UTF-8 # To pass arguments to py.test, use `tox [options] -- [pytest posargs]`. commands = - py.test --pep8 --cache-clear -vv src/tests {posargs} + py.test --cache-clear -vv src/tests {posargs} mypy --config-file=tox.ini src/ black --check src/pydocstyle isort --check src/pydocstyle From b95e926e81c4b042baebe7ab589da74106f1ce2b Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 9 Oct 2021 21:15:15 +0300 Subject: [PATCH 4/5] Drop the dot https://twitter.com/pytestdotorg/status/753767547866972160 --- src/tests/test_decorators.py | 2 +- src/tests/test_integration.py | 2 +- src/tests/test_utils.py | 2 +- tox.ini | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/tests/test_decorators.py b/src/tests/test_decorators.py index 443dcd06..cc5e3f06 100644 --- a/src/tests/test_decorators.py +++ b/src/tests/test_decorators.py @@ -1,6 +1,6 @@ """Unit test for pydocstyle module decorator handling. -Use tox or py.test to run the test suite. +Use tox or pytest to run the test suite. """ import io diff --git a/src/tests/test_integration.py b/src/tests/test_integration.py index eb4994ff..7e399cce 100644 --- a/src/tests/test_integration.py +++ b/src/tests/test_integration.py @@ -1,4 +1,4 @@ -"""Use tox or py.test to run the test-suite.""" +"""Use tox or pytest to run the test-suite.""" from collections import namedtuple diff --git a/src/tests/test_utils.py b/src/tests/test_utils.py index c327999e..f3b4a4c6 100644 --- a/src/tests/test_utils.py +++ b/src/tests/test_utils.py @@ -1,6 +1,6 @@ """Unit test for pydocstyle utils. -Use tox or py.test to run the test suite. +Use tox or pytest to run the test suite. """ from pydocstyle import utils diff --git a/tox.ini b/tox.ini index 828a7b2b..00e68c6d 100644 --- a/tox.ini +++ b/tox.ini @@ -13,9 +13,9 @@ download = true setenv = LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 -# To pass arguments to py.test, use `tox [options] -- [pytest posargs]`. +# To pass arguments to pytest, use `tox [options] -- [pytest posargs]`. commands = - py.test --cache-clear -vv src/tests {posargs} + pytest --cache-clear -vv src/tests {posargs} mypy --config-file=tox.ini src/ black --check src/pydocstyle isort --check src/pydocstyle From c814ad351ca2ff20be8e79e256aa275ea58e8d40 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Sat, 9 Oct 2021 21:40:43 +0300 Subject: [PATCH 5/5] Add support for Python 3.10 --- docs/release_notes.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/release_notes.rst b/docs/release_notes.rst index f3a4c4d5..72332114 100644 --- a/docs/release_notes.rst +++ b/docs/release_notes.rst @@ -10,7 +10,8 @@ Current Development Version New Features -* Add support for `property_decorators` config to ignore D401 +* Add support for `property_decorators` config to ignore D401. +* Add support for Python 3.10 (#554). 6.1.1 - May 17th, 2021 ---------------------------