From a6392bd62e7d3b13698c4a4df64e5f51a5c67b9d Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Fri, 1 Jan 2021 15:16:16 -0800 Subject: Replace pip._internal.utils.typing with stdlib typing The stdlib module has been available since Python 3.5 and the TYPE_CHECKING constant has been available since 3.5.2. By using stdlib, this removes the need for pip to maintain its own Python 2 typing compatibility shim. --- src/pip/_internal/distributions/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/pip/_internal/distributions/__init__.py') diff --git a/src/pip/_internal/distributions/__init__.py b/src/pip/_internal/distributions/__init__.py index d5c1afc5b..d68f358e2 100644 --- a/src/pip/_internal/distributions/__init__.py +++ b/src/pip/_internal/distributions/__init__.py @@ -1,8 +1,9 @@ +from typing import TYPE_CHECKING + from pip._internal.distributions.sdist import SourceDistribution from pip._internal.distributions.wheel import WheelDistribution -from pip._internal.utils.typing import MYPY_CHECK_RUNNING -if MYPY_CHECK_RUNNING: +if TYPE_CHECKING: from pip._internal.distributions.base import AbstractDistribution from pip._internal.req.req_install import InstallRequirement -- cgit v1.2.1