From 8e7ad5083300e487c1fa43f4c4291ff3368d835c Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 6 Oct 2023 13:10:10 +0400 Subject: [PATCH] Add Python 3.12 to supported versions. (#142) * Add Python 3.12 to supported versions. * Add setuptools to tox.ini deps. * Actually run tests on 3.12. --- .flake8 | 3 ++- .github/workflows/checks.yml | 16 ++++++++-------- .github/workflows/publish.yml | 8 ++++---- .github/workflows/tests.yml | 6 +++--- setup.py | 1 + tox.ini | 5 +++-- 6 files changed, 21 insertions(+), 18 deletions(-) diff --git a/.flake8 b/.flake8 index 4315a12..8b0608f 100644 --- a/.flake8 +++ b/.flake8 @@ -2,7 +2,8 @@ max-line-length = 99 ignore = W503 - E266 # too many leading '#' for block comment + # too many leading '#' for block comment + E266 exclude = .git .tox diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 85b51ce..847d788 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,30 +7,30 @@ jobs: strategy: matrix: include: - - python-version: 3 + - python-version: 3.12 env: TOXENV: black - - python-version: 3 + - python-version: 3.12 env: TOXENV: flake8 - - python-version: 3 + - python-version: 3.12 env: TOXENV: pylint - - python-version: 3 + - python-version: 3.12 env: TOXENV: security - - python-version: 3 + - python-version: 3.12 env: TOXENV: docs - - python-version: 3 + - python-version: 3.12 env: TOXENV: typing steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 977a42d..67d9c5a 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -7,12 +7,12 @@ jobs: if: startsWith(github.event.ref, 'refs/tags/') steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - - name: Set up Python 3.8 - uses: actions/setup-python@v2 + - name: Set up Python 3.12 + uses: actions/setup-python@v4 with: - python-version: 3 + python-version: 3.12 - name: Check Tag id: check-release-tag diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 369fd68..0de2aa2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,13 +6,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.8, 3.9, "3.10", "3.11"] + python-version: [3.8, 3.9, "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} diff --git a/setup.py b/setup.py index 88dc31a..f7b51eb 100644 --- a/setup.py +++ b/setup.py @@ -41,5 +41,6 @@ "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", ], ) diff --git a/tox.ini b/tox.ini index a400382..c618dfb 100644 --- a/tox.ini +++ b/tox.ini @@ -6,6 +6,7 @@ deps = lxml>=4.4 pytest-cov>=2.8 pytest>=5.4 + setuptools sybil commands = pytest --cov=cssselect \ @@ -20,14 +21,14 @@ commands = [testenv:flake8] deps = - flake8==5.0.4 + flake8==6.1.0 commands = flake8 {posargs: cssselect setup.py tests docs/conf.py} [testenv:pylint] deps = {[testenv]deps} - pylint==2.15.3 + pylint==3.0.0 commands = pylint {posargs: cssselect setup.py tests docs}