mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Merge pull request #9070 from xavfernandez/deprecate_find_links
This commit is contained in:
commit
9a62dd87d8
3 changed files with 12 additions and 1 deletions
1
news/9069.removal.rst
Normal file
1
news/9069.removal.rst
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Deprecate ``--find-links`` option in ``pip freeze``
|
|
@ -9,6 +9,7 @@ from pip._internal.cli.status_codes import SUCCESS
|
||||||
from pip._internal.models.format_control import FormatControl
|
from pip._internal.models.format_control import FormatControl
|
||||||
from pip._internal.operations.freeze import freeze
|
from pip._internal.operations.freeze import freeze
|
||||||
from pip._internal.utils.compat import stdlib_pkgs
|
from pip._internal.utils.compat import stdlib_pkgs
|
||||||
|
from pip._internal.utils.deprecation import deprecated
|
||||||
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
|
from pip._internal.utils.typing import MYPY_CHECK_RUNNING
|
||||||
|
|
||||||
DEV_PKGS = {'pip', 'setuptools', 'distribute', 'wheel'}
|
DEV_PKGS = {'pip', 'setuptools', 'distribute', 'wheel'}
|
||||||
|
@ -86,6 +87,14 @@ class FreezeCommand(Command):
|
||||||
|
|
||||||
cmdoptions.check_list_path_option(options)
|
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(
|
freeze_kwargs = dict(
|
||||||
requirement=options.requirements,
|
requirement=options.requirements,
|
||||||
find_links=options.find_links,
|
find_links=options.find_links,
|
||||||
|
|
|
@ -358,7 +358,8 @@ def test_freeze_mercurial_clone_srcdir(script, tmpdir):
|
||||||
_check_output(result.stdout, expected)
|
_check_output(result.stdout, expected)
|
||||||
|
|
||||||
result = script.pip(
|
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(
|
expected = textwrap.dedent(
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue