1
1
Fork 0
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:
Pradyun Gedam 2020-06-30 13:33:30 +00:00 committed by GitHub
commit 93b0683d65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 2 additions and 24 deletions

1
news/8408.removal Normal file
View file

@ -0,0 +1 @@
Remove undocumented and deprecated option ``--always-unzip``

View file

@ -825,20 +825,6 @@ disable_pip_version_check = partial(
) # 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):
# type: (Option, str, str, OptionParser) -> None
"""Given a value spelled "algo:digest", append the digest to a list

View file

@ -96,7 +96,6 @@ def freeze(
line.strip().startswith('#') or
line.startswith((
'-r', '--requirement',
'-Z', '--always-unzip',
'-f', '--find-links',
'-i', '--index-url',
'--pre',

View file

@ -64,7 +64,6 @@ SUPPORTED_OPTIONS = [
cmdoptions.require_hashes,
cmdoptions.pre,
cmdoptions.trusted_host,
cmdoptions.always_unzip, # Deprecated
] # type: List[Callable[..., optparse.Option]]
# options to be passed to requirements

View file

@ -540,8 +540,6 @@ _freeze_req_opts = textwrap.dedent("""\
# Unchanged requirements below this line
-r ignore.txt
--requirement ignore.txt
-Z ignore
--always-unzip ignore
-f http://ignore
-i http://ignore
--pre

View file

@ -87,8 +87,7 @@ def test_uninstall_easy_install_after_import(script):
Uninstall an easy_installed package after it's been imported
"""
result = script.easy_install('--always-unzip', 'INITools==0.2',
expect_stderr=True)
result = script.easy_install('INITools==0.2', expect_stderr=True)
# the import forces the generation of __pycache__ if the version of python
# supports it
script.run('python', '-c', "import initools")

View file

@ -378,10 +378,6 @@ class TestProcessLine(object):
)
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):
line_processor("--pre", "file", 1, finder=finder)
assert finder.allow_all_prereleases