kennethreitz/requests — Issue #296: ConnectionError with Python 2.5 and SSL site
Author: davidwtbuxton
Created: 2011-11-29 14:20:07+00:00
State: open

I am using requests 0.8.5 to GET the front page of an SSL site. This works fine with Python 2.7.2, Python 2.6.7, but throws ConnectionError with Python 2.5.6. Other SSL sites work as expected with Python 2.5.6.

Quick tests from the command-line:

veronica:test david$ python2.7 -c "import requests; print requests.get('https://viewpoint.toyota-europe.com/');"

veronica:test david$ python2.6 -c "import requests; print requests.get('https://viewpoint.toyota-europe.com/');"

veronica:test david$ python2.5 -c "import requests; print requests.get('https://viewpoint.toyota-europe.com/');"
Traceback (most recent call last):
File "", line 1, in
File "requests/api.py", line 80, in get
return request('get', url, **kwargs)
File "requests/api.py", line 67, in request
prefetch=prefetch
File "requests/sessions.py", line 191, in request
r.send(prefetch=prefetch)
File "requests/models.py", line 453, in send
raise ConnectionError(e)
requests.exceptions.ConnectionError: Max retries exceeded for url: /
veronica:test david$

But this works in Python 2.5:

veronica:test david$ python2.5 -c "import requests; print requests.get('https://github.com/');"

The problem web server is running IIS7. I will try and get more details soon. Platform is Mac OS X 10.7.2, all Python versions built from MacPorts.