Python, Jython, CPython, Libraries, Pip, and Python 2.7 vs 3 - A quick primer

The ability to use pip under Jython 2.7.2 appears to be fundamentally broken by the servers requiring SNI. :frowning:

I’ve got standalone Jython installed and working, but calls to jython -m pip install for any library fail for ERROR: No matching distribution found for requests. Running again with max verbosity will show a snippet like this in the output:

  Getting page https://pypi.org/simple/requests/
  Looking up "https://pypi.org/simple/requests/" in the cache
  Request header has "max_age" as 0, cache bypassed
  Starting new HTTPS connection (1): pypi.org:443
  https://pypi.org:443 "GET /simple/requests/ HTTP/1.1" 403 16
  Status code 403 not in (200, 203, 300, 301)
  Could not fetch URL https://pypi.org/simple/requests/: 403 Client Error: SNI is required for url: https://pypi.org/simple/requests/ - skipping
  ERROR: Could not find a version that satisfies the requirement requests (from versions: none)
Cleaning up...
Removed build tracker '/tmp/pip-req-tracker-va_h9x'
ERROR: No matching distribution found for requests

Some quick searching around implies that Python pre-2.7.9 didn’t support SSL SNI, which implies Jython 2.7.2 probably doesn’t, and it looks like the pypi servers have been moved behind proxies using SNI.

Does anyone know a workaround for this issue?