Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drops support for Python 3.7 #91

Merged
merged 3 commits into from
Jul 27, 2024
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/linkcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- run: pip install hatch
- run: hatch run docs:linkcheck
3 changes: 1 addition & 2 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ jobs:
strategy:
matrix:
python-version:
- 3.7 # 2023-06-27
- 3.8 # 2024-10
- 3.9 # 2025-10
- "3.10" # 2026-10
Expand Down Expand Up @@ -58,7 +57,7 @@ jobs:
ref: ${{ inputs.ref || github.ref }}
- uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- uses: extractions/setup-just@v2
- run: pip install hatch
- run: just ${{ matrix.target }}
Expand Down
2 changes: 1 addition & 1 deletion ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

## 0.7

- drop support for Python 3.7 & 3.8
- drop support for Python 3.8
- a native implementation of the data model
- add a node type for CDATA
- provide means to build a wheel with *mypyc*
Expand Down
3 changes: 2 additions & 1 deletion _delb/names.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
from typing import TYPE_CHECKING, Iterator, Optional

if TYPE_CHECKING:
from _delb.typing import Final, NamespaceDeclarations
from typing import Final
from _delb.typing import NamespaceDeclarations

XML_NAMESPACE: Final = "http://www.w3.org/XML/1998/namespace"
XMLNS_NAMESPACE: Final = "http://www.w3.org/2000/xmlns/"
Expand Down
3 changes: 2 additions & 1 deletion _delb/plugins/https_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@
if TYPE_CHECKING:
from collections.abc import Iterator
from types import SimpleNamespace
from typing import Final

from _delb.typing import Final, LoaderResult
from _delb.typing import LoaderResult


try:
Expand Down
5 changes: 0 additions & 5 deletions _delb/typing.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@

from _delb.nodes import NodeBase, _TagDefinition

if sys.version_info < (3, 8): # DROPWITH Python 3.7
from typing_extensions import Final
else:
from typing import Final

if sys.version_info < (3, 11): # DROPWITH Python 3.10
from typing_extensions import Self
Expand All @@ -56,7 +52,6 @@

__all__ = (
"Filter",
"Final",
"Loader",
"LoaderConstraint",
"LoaderResult",
Expand Down
11 changes: 2 additions & 9 deletions _delb/xpath/ast.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,8 @@

import inspect
import operator
import sys
from collections.abc import Callable, Iterable, Iterator, Sequence
from functools import wraps
from functools import cached_property, wraps
from textwrap import indent
from typing import TYPE_CHECKING, cast, Any, NamedTuple, Optional

Expand All @@ -28,17 +27,11 @@
from _delb.plugins import plugin_manager as _plugin_manager
from _delb.utils import _is_node_of_type

# REMOVE when support for Python 3.7 is dropped
if sys.version_info < (3, 8):
cached_property = property
else:
from functools import cached_property


if TYPE_CHECKING:
from typing import Final
from _delb.names import Namespaces
from _delb.nodes import NodeBase, ProcessingInstructionNode, TagNode
from _delb.typing import Final


xpath_functions: Final = _plugin_manager.xpath_functions
Expand Down
3 changes: 2 additions & 1 deletion _delb/xpath/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@
from _delb.xpath.tokenizer import COMPLEMENTING_TOKEN_TYPES, TokenType, tokenize, Token

if TYPE_CHECKING:
from _delb.typing import Final, TypeAlias
from typing import Final
from _delb.typing import TypeAlias


TokenPattern: TypeAlias = Sequence[Union[TokenType, None]] # noqa: SIM907
Expand Down
3 changes: 1 addition & 2 deletions _delb/xpath/tokenizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@

if TYPE_CHECKING:
from collections.abc import Sequence

from _delb.typing import Final
from typing import Final


# constants & data structures
Expand Down
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,13 @@ authors = [
]
license = "AGPL-3.0-or-later"
readme = "README.rst"
requires-python = ">=3.7"
requires-python = ">=3.8"
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)",
"Natural Language :: English",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -157,7 +156,8 @@ dependencies = [
"flake8-pyprojecttoml",
"flake8-pytest-style",
"flake8-use-fstring",
"flake8-use-pathlib",
# FIXME? this needs an update (uses pkg_resources), but isn't pressing
# "flake8-use-pathlib",
"flake8-rst-docstrings",
"flake8-simplify",
"flake8-sphinx-links",
Expand Down