summaryrefslogtreecommitdiff
path: root/src/pip/_internal/metadata/pkg_resources.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2021-01-01 15:16:16 -0800
committerJon Dufresne <jon.dufresne@gmail.com>2021-02-18 19:09:13 -0800
commita6392bd62e7d3b13698c4a4df64e5f51a5c67b9d (patch)
treece6be9c52903db89adafc11af298cd26eee63716 /src/pip/_internal/metadata/pkg_resources.py
parentf7b5586e71f6c5721bedd801eb5ec862fe7d8917 (diff)
downloadpip-a6392bd62e7d3b13698c4a4df64e5f51a5c67b9d.tar.gz
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.
Diffstat (limited to 'src/pip/_internal/metadata/pkg_resources.py')
-rw-r--r--src/pip/_internal/metadata/pkg_resources.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pip/_internal/metadata/pkg_resources.py b/src/pip/_internal/metadata/pkg_resources.py
index 48d959a37..ccc3cc57b 100644
--- a/src/pip/_internal/metadata/pkg_resources.py
+++ b/src/pip/_internal/metadata/pkg_resources.py
@@ -1,16 +1,16 @@
import zipfile
+from typing import TYPE_CHECKING
from pip._vendor import pkg_resources
from pip._vendor.packaging.utils import canonicalize_name
from pip._internal.utils import misc # TODO: Move definition here.
from pip._internal.utils.packaging import get_installer
-from pip._internal.utils.typing import MYPY_CHECK_RUNNING
from pip._internal.utils.wheel import pkg_resources_distribution_for_wheel
from .base import BaseDistribution, BaseEnvironment
-if MYPY_CHECK_RUNNING:
+if TYPE_CHECKING:
from typing import Iterator, List, Optional
from pip._vendor.packaging.version import _BaseVersion