Skip to content

Instantly share code, notes, and snippets.

View force tlsv1 python requests
import ssl
import requests
from requests.adapters import HTTPAdapter
from requests.packages.urllib3.poolmanager import PoolManager
class TLSv1Adapter(HTTPAdapter):
""""Transport adapter" that allows us to use TLSv1."""
def init_poolmanager(self, connections, maxsize, block=False):
mike-plivo /
Created Dec 22, 2011
kennethreitz/requests issue 3239
Some requests receive a Response but keep the socket in
CLOSE_WAIT state until process is killed .
Some requests raise ConnectionError after some time and
seem to block others unprocessed spawned requests until
all ConnectionError are not raised .
(all http connection pool slots are busy ?)