Skip to content

Commit

Permalink
Drop no-suffix checks for pip-from-PATH
Browse files Browse the repository at this point in the history
  • Loading branch information
pradyunsg committed Jan 6, 2020
1 parent b7ed044 commit d9d801f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
10 changes: 5 additions & 5 deletions src/pip/_internal/utils/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -836,11 +836,11 @@ def protect_pip_from_modification_on_windows(modifying_pip):
On Windows, any operation modifying pip should be run as:
python -m pip ...
"""
pip_names = set()
for ext in ('', '.exe'):
pip_names.add('pip{ext}'.format(ext=ext))
pip_names.add('pip{}{ext}'.format(sys.version_info[0], ext=ext))
pip_names.add('pip{}.{}{ext}'.format(*sys.version_info[:2], ext=ext))
pip_names = [
"pip.exe",
"pip{}.exe".format(sys.version_info[0]),
"pip{}.{}.exe".format(*sys.version_info[:2])
]

# See https://github.com/pypa/pip/issues/1299 for more discussion
should_show_use_python_msg = (
Expand Down
3 changes: 0 additions & 3 deletions tests/functional/test_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -1661,9 +1661,6 @@ def test_user_config_accepted(script):
@pytest.mark.network
@pytest.mark.skipif("sys.platform != 'win32'")
@pytest.mark.parametrize('pip_name', [
'pip',
'pip{}'.format(sys.version_info[0]),
'pip{}.{}'.format(*sys.version_info[:2]),
'pip.exe',
'pip{}.exe'.format(sys.version_info[0]),
'pip{}.{}.exe'.format(*sys.version_info[:2])
Expand Down

0 comments on commit d9d801f

Please sign in to comment.