TL;DR: pypi has deprecated access for non-SNI clients. This is a problem when running buildout for old versions of Plone, because of two pieces that may be affected: setuptools and the python binary.
- setuptools 36.8.0 is the first version that added SNI support
- setuptools 44.1.1 is the last version that supports python 2
For the python binary, try this:
(Pdb) import ssl; print(ssl.HAS_SNI)
True
If it says False
, you'll have to get a newer version of python. However, it seems even fairly old versions of 2.7 have SNI support.
I have tried a buildout for Plone 4.3.20 with both setuptools 36.8.0 and 44.1.1 and it worked fine. Methinks that it will now be impossible to run a buildout for versions of Plone that support Python 2.6 and not 2.7, though (at least without a complete local egg cache with all dependencies).
If you are affected by this deprecation you'll get the ambiguous
Couldn't find index page for 'xyz' (maybe misspelled?)
Getting distribution for 'xyz==vvv'.
Couldn't find index page for 'xyz' (maybe misspelled?)
While:
Installing.
Loading extensions.
Getting distribution for 'xyz==vvv'.
Error: Couldn't find a distribution for 'xzy==vvv'.
(where xyz and vvv could be any package needed by your buildout).
If you are curious, you can set a breakpoint in lib/python2.7/site-packages/setuptools/package_index.py. This probably varies between versions of setuptools but in my case I had this code:
def open_url(self, url, warning=None):
if url.startswith('file:'):
return local_open(url)
try:
return open_with_auth(url, self.opener)
except (ValueError, http_client.InvalidURL) as v:
msg = ' '.join([str(arg) for arg in v.args])
if warning:
self.warn(warning, msg)
else:
raise DistutilsError('%s %s' % (url, msg))
except urllib.error.HTTPError as v:
return v
and the v
in the last line looks like this:
(Pdb) pp v.__dict__
{'__iter__': <bound method _fileobject.__iter__ of <socket._fileobject object at 0x7f51380a23d0>>,
'code': 403,
'fileno': <bound method _fileobject.fileno of <socket._fileobject object at 0x7f51380a23d0>>,
'fp': <addinfourl at 139986809292912 whose fp = <socket._fileobject object at 0x7f51380a23d0>>,
'hdrs': <httplib.HTTPMessage instance at 0x7f51380a1e60>,
'headers': <httplib.HTTPMessage instance at 0x7f51380a1e60>,
'msg': '[[[!!! BREAKING CHANGE !!!]]] Support for clients that do not support Server Name Indication is temporarily disabled and will be permanently deprecated soon. See https://status.python.org/incidents/hzmjhqsdjqgb and https://github.com/pypa/pypi-support/issues/978 [[[!!! END BREAKING CHANGE !!!]]]',
'next': <bound method _fileobject.next of <socket._fileobject object at 0x7f51380a23d0>>,
'read': <bound method _fileobject.read of <socket._fileobject object at 0x7f51380a23d0>>,
'readline': <bound method _fileobject.readline of <socket._fileobject object at 0x7f51380a23d0>>,
'readlines': <bound method _fileobject.readlines of <socket._fileobject object at 0x7f51380a23d0>>,
'url': 'https://pypi.python.org/simple/whateverpackageyouweretryingtoinstall/'}
So then you can find out more at Python Infrastructure Status - Deprecation of support for non-SNI clients. and Deprecation of non-SNI compatible clients. · Issue #978 · pypa/pypi-support · GitHub.