/usr/lib/python2.6/site-packages/urllib3
NameSizeModeActions
contrib/-0755rm
packages/-0755rm
util/-0755rm
connection.py89670644editdlrm
connection.pyc80210644editdlrm
connectionpool.py304140644editdlrm
connectionpool.pyc244930644editdlrm
exceptions.py41090644editdlrm
exceptions.pyc81230644editdlrm
fields.py58330644editdlrm
fields.pyc65580644editdlrm
filepost.py22810644editdlrm
filepost.pyc31820644editdlrm
poolmanager.py94160644editdlrm
poolmanager.pyc98810644editdlrm
request.py59320644editdlrm
request.pyc59990644editdlrm
response.py171490644editdlrm
response.pyc158390644editdlrm
_collections.py105200644editdlrm
_collections.pyc128410644editdlrm
__init__.py18640644editdlrm
__init__.pyc25910644editdlrm
Edit: /usr/lib/python2.6/site-packages/urllib3/poolmanager.pyc (9881B)
Ñò ;vVc@s9ddkZyddklZWn#ej oddklZnXddklZddklZl Z ddkl Z ddk l Z l Z lZddklZdd klZdd klZd d d gZhed6e d6ZeieƒZdZd efd„ƒYZd efd„ƒYZd„ZdS(iÿÿÿÿN(turljoini(tRecentlyUsedContainer(tHTTPConnectionPooltHTTPSConnectionPool(tport_by_scheme(tLocationValueErrort MaxRetryErrortProxySchemeUnknown(tRequestMethods(t parse_url(tRetryt PoolManagert ProxyManagertproxy_from_urlthttpthttpstkey_filet cert_filet cert_reqstca_certst ssl_versioncBskeZdZd Zdd d„Zd„Zd„Zd„Zd„Z d dd„Z d „Z e d „Z RS( s$ Allows for arbitrary requests while transparently keeping track of necessary connection pools for you. :param num_pools: Number of connection pools to cache before discarding the least recently used pool. :param headers: Headers to include with all requests, unless other headers are given explicitly. :param \**connection_pool_kw: Additional parameters are used to create fresh :class:`urllib3.connectionpool.ConnectionPool` instances. Example:: >>> manager = PoolManager(num_pools=2) >>> r = manager.request('GET', 'http://google.com/') >>> r = manager.request('GET', 'http://google.com/mail') >>> r = manager.request('GET', 'http://yahoo.com/') >>> len(manager.pools) 2 i cKs5ti||ƒ||_t|dd„ƒ|_dS(Nt dispose_funccSs |iƒS((tclose(tp((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pytAs(Rt__init__tconnection_pool_kwRtpools(tselft num_poolstheadersR((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyR=s  cCs|S(N((R((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyt __enter__CscCs|iƒtS(N(tcleartFalse(Rtexc_typetexc_valtexc_tb((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyt__exit__Fs cCsdt|}|i}|djo4|iiƒ}x"tD]}|i|dƒq6Wn||||S(s Create a new :class:`ConnectionPool` based on host, port and scheme. This method is used to actually create the connection pools handed out by :meth:`connection_from_url` and companion methods. It is intended to be overridden for customization. RN(tpool_classes_by_schemeRtcopyt SSL_KEYWORDStpoptNone(Rtschemethosttporttpool_clstkwargstkw((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyt _new_poolKs   cCs|iiƒdS(s´ Empty our store of pools and direct them all to close. This will not affect in-flight connections, but they will not be re-used after completion. N(RR (R((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyR \sRcCs®|ptdƒ‚n|pd}|pti|dƒ}|||f}|iiiiƒzD|ii|ƒ}|o|S|i|||ƒ}||i| %sN(R R6R,R-R+R!RtproxyR*turlopent request_uritget_redirect_locationRtstatusR2t isinstanceR tfrom_intt incrementRtraise_on_redirecttlogtinfo( RtmethodR7R;R0R8tconnR>tredirect_locationR=((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyRAs8 $     "   N(t__name__t __module__t__doc__R*R@RRR%R1R R6R9tTrueRA(((s4/tmp/pip-build-cD3xZi/urllib3/urllib3/poolmanager.pyR s     cBsGeZdZdddd„Zddd„Zdd„Zed„ZRS(sw Behaves just like :class:`PoolManager`, but sends all requests through the defined proxy, using the CONNECT method for HTTPS URLs. :param proxy_url: The URL of the proxy to be used. :param proxy_headers: A dictionary contaning headers that will be sent to the proxy. In case of HTTP they are being sent with each request, while in the HTTPS/CONNECT case they are sent only once. Could be used for proxy authentication. Example: >>> proxy = urllib3.ProxyManager('http://localhost:3128/') >>> r1 = proxy.request('GET', 'http://google.com/') >>> r2 = proxy.request('GET', 'http://httpbin.org/') >>> len(proxy.pools) 1 >>> r3 = proxy.request('GET', 'https://httpbin.org/') >>> r4 = proxy.request('GET', 'https://twitter.com/') >>> len(proxy.pools) 3 i cKsçt|tƒo d|i|i|if}nt|ƒ}|ip+ti|idƒ}|id|ƒ}n|idjot |iƒ‚n||_ |ph|_ |i |d<|i |ds*  ¡W