Skip to content

Commit 46ffb13

Browse files
committed
Remove unused dependency_links variables in freeze.py.
1 parent ddfe130 commit 46ffb13

File tree

1 file changed

+5
-18
lines changed

1 file changed

+5
-18
lines changed

src/pip/_internal/operations/freeze.py

+5-18
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66
import re
77

8-
from pip._vendor import pkg_resources, six
8+
from pip._vendor import six
99
from pip._vendor.packaging.utils import canonicalize_name
1010
from pip._vendor.pkg_resources import RequirementParseError
1111

@@ -34,27 +34,14 @@ def freeze(
3434
if skip_regex:
3535
skip_match = re.compile(skip_regex).search
3636

37-
dependency_links = []
38-
39-
for dist in pkg_resources.working_set:
40-
if dist.has_metadata('dependency_links.txt'):
41-
dependency_links.extend(
42-
dist.get_metadata_lines('dependency_links.txt')
43-
)
44-
for link in find_links:
45-
if '#egg=' in link:
46-
dependency_links.append(link)
4737
for link in find_links:
4838
yield '-f %s' % link
4939
installations = {}
5040
for dist in get_installed_distributions(local_only=local_only,
5141
skip=(),
5242
user_only=user_only):
5343
try:
54-
req = FrozenRequirement.from_dist(
55-
dist,
56-
dependency_links
57-
)
44+
req = FrozenRequirement.from_dist(dist)
5845
except RequirementParseError:
5946
logger.warning(
6047
"Could not parse requirement: %s",
@@ -156,7 +143,7 @@ def freeze(
156143
yield str(installation).rstrip()
157144

158145

159-
def get_requirement_info(dist, dependency_links):
146+
def get_requirement_info(dist):
160147
"""
161148
Compute and return values (req, editable, comments) for use in
162149
FrozenRequirement.from_dist().
@@ -208,8 +195,8 @@ def __init__(self, name, req, editable, comments=()):
208195
self.comments = comments
209196

210197
@classmethod
211-
def from_dist(cls, dist, dependency_links):
212-
req, editable, comments = get_requirement_info(dist, dependency_links)
198+
def from_dist(cls, dist):
199+
req, editable, comments = get_requirement_info(dist)
213200
if req is None:
214201
req = dist.as_requirement()
215202

0 commit comments

Comments
 (0)