From e20394e5cbd8d440c9c1868ddc25d036afcbfe45 Mon Sep 17 00:00:00 2001 From: Anthony Sottile Date: Tue, 13 Dec 2022 01:06:43 -0500 Subject: drop python3.6 github actions no longer supports it --- .github/workflows/main.yml | 14 +++++++------- .pre-commit-config.yaml | 4 ++-- setup.py | 5 +---- testsuite/test_api.py | 5 ++++- tox.ini | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 00f5e75..b2eba4c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,10 +14,7 @@ jobs: py: 3.9 toxenv: py - os: ubuntu-latest - py: pypy3 - toxenv: py - - os: ubuntu-latest - py: 3.6 + py: pypy3.9 toxenv: py - os: ubuntu-latest py: 3.7 @@ -32,15 +29,18 @@ jobs: py: '3.10' toxenv: py - os: ubuntu-latest - py: '3.11-dev' + py: '3.11' + toxenv: py + - os: ubuntu-latest + py: '3.12-dev' toxenv: py - os: ubuntu-latest py: 3.9 toxenv: flake8 runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.py }} - run: pip install tox diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 061253f..c477ffe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,12 +11,12 @@ repos: rev: v3.9.0 hooks: - id: reorder-python-imports - args: [--py36-plus] + args: [--py37-plus] - repo: https://github.com/asottile/pyupgrade rev: v3.3.0 hooks: - id: pyupgrade - args: [--py36-plus] + args: [--py37-plus] - repo: https://github.com/pycqa/flake8 rev: 6.0.0 hooks: diff --git a/setup.py b/setup.py index fe96737..2fe5a11 100644 --- a/setup.py +++ b/setup.py @@ -31,7 +31,7 @@ setup( py_modules=['pycodestyle'], include_package_data=True, zip_safe=False, - python_requires='>=3.6', + python_requires='>=3.7', entry_points={ 'console_scripts': [ 'pycodestyle = pycodestyle:_main', @@ -45,9 +45,6 @@ setup( 'Operating System :: OS Independent', 'Programming Language :: Python', 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Topic :: Software Development :: Libraries :: Python Modules', diff --git a/testsuite/test_api.py b/testsuite/test_api.py index 8dde32f..38e34ac 100644 --- a/testsuite/test_api.py +++ b/testsuite/test_api.py @@ -329,7 +329,10 @@ class APITestCase(unittest.TestCase): count_errors = pep8style.input_file('stdin', lines=['\x00\n']) stdout = sys.stdout.getvalue() - expected = "stdin:1:1: E901 ValueError" + if sys.version_info < (3, 12): + expected = "stdin:1:1: E901 ValueError" + else: + expected = "stdin:1:1: E901 SyntaxError: source code string cannot contain null bytes" # noqa: E501 self.assertTrue(stdout.startswith(expected), msg='Output %r does not start with %r' % (stdout, expected)) diff --git a/tox.ini b/tox.ini index 18f1a4f..f4a32d7 100644 --- a/tox.ini +++ b/tox.ini @@ -4,7 +4,7 @@ # and then run "tox" from this directory. [tox] -envlist = py36, py37, py38, py39, py310, pypy3 +envlist = py, pypy3 skip_missing_interpreters = True [testenv] -- cgit v1.2.1