Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

freeze: deprecate option --find-links #9070

Merged
merged 1 commit into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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