Skip to content

Commit f68454b

Browse files
committed
Remove vendored typing-extensions
1 parent 58f5d87 commit f68454b

File tree

10 files changed

+15
-4534
lines changed

10 files changed

+15
-4534
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ repos:
4141
'types-setuptools==68.2.0.0',
4242
'types-freezegun==1.1.10',
4343
'types-pyyaml==6.0.12.12',
44+
'typing-extensions',
4445
]
4546

4647
- repo: https://github.com/pre-commit/pygrep-hooks

news/typing_extensions.vendor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Upgrade typing_extensions to 4.14.1
1+
Remove vendored typing-extensions.

src/pip/_internal/index/package_finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
from pip._internal.utils.unpacking import SUPPORTED_EXTENSIONS
4646

4747
if TYPE_CHECKING:
48-
from pip._vendor.typing_extensions import TypeGuard
48+
from typing_extensions import TypeGuard
4949

5050
__all__ = ["FormatControl", "BestCandidateResult", "PackageFinder"]
5151

src/pip/_internal/models/pylock.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,18 @@
55
from collections.abc import Iterable
66
from dataclasses import dataclass
77
from pathlib import Path
8-
from typing import Any
8+
from typing import TYPE_CHECKING, Any
99

1010
from pip._vendor import tomli_w
11-
from pip._vendor.typing_extensions import Self
1211

1312
from pip._internal.models.direct_url import ArchiveInfo, DirInfo, VcsInfo
1413
from pip._internal.models.link import Link
1514
from pip._internal.req.req_install import InstallRequirement
1615
from pip._internal.utils.urls import url_to_path
1716

17+
if TYPE_CHECKING:
18+
from typing_extensions import Self
19+
1820
PYLOCK_FILE_NAME_RE = re.compile(r"^pylock\.([^.]+)\.toml$")
1921

2022

src/pip/_internal/utils/retry.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1+
from __future__ import annotations
2+
13
import functools
24
from time import perf_counter, sleep
3-
from typing import Callable, TypeVar
5+
from typing import TYPE_CHECKING, Callable, TypeVar
46

5-
from pip._vendor.typing_extensions import ParamSpec
7+
if TYPE_CHECKING:
8+
from typing_extensions import ParamSpec
69

7-
T = TypeVar("T")
8-
P = ParamSpec("P")
10+
T = TypeVar("T")
11+
P = ParamSpec("P")
912

1013

1114
def retry(

src/pip/_vendor/typing_extensions.LICENSE

Lines changed: 0 additions & 279 deletions
This file was deleted.

0 commit comments

Comments
 (0)