diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a85a1e03..2dbeb51a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,25 +6,25 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["pypy-3.7", "3.9"] + python-version: ["pypy-3.9", "3.11"] target: [ "src-layout", "adhoc-layout", ] include: # Add new helper variables to existing jobs - - {python-version: "pypy-3.7", tox-python-version: "pypy3"} - - {python-version: "3.9", tox-python-version: "py39"} + - {python-version: "pypy-3.9", tox-python-version: "pypy3"} + - {python-version: "3.11", tox-python-version: "py311"} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Cache - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.cache/pip key: @@ -34,8 +34,8 @@ jobs: - name: Install dependencies run: | - python -m pip install -U pip - python -m pip install -U wheel + python -m pip install --upgrade pip + python -m pip install --upgrade wheel python -m pip install --progress-bar=off tox -rci/requirements.txt - name: Examples @@ -51,33 +51,15 @@ jobs: matrix: include: - name: 'check' - python: '3.9' - toxpython: 'python3.9' + python: '3.11' + toxpython: 'python3.11' tox_env: 'check' os: 'ubuntu-latest' - name: 'docs' - python: '3.9' - toxpython: 'python3.9' + python: '3.11' + toxpython: 'python3.11' tox_env: 'docs' os: 'ubuntu-latest' - - name: 'py36-pytest70-xdist250-coverage62 (ubuntu)' - python: '3.6' - toxpython: 'python3.6' - python_arch: 'x64' - tox_env: 'py36-pytest70-xdist250-coverage62' - os: 'ubuntu-latest' - - name: 'py36-pytest70-xdist250-coverage62 (windows)' - python: '3.6' - toxpython: 'python3.6' - python_arch: 'x64' - tox_env: 'py36-pytest70-xdist250-coverage62' - os: 'windows-latest' - - name: 'py36-pytest70-xdist250-coverage62 (macos)' - python: '3.6' - toxpython: 'python3.6' - python_arch: 'x64' - tox_env: 'py36-pytest70-xdist250-coverage62' - os: 'macos-latest' - name: 'py37-pytest71-xdist250-coverage64 (ubuntu)' python: '3.7' toxpython: 'python3.7' @@ -150,23 +132,23 @@ jobs: python_arch: 'x64' tox_env: 'py310-pytest71-xdist250-coverage64' os: 'macos-latest' - - name: 'pypy37-pytest71-xdist250-coverage64 (ubuntu)' - python: 'pypy-3.7' - toxpython: 'pypy3.7' + - name: 'py311-pytest72-xdist320-coverage65 (ubuntu)' + python: '3.11' + toxpython: 'python3.11' python_arch: 'x64' - tox_env: 'pypy37-pytest71-xdist250-coverage64' + tox_env: 'py311-pytest72-xdist320-coverage65' os: 'ubuntu-latest' - - name: 'pypy37-pytest71-xdist250-coverage64 (windows)' - python: 'pypy-3.7' - toxpython: 'pypy3.7' + - name: 'py311-pytest72-xdist320-coverage65 (windows)' + python: '3.11' + toxpython: 'python3.11' python_arch: 'x64' - tox_env: 'pypy37-pytest71-xdist250-coverage64' + tox_env: 'py311-pytest72-xdist320-coverage65' os: 'windows-latest' - - name: 'pypy37-pytest71-xdist250-coverage64 (macos)' - python: 'pypy-3.7' - toxpython: 'pypy3.7' + - name: 'py311-pytest72-xdist320-coverage65 (macos)' + python: '3.11' + toxpython: 'python3.11' python_arch: 'x64' - tox_env: 'pypy37-pytest71-xdist250-coverage64' + tox_env: 'py311-pytest72-xdist320-coverage65' os: 'macos-latest' - name: 'pypy38-pytest71-xdist250-coverage64 (ubuntu)' python: 'pypy-3.8' @@ -186,17 +168,35 @@ jobs: python_arch: 'x64' tox_env: 'pypy38-pytest71-xdist250-coverage64' os: 'macos-latest' + - name: 'pypy39--pytest72-xdist320-coverage65 (ubuntu)' + python: 'pypy-3.9' + toxpython: 'pypy3.9' + python_arch: 'x64' + tox_env: 'pypy39-pytest72-xdist320-coverage65' + os: 'ubuntu-latest' + - name: 'pypy39-pytest72-xdist320-coverage65 (windows)' + python: 'pypy-3.9' + toxpython: 'pypy3.9' + python_arch: 'x64' + tox_env: 'pypy39-pytest72-xdist320-coverage65' + os: 'windows-latest' + - name: 'pypy39-pytest72-xdist320-coverage65 (macos)' + python: 'pypy-3.9' + toxpython: 'pypy3.9' + python_arch: 'x64' + tox_env: 'pypy39-pytest72-xdist320-coverage65' + os: 'macos-latest' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - - uses: actions/setup-python@v2 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} architecture: ${{ matrix.python_arch }} - name: install dependencies run: | - python -mpip install --progress-bar=off -r ci/requirements.txt + python -m pip install --progress-bar=off -r ci/requirements.txt virtualenv --version pip --version tox --version diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ec537150..1b105884 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,22 +4,22 @@ # pre-commit autoupdate repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.3.0 + rev: v4.4.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer exclude: '.*\.pth$' - id: debug-statements - repo: https://github.com/PyCQA/isort - rev: 5.10.1 + rev: 5.12.0 hooks: - id: isort - repo: https://github.com/asottile/pyupgrade - rev: v3.2.2 + rev: v3.3.1 hooks: - id: pyupgrade - args: [--py36-plus] + args: [--py37-plus] - repo: https://github.com/PyCQA/flake8 - rev: 5.0.4 + rev: 6.0.0 hooks: - id: flake8 diff --git a/ci/bootstrap.py b/ci/bootstrap.py index b0977495..48c46640 100755 --- a/ci/bootstrap.py +++ b/ci/bootstrap.py @@ -65,7 +65,7 @@ def main(): # This uses sys.executable the same way that the call in # cookiecutter-pylibrary/hooks/post_gen_project.py # invokes this bootstrap.py itself. - for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], universal_newlines=True).splitlines() + for line in subprocess.check_output([sys.executable, '-m', 'tox', '--listenvs'], text=True).splitlines() ] tox_environments = [line for line in tox_environments if line.startswith('py')] diff --git a/setup.py b/setup.py index 799d4699..7c3eaad1 100755 --- a/setup.py +++ b/setup.py @@ -111,11 +111,11 @@ def run(self): 'Programming Language :: Python', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3 :: Only', - '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 :: 3.11', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Testing', @@ -133,7 +133,7 @@ def run(self): 'pytest>=4.6', 'coverage[toml]>=5.2.1' ], - python_requires='>=3.6', + python_requires='>=3.7', extras_require={ 'testing': [ 'fields', diff --git a/tests/test_pytest_cov.py b/tests/test_pytest_cov.py index 84fe42ba..77859bf4 100644 --- a/tests/test_pytest_cov.py +++ b/tests/test_pytest_cov.py @@ -1556,6 +1556,8 @@ def test_foo(): SCRIPT_SIMPLE_RESULT = '4 * 100%' +@pytest.mark.skipif('tuple(int(x) for x in xdist.__version__.split(".")) >= (2, 5, 0)', + reason="--boxed option was removed in version 2.5.0") @pytest.mark.skipif('sys.platform == "win32"') def test_dist_boxed(testdir): script = testdir.makepyfile(SCRIPT_SIMPLE) @@ -1916,6 +1918,7 @@ def find_labels(text, pattern): @pytest.mark.skipif("coverage.version_info < (5, 0)") +@pytest.mark.skipif("coverage.version_info > (6, 4)") @xdist_params def test_contexts(pytester, testdir, opts): with open(os.path.join(os.path.dirname(__file__), "contextful.py")) as f: diff --git a/tox.ini b/tox.ini index 282cd244..aeccd9de 100644 --- a/tox.ini +++ b/tox.ini @@ -12,8 +12,8 @@ passenv = [tox] envlist = check - py{36}-pytest{70}-xdist250-coverage{62} py{37,38,39,310,py37,py38}-pytest{71}-xdist250-coverage{64} + py{311,py39}-pytest{72}-xdist320-coverage{65} docs [testenv] @@ -30,6 +30,7 @@ setenv = pytest62: _DEP_PYTEST=pytest==6.2.5 pytest70: _DEP_PYTEST=pytest==7.0.1 pytest71: _DEP_PYTEST=pytest==7.1.2 + pytest72: _DEP_PYTEST=pytest==7.2.0 xdist127: _DEP_PYTESTXDIST=pytest-xdist==1.27.0 xdist129: _DEP_PYTESTXDIST=pytest-xdist==1.29.0 @@ -41,6 +42,7 @@ setenv = xdist201: _DEP_PYTESTXDIST=pytest-xdist==2.1.0 xdist202: _DEP_PYTESTXDIST=pytest-xdist==2.2.0 xdist250: _DEP_PYTESTXDIST=pytest-xdist==2.5.0 + xdist320: _DEP_PYTESTXDIST=pytest-xdist==3.2.0 xdistdev: _DEP_PYTESTXDIST=git+https://github.com/pytest-dev/pytest-xdist.git#egg=pytest-xdist coverage45: _DEP_COVERAGE=coverage==4.5.4 @@ -55,6 +57,7 @@ setenv = coverage62: _DEP_COVERAGE=coverage==6.2 coverage63: _DEP_COVERAGE=coverage==6.3.3 coverage64: _DEP_COVERAGE=coverage==6.4.2 + coverage65: _DEP_COVERAGE=coverage==6.5.0 # For testing against a coverage.py working tree. coveragedev: _DEP_COVERAGE=-e{env:COVERAGE_HOME} passenv = @@ -87,12 +90,13 @@ commands = [testenv:check] deps = - docutils check-manifest + colorama # TODO Remove when isort > v6.0.0b2 is released. + docutils flake8 - readme-renderer - pygments isort + pygments + readme-renderer skip_install = true usedevelop = false commands =