Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.13"
- python-version: "3.14"
env:
TOXENV: pre-commit
- python-version: "3.13"
- python-version: "3.14"
env:
TOXENV: pylint
- python-version: "3.13" # Keep in sync with .readthedocs.yml
env:
TOXENV: docs
- python-version: "3.13"
- python-version: "3.14"
env:
TOXENV: typing
- python-version: "3.13"
- python-version: "3.14"
env:
TOXENV: twinecheck

Expand Down
4 changes: 2 additions & 2 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@v5

- name: Set up Python 3.13
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
python-version: "3.14"

- name: Check Tag
id: check-release-tag
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v5
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/tests-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ jobs:
fail-fast: false
matrix:
include:
- python-version: "3.9"
env:
TOXENV: py
- python-version: "3.10"
env:
TOXENV: py
Expand All @@ -23,7 +20,7 @@ jobs:
- python-version: "3.13"
env:
TOXENV: py
- python-version: "3.14.0-rc.2"
- python-version: "3.14"
env:
TOXENV: py
- python-version: pypy3.11
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v5
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: docs/_static
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.0
rev: v0.14.3
hooks:
- id: ruff-check
args: [ --fix ]
Expand Down
12 changes: 10 additions & 2 deletions parsel/selector.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,15 @@
import typing
import warnings
from io import BytesIO
from typing import TYPE_CHECKING, Any, Literal, SupportsIndex, TypedDict, TypeVar, Union
from typing import (
TYPE_CHECKING,
Any,
Literal,
SupportsIndex,
TypeAlias,
TypedDict,
TypeVar,
)

import jmespath
from lxml import etree, html
Expand All @@ -25,7 +33,7 @@


_SelectorType = TypeVar("_SelectorType", bound="Selector")
_ParserType = Union[etree.XMLParser, etree.HTMLParser]
_ParserType: TypeAlias = etree.XMLParser | etree.HTMLParser
# simplified _OutputMethodArg from types-lxml
_TostringMethodType = Literal[
"html",
Expand Down
5 changes: 4 additions & 1 deletion parsel/xpathfuncs.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
from __future__ import annotations

import re
from typing import Any, Callable
from typing import TYPE_CHECKING, Any

from lxml import etree
from w3lib.html import HTML5_WHITESPACE

if TYPE_CHECKING:
from collections.abc import Callable

regex = f"[{HTML5_WHITESPACE}]+"
replace_html5_whitespaces = re.compile(regex).sub

Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ classifiers = [
"License :: OSI Approved :: BSD License",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"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 :: 3.14",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Text Processing :: Markup",
Expand All @@ -38,7 +38,7 @@ dependencies = [
"packaging",
"w3lib>=1.19.0",
]
requires-python = ">=3.9"
requires-python = ">=3.10"
dynamic = ["version"]

[project.urls]
Expand Down