diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index dd7d477..0024e81 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,13 +30,11 @@ jobs: matrix: os: [ubuntu, macos, windows] python-version: - - "3.7" - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" - - "pypy3.7" - "pypy3.8" - "pypy3.9" - "pypy3.10" diff --git a/CHANGELOG.md b/CHANGELOG.md index e357f8f..62d38e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,8 @@ # Changelog ## [Unreleased] +### Changed +- Bump the minimum Python version to 3.8. ## [0.4.4] - 2024-01-01 ### HTML spec diff --git a/domify/base_element.py b/domify/base_element.py index 58a08f7..4b52d40 100644 --- a/domify/base_element.py +++ b/domify/base_element.py @@ -1,6 +1,5 @@ from __future__ import annotations -import sys import warnings from contextvars import ContextVar from html import escape @@ -11,6 +10,7 @@ Dict, Iterable, Iterator, + Literal, Set, TypeVar, Union, @@ -21,12 +21,6 @@ from domify import exc from domify import validators as v -if sys.version_info >= (3, 8): - from typing import Literal -else: - from typing_extensions import Literal - - _T_BaseElement = TypeVar("_T_BaseElement", bound="BaseElement") _T_attribute = Union[str, float, bool] _T_child = Union["BaseElement", str, float] diff --git a/pyproject.toml b/pyproject.toml index 4325cd2..7266f7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ build-backend = "hatchling.build" name = "domify" description = "HTML generator using pure Python" readme = "README.md" -requires-python = ">=3.7" +requires-python = ">=3.8" license = "MIT" authors = [ {name="Parnassius", email="Parnassius@users.noreply.github.com"}, @@ -18,7 +18,6 @@ classifiers = [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -30,9 +29,6 @@ classifiers = [ "Topic :: Text Processing :: Markup :: HTML", "Typing :: Typed", ] -dependencies = [ - "typing-extensions>=3.7; python_version<'3.8'", -] dynamic = ["version"] [project.optional-dependencies] @@ -46,7 +42,6 @@ lint = [ test = [ "pytest==7.4.4", "pytest-cov==4.1.0", - "typing-extensions==3.7.2; python_version<'3.8'", ] @@ -101,13 +96,11 @@ features = ["test"] [[tool.hatch.envs.test.matrix]] python = [ - "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", - "pypy3.7", "pypy3.8", "pypy3.9", "pypy3.10", @@ -130,7 +123,7 @@ omit = ["domify/__about__.py"] [tool.mypy] -python_version = "3.7" +python_version = "3.8" strict = true # Disallow dynamic typing @@ -152,7 +145,7 @@ disallow_incomplete_defs = false [tool.ruff] -target-version = "py37" +target-version = "py38" select = [ "A", # flake8-builtins "ARG", # flake8-unused-arguments