Skip to content

Commit e157cf5

Browse files
authored
Merge pull request #9418 from sbidoul/freeze-does-not-need-wheel-cache
Remove unused wheel_cache argument in freeze operation
2 parents 5629e09 + e76eadc commit e157cf5

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

src/pip/_internal/commands/freeze.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import sys
22

3-
from pip._internal.cache import WheelCache
43
from pip._internal.cli import cmdoptions
54
from pip._internal.cli.base_command import Command
65
from pip._internal.cli.status_codes import SUCCESS
7-
from pip._internal.models.format_control import FormatControl
86
from pip._internal.operations.freeze import freeze
97
from pip._internal.utils.compat import stdlib_pkgs
108
from pip._internal.utils.deprecation import deprecated
@@ -78,8 +76,6 @@ def add_options(self):
7876

7977
def run(self, options, args):
8078
# type: (Values, List[str]) -> int
81-
format_control = FormatControl(set(), set())
82-
wheel_cache = WheelCache(options.cache_dir, format_control)
8379
skip = set(stdlib_pkgs)
8480
if not options.freeze_all:
8581
skip.update(DEV_PKGS)
@@ -97,18 +93,15 @@ def run(self, options, args):
9793
issue=9069,
9894
)
9995

100-
freeze_kwargs = dict(
96+
for line in freeze(
10197
requirement=options.requirements,
10298
find_links=options.find_links,
10399
local_only=options.local,
104100
user_only=options.user,
105101
paths=options.path,
106102
isolated=options.isolated_mode,
107-
wheel_cache=wheel_cache,
108103
skip=skip,
109104
exclude_editable=options.exclude_editable,
110-
)
111-
112-
for line in freeze(**freeze_kwargs):
105+
):
113106
sys.stdout.write(line + '\n')
114107
return SUCCESS

src/pip/_internal/operations/freeze.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333

3434
from pip._vendor.pkg_resources import Distribution, Requirement
3535

36-
from pip._internal.cache import WheelCache
37-
3836
RequirementInfo = Tuple[Optional[Union[str, Requirement]], bool, List[str]]
3937

4038

@@ -48,7 +46,6 @@ def freeze(
4846
user_only=False, # type: bool
4947
paths=None, # type: Optional[List[str]]
5048
isolated=False, # type: bool
51-
wheel_cache=None, # type: Optional[WheelCache]
5249
exclude_editable=False, # type: bool
5350
skip=() # type: Container[str]
5451
):

0 commit comments

Comments
 (0)