Skip to content

Commit

Permalink
Bump the minimum Python version to 3.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Parnassius committed Feb 1, 2024
1 parent 0df505a commit 27c21f4
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 19 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Changed
- Bump the minimum Python version to 3.8.

## [0.4.4] - 2024-01-01
### HTML spec
Expand Down
8 changes: 1 addition & 7 deletions domify/base_element.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from __future__ import annotations

import sys
import warnings
from contextvars import ContextVar
from html import escape
Expand All @@ -11,6 +10,7 @@
Dict,
Iterable,
Iterator,
Literal,
Set,
TypeVar,
Union,
Expand All @@ -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]
Expand Down
13 changes: 3 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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="[email protected]"},
Expand All @@ -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",
Expand All @@ -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]
Expand All @@ -46,7 +42,6 @@ lint = [
test = [
"pytest==7.4.4",
"pytest-cov==4.1.0",
"typing-extensions==3.7.2; python_version<'3.8'",
]


Expand Down Expand Up @@ -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",
Expand All @@ -130,7 +123,7 @@ omit = ["domify/__about__.py"]


[tool.mypy]
python_version = "3.7"
python_version = "3.8"
strict = true

# Disallow dynamic typing
Expand All @@ -152,7 +145,7 @@ disallow_incomplete_defs = false


[tool.ruff]
target-version = "py37"
target-version = "py38"
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
Expand Down

0 comments on commit 27c21f4

Please sign in to comment.