diff --git a/pyproject.toml b/pyproject.toml index 5e0883c..2d95f9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ dependencies = [ ] license = {text = "BSD-3-Clause"} dynamic = ["version"] -requires-python = ">=3.7" +requires-python = ">=3.8" readme = "README.rst" classifiers = [ "Development Status :: 4 - Beta", diff --git a/src/mistune/__init__.py b/src/mistune/__init__.py index bf27c84..3573a5f 100644 --- a/src/mistune/__init__.py +++ b/src/mistune/__init__.py @@ -8,10 +8,6 @@ Documentation: https://mistune.lepture.com/ """ -try: - import typing_extensions -except ImportError: - pass from typing import Any, Dict, Iterable, List, Optional, Tuple, Union, Literal from .block_parser import BlockParser from .core import BaseRenderer, BlockState, InlineState diff --git a/src/mistune/core.py b/src/mistune/core.py index 7c23cd1..07d79bd 100644 --- a/src/mistune/core.py +++ b/src/mistune/core.py @@ -14,9 +14,12 @@ Type, TypeVar, Union, - Self, cast, ) +try: + from typing import Self +except ImportError: + from typing_extensions import Self _LINE_END = re.compile(r'\n|$')