Skip to content

Commit 439ad91

Browse files
authored
Drop Python 3.9 (#160)
1 parent 3756d24 commit 439ad91

File tree

9 files changed

+18
-20
lines changed

9 files changed

+18
-20
lines changed

.github/workflows/checks.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ jobs:
88
fail-fast: false
99
matrix:
1010
include:
11-
- python-version: 3.13
11+
- python-version: 3.14
1212
env:
1313
TOXENV: pylint
1414
- python-version: 3.13 # Keep in sync with .readthedocs.yml
1515
env:
1616
TOXENV: docs
17-
- python-version: 3.13
17+
- python-version: 3.14
1818
env:
1919
TOXENV: typing
20-
- python-version: 3.13
20+
- python-version: 3.14
2121
env:
2222
TOXENV: twinecheck
2323

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- name: Set up Python
2222
uses: actions/setup-python@v6
2323
with:
24-
python-version: 3.13
24+
python-version: 3.14
2525

2626
- name: Build
2727
run: |

.github/workflows/tests-macos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.2"]
10+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1111

1212
steps:
1313
- uses: actions/checkout@v5

.github/workflows/tests-ubuntu.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.2", "pypy3.11"]
10+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "pypy3.11"]
1111

1212
steps:
1313
- uses: actions/checkout@v5
1414

1515
- name: Install system libraries
16-
if: contains(matrix.python-version, 'pypy') || contains(matrix.python-version, '3.14.0-rc')
16+
if: contains(matrix.python-version, 'pypy')
1717
run: |
1818
sudo apt-get update
1919
sudo apt-get install libxml2-dev libxslt-dev

.github/workflows/tests-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
strategy:
88
fail-fast: false
99
matrix:
10-
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14.0-rc.2"]
10+
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
1111

1212
steps:
1313
- uses: actions/checkout@v5

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.13.0
3+
rev: v0.14.4
44
hooks:
55
- id: ruff-check
66
args: [ --fix ]
@@ -10,7 +10,7 @@ repos:
1010
hooks:
1111
- id: blacken-docs
1212
additional_dependencies:
13-
- black==25.1.0
13+
- black==25.9.0
1414
- repo: https://github.com/pre-commit/pre-commit-hooks
1515
rev: v6.0.0
1616
hooks:

cssselect/parser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import operator
1717
import re
1818
import sys
19-
from typing import TYPE_CHECKING, Literal, Optional, Protocol, Union, cast, overload
19+
from typing import TYPE_CHECKING, Literal, Protocol, TypeAlias, Union, cast, overload
2020

2121
if TYPE_CHECKING:
2222
from collections.abc import Iterable, Iterator, Sequence
@@ -46,7 +46,7 @@ class SelectorSyntaxError(SelectorError, SyntaxError):
4646

4747
#### Parsed objects
4848

49-
Tree = Union[
49+
Tree: TypeAlias = Union[
5050
"Element",
5151
"Hash",
5252
"Class",
@@ -59,7 +59,7 @@ class SelectorSyntaxError(SelectorError, SyntaxError):
5959
"SpecificityAdjustment",
6060
"CombinedSelector",
6161
]
62-
PseudoElement = Union["FunctionalPseudoElement", str]
62+
PseudoElement: TypeAlias = Union["FunctionalPseudoElement", str]
6363

6464

6565
class Selector:
@@ -831,7 +831,7 @@ def parse_series(tokens: Iterable[Token]) -> tuple[int, int]:
831831
#### Token objects
832832

833833

834-
class Token(tuple[str, Optional[str]]): # noqa: SLOT001
834+
class Token(tuple[str, str | None]): # noqa: SLOT001
835835
@overload
836836
def __new__(
837837
cls,

pyproject.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,11 @@ description = "cssselect parses CSS3 Selectors and translates them to XPath 1.0"
1010
readme = "README.rst"
1111
authors = [{ name = "Ian Bicking", email = "[email protected]" }]
1212
maintainers = [{ name = "Paul Tremberth", email = "[email protected]" }]
13-
requires-python = ">=3.9"
13+
requires-python = ">=3.10"
1414
classifiers = [
1515
"Development Status :: 4 - Beta",
1616
"Intended Audience :: Developers",
1717
"Programming Language :: Python :: 3",
18-
"Programming Language :: Python :: 3.9",
1918
"Programming Language :: Python :: 3.10",
2019
"Programming Language :: Python :: 3.11",
2120
"Programming Language :: Python :: 3.12",
@@ -65,7 +64,6 @@ exclude_also = [
6564
"def __repr__",
6665
"if sys.version_info",
6766
"if __name__ == '__main__':",
68-
"if TYPE_CHECKING:",
6967
]
7068

7169
[tool.pylint.MASTER]

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ envlist = pre-commit,pylint,py,docs,typing
44
[testenv]
55
deps =
66
lxml>=4.4
7-
pytest-cov>=2.8
7+
pytest-cov>=7.0.0
88
pytest>=5.4
99
sybil
1010
commands =
@@ -15,7 +15,7 @@ commands =
1515
[testenv:pylint]
1616
deps =
1717
{[testenv]deps}
18-
pylint==3.3.8
18+
pylint==4.0.2
1919
commands =
2020
pylint {posargs: cssselect tests docs}
2121

@@ -29,7 +29,7 @@ commands =
2929
[testenv:typing]
3030
deps =
3131
{[testenv]deps}
32-
mypy==1.18.1
32+
mypy==1.18.2
3333
types-lxml==2025.8.25
3434
commands =
3535
mypy --strict {posargs: cssselect tests}

0 commit comments

Comments
 (0)