Skip to content

Commit

Permalink
Merge pull request #8470 from deveshks/remove-always-unzip
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg authored Jun 30, 2020
2 parents 17608c4 + 504759b commit 93b0683
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 24 deletions.
1 change: 1 addition & 0 deletions news/8408.removal
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove undocumented and deprecated option ``--always-unzip``
14 changes: 0 additions & 14 deletions src/pip/_internal/cli/cmdoptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -825,20 +825,6 @@ def _handle_no_use_pep517(option, opt, value, parser):
) # 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
Expand Down
1 change: 0 additions & 1 deletion src/pip/_internal/operations/freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def freeze(
line.strip().startswith('#') or
line.startswith((
'-r', '--requirement',
'-Z', '--always-unzip',
'-f', '--find-links',
'-i', '--index-url',
'--pre',
Expand Down
1 change: 0 additions & 1 deletion src/pip/_internal/req/req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
cmdoptions.require_hashes,
cmdoptions.pre,
cmdoptions.trusted_host,
cmdoptions.always_unzip, # Deprecated
] # type: List[Callable[..., optparse.Option]]

# options to be passed to requirements
Expand Down
2 changes: 0 additions & 2 deletions tests/functional/test_freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,6 @@ def test_freeze_nested_vcs(script, outer_vcs, inner_vcs):
# Unchanged requirements below this line
-r ignore.txt
--requirement ignore.txt
-Z ignore
--always-unzip ignore
-f http://ignore
-i http://ignore
--pre
Expand Down
3 changes: 1 addition & 2 deletions tests/functional/test_uninstall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
4 changes: 0 additions & 4 deletions tests/unit/test_req_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,10 +378,6 @@ def test_set_finder_trusted_host(
)
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
Expand Down

0 comments on commit 93b0683

Please sign in to comment.