summaryrefslogtreecommitdiff
path: root/Lib/ensurepip/__init__.py
diff options
context:
space:
mode:
authorNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:08:17 +0100
committerNick Coghlan <ncoghlan@gmail.com>2017-02-09 16:08:17 +0100
commitc6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (patch)
treefb4a5c18886537b4b7df46ed3b2aa579747ff507 /Lib/ensurepip/__init__.py
parent5e0114a832a903518c4af6983161c0c2a8942a24 (diff)
parent819a21a3a4aac38f32e1ba4f68bcef45591fa3f0 (diff)
downloadcpython-c6180bb73c8c7c7f9d8ea9816487b710597b6fc1.tar.gz
Merge issue #26355 fix from Python 3.5
Diffstat (limited to 'Lib/ensurepip/__init__.py')
-rw-r--r--Lib/ensurepip/__init__.py20
1 files changed, 0 insertions, 20 deletions
diff --git a/Lib/ensurepip/__init__.py b/Lib/ensurepip/__init__.py
index 25c55679a3..9f5d15109a 100644
--- a/Lib/ensurepip/__init__.py
+++ b/Lib/ensurepip/__init__.py
@@ -12,19 +12,6 @@ _SETUPTOOLS_VERSION = "28.8.0"
_PIP_VERSION = "9.0.1"
-# pip currently requires ssl support, so we try to provide a nicer
-# error message when that is missing (http://bugs.python.org/issue19744)
-_MISSING_SSL_MESSAGE = ("pip {} requires SSL/TLS".format(_PIP_VERSION))
-try:
- import ssl
-except ImportError:
- ssl = None
- def _require_ssl_for_pip():
- raise RuntimeError(_MISSING_SSL_MESSAGE)
-else:
- def _require_ssl_for_pip():
- pass
-
_PROJECTS = [
("setuptools", _SETUPTOOLS_VERSION),
("pip", _PIP_VERSION),
@@ -71,7 +58,6 @@ def bootstrap(*, root=None, upgrade=False, user=False,
if altinstall and default_pip:
raise ValueError("Cannot use altinstall and default_pip together")
- _require_ssl_for_pip()
_disable_pip_configuration_settings()
# By default, installing pip and setuptools installs all of the
@@ -133,7 +119,6 @@ def _uninstall_helper(*, verbosity=0):
print(msg.format(pip.__version__, _PIP_VERSION), file=sys.stderr)
return
- _require_ssl_for_pip()
_disable_pip_configuration_settings()
# Construct the arguments to be passed to the pip command
@@ -145,11 +130,6 @@ def _uninstall_helper(*, verbosity=0):
def _main(argv=None):
- if ssl is None:
- print("Ignoring ensurepip failure: {}".format(_MISSING_SSL_MESSAGE),
- file=sys.stderr)
- return
-
import argparse
parser = argparse.ArgumentParser(prog="python -m ensurepip")
parser.add_argument(