diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 280af4335..c219c3860 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - python-version: [2.7, 3.7, 3.8, 3.9] + python-version: ["2.7", "3.7", "3.8", "3.9", "3.10"] os: [ubuntu-latest, macos-latest] steps: diff --git a/CHANGELOG b/CHANGELOG index 1394619cb..fb38ff58e 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,7 @@ ## [0.40.0] UNRELEASED ### Changes - Moved 'pytree' parsing tools into its own subdirectory. +- Add support for Python 3.10. ## [0.32.0] 2021-12-26 ### Added diff --git a/setup.py b/setup.py index 70e57da68..8b00835ab 100644 --- a/setup.py +++ b/setup.py @@ -61,6 +61,10 @@ def run(self): 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', 'Topic :: Software Development :: Libraries :: Python Modules', 'Topic :: Software Development :: Quality Assurance', ], diff --git a/tox.ini b/tox.ini index f42b884f0..5134916dc 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py27,py34,py35,py36,py37,py38 +envlist=py27,py36,py37,py38,py39,py310 [testenv] commands= diff --git a/yapf/yapflib/yapf_api.py b/yapf/yapflib/yapf_api.py index 804c9d547..3912e0135 100644 --- a/yapf/yapflib/yapf_api.py +++ b/yapf/yapflib/yapf_api.py @@ -198,12 +198,12 @@ def FormatCode(unformatted_source, def _CheckPythonVersion(): # pragma: no cover - errmsg = 'yapf is only supported for Python 2.7 or 3.4+' + errmsg = 'yapf is only supported for Python 2.7 or 3.6+' if sys.version_info[0] == 2: if sys.version_info[1] < 7: raise RuntimeError(errmsg) elif sys.version_info[0] == 3: - if sys.version_info[1] < 4: + if sys.version_info[1] < 6: raise RuntimeError(errmsg)