From 065b9271320f8c1e2e868f03aa8ce82c6658f477 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 11 Oct 2024 19:27:39 +0500 Subject: [PATCH 1/6] Update Python versions. --- .github/workflows/checks.yml | 6 +++--- .github/workflows/publish.yml | 4 ++-- .github/workflows/tests.yml | 2 +- setup.py | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 5b6cfbf..ae33045 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -7,13 +7,13 @@ jobs: strategy: matrix: include: - - python-version: 3.12 + - python-version: 3.13 env: TOXENV: pylint - - python-version: 3.12 + - python-version: 3.13 env: TOXENV: docs - - python-version: 3.12 + - python-version: 3.13 env: TOXENV: typing diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 67d9c5a..3c36a53 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,10 +9,10 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Set up Python 3.12 + - name: Set up Python 3.13 uses: actions/setup-python@v4 with: - python-version: 3.12 + python-version: 3.13 - name: Check Tag id: check-release-tag diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a1a0524..3ef2a6d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,7 +6,7 @@ jobs: runs-on: ubuntu-latest strategy: 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 diff --git a/setup.py b/setup.py index f01a174..176c1ac 100644 --- a/setup.py +++ b/setup.py @@ -30,17 +30,17 @@ "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", ], From 00f9c11b6f68b86470f5d6284df154dfba7ce7fb Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 11 Oct 2024 19:31:37 +0500 Subject: [PATCH 2/6] Update tool versions. --- .github/workflows/checks.yml | 5 +++-- .github/workflows/publish.yml | 2 +- .github/workflows/tests.yml | 3 ++- .pre-commit-config.yaml | 8 ++++---- pylintrc | 1 + tox.ini | 4 ++-- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index ae33045..b6fc520 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -5,6 +5,7 @@ jobs: checks: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: include: - python-version: 3.13 @@ -21,7 +22,7 @@ jobs: - 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 }} @@ -36,4 +37,4 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: pre-commit/action@v3.0.0 + - uses: pre-commit/action@v3.0.1 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3c36a53..36f80b5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: - uses: actions/checkout@v4 - name: Set up Python 3.13 - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: 3.13 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 3ef2a6d..70b6c77 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -5,6 +5,7 @@ jobs: tests: runs-on: ubuntu-latest strategy: + fail-fast: false matrix: python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.10"] @@ -12,7 +13,7 @@ jobs: - 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 }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a27d3db..ab99544 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 \ No newline at end of file + - id: isort diff --git a/pylintrc b/pylintrc index e35425e..5a4647b 100644 --- a/pylintrc +++ b/pylintrc @@ -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, diff --git a/tox.ini b/tox.ini index 6831d3f..0de449d 100644 --- a/tox.ini +++ b/tox.ini @@ -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} @@ -38,4 +38,4 @@ commands = [testenv:pre-commit] deps = pre-commit commands = pre-commit run --all-files --show-diff-on-failure -skip_install = true \ No newline at end of file +skip_install = true From 93afb27865cec7efca2be3b3c651780765f24d58 Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 11 Oct 2024 19:40:05 +0500 Subject: [PATCH 3/6] Add twinecheck. --- .github/workflows/checks.yml | 3 +++ MANIFEST.in | 2 +- setup.py | 2 +- tox.ini | 9 +++++++++ 4 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index b6fc520..0cbc450 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -17,6 +17,9 @@ jobs: - python-version: 3.13 env: TOXENV: typing + - python-version: 3.13 + env: + TOXENV: twinecheck steps: - uses: actions/checkout@v4 diff --git a/MANIFEST.in b/MANIFEST.in index 7fc2933..5561683 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -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 diff --git a/setup.py b/setup.py index 176c1ac..4c5d49d 100644 --- a/setup.py +++ b/setup.py @@ -22,10 +22,10 @@ maintainer_email="paul.tremberth@gmail.com", 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"], }, diff --git a/tox.ini b/tox.ini index 0de449d..9c8f354 100644 --- a/tox.ini +++ b/tox.ini @@ -39,3 +39,12 @@ commands = deps = pre-commit commands = pre-commit run --all-files --show-diff-on-failure skip_install = true + +[testenv:twinecheck] +basepython = python3 +deps = + twine==5.1.1 + build==1.2.2 +commands = + python -m build --sdist + twine check dist/* From 62b3b0edc48939cdf3d6589af891a20382c1589e Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 11 Oct 2024 19:42:02 +0500 Subject: [PATCH 4/6] Bump the Python version in .readthedocs.yml. --- .readthedocs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yml b/.readthedocs.yml index 7d13c50..b396751 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,7 +8,7 @@ build: tools: # For available versions, see: # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python - python: "3.12" # Keep in sync with .github/workflows/checks.yml + python: "3.13" # Keep in sync with .github/workflows/checks.yml python: install: - requirements: docs/requirements.txt From 1a9c9407f38fe7d028df8657f7bbfa0b88aab89a Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Fri, 11 Oct 2024 19:46:55 +0500 Subject: [PATCH 5/6] Bump mypy. --- tox.ini | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 9c8f354..616d223 100644 --- a/tox.ini +++ b/tox.ini @@ -30,8 +30,8 @@ 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} From 33804f20281ef53aea110293fc50134549599aed Mon Sep 17 00:00:00 2001 From: Andrey Rakhmatullin Date: Tue, 15 Oct 2024 16:08:05 +0500 Subject: [PATCH 6/6] Roll back RTD Python. --- .github/workflows/checks.yml | 2 +- .readthedocs.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 0cbc450..cf0e689 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -11,7 +11,7 @@ jobs: - python-version: 3.13 env: TOXENV: pylint - - python-version: 3.13 + - python-version: 3.12 # Keep in sync with .readthedocs.yml env: TOXENV: docs - python-version: 3.13 diff --git a/.readthedocs.yml b/.readthedocs.yml index b396751..7d13c50 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,7 +8,7 @@ build: tools: # For available versions, see: # https://docs.readthedocs.io/en/stable/config-file/v2.html#build-tools-python - python: "3.13" # Keep in sync with .github/workflows/checks.yml + python: "3.12" # Keep in sync with .github/workflows/checks.yml python: install: - requirements: docs/requirements.txt