diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dab4e3d..362d14b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: "3.8" + python-version: "3.10" - name: Install checkers run: | python -mpip install --upgrade pip @@ -32,7 +32,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["2.7", "3.6", "3.7", "3.8"] + python-version: ["2.7", "3.6", "3.7", "3.8", "3.9", "3.10", "3.11.0-alpha.7", "pypy-3.8"] steps: - name: Checkout working copy @@ -48,7 +48,7 @@ jobs: - name: tests run: | python setup.py develop - python ./ua_parser/user_agent_parser_test.py + env time -v python ./ua_parser/user_agent_parser_test.py - name: doctests # pprint formatting was changed a lot in 3.5 if: ${{ matrix.python-version != '2.7' }} diff --git a/setup.py b/setup.py index 90fdbec..ae2fe19 100644 --- a/setup.py +++ b/setup.py @@ -216,6 +216,8 @@ class sdist(_sdist): "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", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", ], diff --git a/tox.ini b/tox.ini index b166425..41df6a3 100644 --- a/tox.ini +++ b/tox.ini @@ -1,35 +1,34 @@ [tox] -envlist = py27, py36, py37, py38, docs, py27-flake8, py36-flake8, py36-black +envlist = py27, py36, py37, py38, py39, py310, docs, flake8, black +skipsdist = True [testenv] -deps = - -rrequirements.txt +usedevelop = True +deps = -rrequirements_dev.txt commands = - python setup.py develop python ua_parser/user_agent_parser_test.py + python -mdoctest README.rst + +[testenv:py27] +# no doctesting in 2.7 because of formatting divergences +commands = python ua_parser/user_agent_parser_test.py [testenv:docs] -basepython = python2.7 +skip_install = True deps = docutils Pygments -commands = - python setup.py check -s --restructuredtext --metadata - -[testenv:py27-flake8] -basepython = python2.7 -deps = flake8 -commands = flake8 {posargs} +commands = python setup.py check -s --restructuredtext --metadata -[testenv:py36-flake8] -basepython = python3.6 +[testenv:flake8] +skip_install = True deps = flake8 commands = flake8 {posargs} -[testenv:py36-black] -basepython = python3.6 +[testenv:black] +skip_install = True deps = black -commands = black --check . +commands = black --check --diff . [flake8] max_line_length = 88 -exclude = .git,.tox,dist,docs,_regexes.py,*_test.py,.eggs +filename = ua_parser/