From 83b081bce5ef279eeee94b956be5fd3548283072 Mon Sep 17 00:00:00 2001 From: Anderson Bravalheri Date: Thu, 31 Oct 2024 12:26:33 +0000 Subject: [PATCH] Move setuptools._path.StrPath out of the TYPE_CHECKING check (Python 3.9+) --- setuptools/_path.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/setuptools/_path.py b/setuptools/_path.py index 5a2bdbd0d4..b749c6c6a0 100644 --- a/setuptools/_path.py +++ b/setuptools/_path.py @@ -10,10 +10,8 @@ if TYPE_CHECKING: from typing_extensions import TypeAlias - StrPath: TypeAlias = Union[str, os.PathLike[str]] # Same as _typeshed.StrPath -else: - # Python 3.8 support - StrPath: TypeAlias = Union[str, os.PathLike] + +StrPath: TypeAlias = Union[str, os.PathLike[str]] # Same as _typeshed.StrPath def ensure_directory(path):