Skip to content

Commit

Permalink
Add Python 3.13, drop Python 3.8, update tool versions, add twinecheck (
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR authored Oct 16, 2024
1 parent 15df23e commit 9e2ff26
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 22 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,27 @@ jobs:
checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- python-version: 3.12
- python-version: 3.13
env:
TOXENV: pylint
- python-version: 3.12
- python-version: 3.12 # Keep in sync with .readthedocs.yml
env:
TOXENV: docs
- python-version: 3.12
- python-version: 3.13
env:
TOXENV: typing
- python-version: 3.13
env:
TOXENV: twinecheck

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -36,4 +40,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pre-commit/[email protected].0
- uses: pre-commit/[email protected].1
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Set up Python 3.12
uses: actions/setup-python@v4
- name: Set up Python 3.13
uses: actions/setup-python@v5
with:
python-version: 3.12
python-version: 3.13

- name: Check Tag
id: check-release-tag
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "3.12", "pypy3.9", "pypy3.10"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.10"]

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
repos:
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
rev: 1.7.10
hooks:
- id: bandit
args: [-r, -c, .bandit.yml]
- repo: https://github.com/PyCQA/flake8
rev: 7.0.0
rev: 7.1.1
hooks:
- id: flake8
- repo: https://github.com/psf/black.git
rev: 24.3.0
rev: 24.10.0
hooks:
- id: black
- repo: https://github.com/pycqa/isort
rev: 5.13.2
hooks:
- id: isort
- id: isort
2 changes: 1 addition & 1 deletion MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
include AUTHORS CHANGES LICENSE README.rst tox.ini .coveragerc py.typed
include AUTHORS CHANGES LICENSE README.rst tox.ini .coveragerc cssselect/py.typed
recursive-include docs *
recursive-include tests *
prune docs/_build
1 change: 1 addition & 0 deletions pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ disable=assignment-from-no-return,
too-many-branches,
too-many-function-args,
too-many-lines,
too-many-positional-arguments,
too-many-public-methods,
too-many-statements,
undefined-variable,
Expand Down
6 changes: 3 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,25 @@
maintainer_email="[email protected]",
description="cssselect parses CSS3 Selectors and translates them to XPath 1.0",
long_description=README,
long_description_content_type="text/x-rst",
url="https://github.com/scrapy/cssselect",
license="BSD",
packages=["cssselect"],
test_suite="cssselect.tests",
package_data={
"cssselect": ["py.typed"],
},
include_package_data=True,
python_requires=">=3.8",
python_requires=">=3.9",
classifiers=[
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
],
Expand Down
17 changes: 13 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ commands =
[testenv:pylint]
deps =
{[testenv]deps}
pylint==3.0.0
pylint==3.3.1
commands =
pylint {posargs: cssselect setup.py tests docs}

Expand All @@ -30,12 +30,21 @@ commands =
[testenv:typing]
deps =
{[testenv]deps}
lxml-stubs==0.4.0
mypy==0.982
mypy==1.11.2
types-lxml==2024.9.16
commands =
mypy --strict {posargs: cssselect tests}

[testenv:pre-commit]
deps = pre-commit
commands = pre-commit run --all-files --show-diff-on-failure
skip_install = true
skip_install = true

[testenv:twinecheck]
basepython = python3
deps =
twine==5.1.1
build==1.2.2
commands =
python -m build --sdist
twine check dist/*

0 comments on commit 9e2ff26

Please sign in to comment.