mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Merge pull request #8470 from deveshks/remove-always-unzip
This commit is contained in:
commit
93b0683d65
7 changed files with 2 additions and 24 deletions
1
news/8408.removal
Normal file
1
news/8408.removal
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Remove undocumented and deprecated option ``--always-unzip``
|
|
@ -825,20 +825,6 @@ disable_pip_version_check = partial(
|
||||||
) # type: Callable[..., Option]
|
) # type: Callable[..., Option]
|
||||||
|
|
||||||
|
|
||||||
# Deprecated, Remove later
|
|
||||||
always_unzip = partial(
|
|
||||||
Option,
|
|
||||||
'-Z', '--always-unzip',
|
|
||||||
dest='always_unzip',
|
|
||||||
action='store_true',
|
|
||||||
help=SUPPRESS_HELP,
|
|
||||||
) # type: Callable[..., Option]
|
|
||||||
# TODO: Move into a class that inherits from partial, currently does not
|
|
||||||
# work as mypy complains functools.partial is a generic class.
|
|
||||||
# This way we know we can ignore this option in docs auto generation
|
|
||||||
setattr(always_unzip, 'deprecated', True) # noqa: B010
|
|
||||||
|
|
||||||
|
|
||||||
def _handle_merge_hash(option, opt_str, value, parser):
|
def _handle_merge_hash(option, opt_str, value, parser):
|
||||||
# type: (Option, str, str, OptionParser) -> None
|
# type: (Option, str, str, OptionParser) -> None
|
||||||
"""Given a value spelled "algo:digest", append the digest to a list
|
"""Given a value spelled "algo:digest", append the digest to a list
|
||||||
|
|
|
@ -96,7 +96,6 @@ def freeze(
|
||||||
line.strip().startswith('#') or
|
line.strip().startswith('#') or
|
||||||
line.startswith((
|
line.startswith((
|
||||||
'-r', '--requirement',
|
'-r', '--requirement',
|
||||||
'-Z', '--always-unzip',
|
|
||||||
'-f', '--find-links',
|
'-f', '--find-links',
|
||||||
'-i', '--index-url',
|
'-i', '--index-url',
|
||||||
'--pre',
|
'--pre',
|
||||||
|
|
|
@ -64,7 +64,6 @@ SUPPORTED_OPTIONS = [
|
||||||
cmdoptions.require_hashes,
|
cmdoptions.require_hashes,
|
||||||
cmdoptions.pre,
|
cmdoptions.pre,
|
||||||
cmdoptions.trusted_host,
|
cmdoptions.trusted_host,
|
||||||
cmdoptions.always_unzip, # Deprecated
|
|
||||||
] # type: List[Callable[..., optparse.Option]]
|
] # type: List[Callable[..., optparse.Option]]
|
||||||
|
|
||||||
# options to be passed to requirements
|
# options to be passed to requirements
|
||||||
|
|
|
@ -540,8 +540,6 @@ _freeze_req_opts = textwrap.dedent("""\
|
||||||
# Unchanged requirements below this line
|
# Unchanged requirements below this line
|
||||||
-r ignore.txt
|
-r ignore.txt
|
||||||
--requirement ignore.txt
|
--requirement ignore.txt
|
||||||
-Z ignore
|
|
||||||
--always-unzip ignore
|
|
||||||
-f http://ignore
|
-f http://ignore
|
||||||
-i http://ignore
|
-i http://ignore
|
||||||
--pre
|
--pre
|
||||||
|
|
|
@ -87,8 +87,7 @@ def test_uninstall_easy_install_after_import(script):
|
||||||
Uninstall an easy_installed package after it's been imported
|
Uninstall an easy_installed package after it's been imported
|
||||||
|
|
||||||
"""
|
"""
|
||||||
result = script.easy_install('--always-unzip', 'INITools==0.2',
|
result = script.easy_install('INITools==0.2', expect_stderr=True)
|
||||||
expect_stderr=True)
|
|
||||||
# the import forces the generation of __pycache__ if the version of python
|
# the import forces the generation of __pycache__ if the version of python
|
||||||
# supports it
|
# supports it
|
||||||
script.run('python', '-c', "import initools")
|
script.run('python', '-c', "import initools")
|
||||||
|
|
|
@ -378,10 +378,6 @@ class TestProcessLine(object):
|
||||||
)
|
)
|
||||||
assert expected in actual
|
assert expected in actual
|
||||||
|
|
||||||
def test_noop_always_unzip(self, line_processor, finder):
|
|
||||||
# noop, but confirm it can be set
|
|
||||||
line_processor("--always-unzip", "file", 1, finder=finder)
|
|
||||||
|
|
||||||
def test_set_finder_allow_all_prereleases(self, line_processor, finder):
|
def test_set_finder_allow_all_prereleases(self, line_processor, finder):
|
||||||
line_processor("--pre", "file", 1, finder=finder)
|
line_processor("--pre", "file", 1, finder=finder)
|
||||||
assert finder.allow_all_prereleases
|
assert finder.allow_all_prereleases
|
||||||
|
|
Loading…
Reference in a new issue