Skip to content

Commit

Permalink
freeze: deprecate option --find-links
Browse files Browse the repository at this point in the history
  • Loading branch information
xavfernandez committed Oct 30, 2020
1 parent 8ae1bd6 commit c33cf49
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
1 change: 1 addition & 0 deletions news/9069.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deprecate ``--find-links`` option in ``pip freeze``
9 changes: 9 additions & 0 deletions src/pip/_internal/commands/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from pip._internal.models.format_control import FormatControl
from pip._internal.operations.freeze import freeze
from pip._internal.utils.compat import stdlib_pkgs
from pip._internal.utils.deprecation import deprecated
from pip._internal.utils.typing import MYPY_CHECK_RUNNING

DEV_PKGS = {'pip', 'setuptools', 'distribute', 'wheel'}
Expand Down Expand Up @@ -86,6 +87,14 @@ def run(self, options, args):

cmdoptions.check_list_path_option(options)

if options.find_links:
deprecated(
"--find-links option in pip freeze is deprecated.",
replacement=None,
gone_in="21.2",
issue=9069,
)

freeze_kwargs = dict(
requirement=options.requirements,
find_links=options.find_links,
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/test_freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@ def test_freeze_mercurial_clone_srcdir(script, tmpdir):
_check_output(result.stdout, expected)

result = script.pip(
'freeze', '-f', '{repo_dir}#egg=pip_test_package'.format(**locals())
'freeze', '-f', '{repo_dir}#egg=pip_test_package'.format(**locals()),
expect_stderr=True,
)
expected = textwrap.dedent(
"""
Expand Down

0 comments on commit c33cf49

Please sign in to comment.